## org.beepcore.beep.core
Class Frame

    java.lang.Object
      org.beepcore.beep.core.Frame

public class Frame
extends java.lang.Object

Frame encapsulates a BEEP protocol frame for MSG, RPY, ERR, ANS and NUL BEEP message types. Contains a the `Channel` this frame belongs to, the BEEP Frame Payload which holds the BEEP Frames's Header, Trailer, and the message payload.

See Also:
  `BufferSegment`

Field Summary
`static int` `MAX_ANS_NUMBER`
`static int` `MAX_CHANNEL_NUMBER`
`static int` `MAX_HEADER_SIZE`
`static int` `MAX_MESSAGE_NUMBER`
`static long` `MAX_SEQUENCE_NUMBER`
`static int` `MAX_SIZE`
`static int` `MIN_FRAME_SIZE`
`static int` `MIN_HEADER_SIZE`
`static java.lang.String` `TRAILER`

Method Summary
`void` `addPayload(BufferSegment buf)` Adds the `BufferSegment` to the list representing the payload for this frame.
`int` `getAnsno()` Returns the answer number of this `Frame`.
`BufferSegment[]` `getBytes()` Returns an `iterator` to iterate over a collection of `BufferSegment` objects.
`Channel` `getChannel()` Returns the `Channel` to which this `Frame` belongs.
`int` `getMessageType()` Returns the message type of this `Frame`.
`java.lang.String` `getMessageTypeString()` Returns the message type of this `Frame`.
`int` `getMsgno()` Returns the message number of this `Frame`.
`java.util.Iterator` `getPayload()` Returns the `payload` of a `Frame`.
`long` `getSeqno()` Returns the `seqno` of this `Frame`.
`int` `getSize()` Returns the `size` of the payload for this `Frame`.
`boolean` `isLast()` Indicates if this is the last `Frame` in a sequence of frames

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TRAILER

    public static final java.lang.String TRAILER

See Also:
  Constant Field Values

### MAX_HEADER_SIZE

    public static final int MAX_HEADER_SIZE

### MIN_HEADER_SIZE

    public static final int MIN_HEADER_SIZE

### MIN_FRAME_SIZE

    public static final int MIN_FRAME_SIZE

### MAX_ANS_NUMBER

    public static final int MAX_ANS_NUMBER

See Also:
  Constant Field Values

### MAX_CHANNEL_NUMBER

    public static final int MAX_CHANNEL_NUMBER

See Also:
  Constant Field Values

### MAX_MESSAGE_NUMBER

    public static final int MAX_MESSAGE_NUMBER

See Also:
  Constant Field Values

### MAX_SEQUENCE_NUMBER

    public static final long MAX_SEQUENCE_NUMBER

See Also:
  Constant Field Values

### MAX_SIZE

    public static final int MAX_SIZE

See Also:
  Constant Field Values

Method Detail

### addPayload

    public void addPayload(BufferSegment buf)

  Adds the `BufferSegment` to the list representing the payload for this frame.

### getBytes

    public BufferSegment[] getBytes()

  Returns an `iterator` to iterate over a collection of `BufferSegment` objects.

### getPayload

    public java.util.Iterator getPayload()

  Returns the `payload` of a `Frame`. A `BufferSegment` contains a BEEP Frames Payload.

  See Also:
    `BufferSegment`

### getMessageType

    public int getMessageType()

  Returns the message type of this `Frame`.

### getMessageTypeString

    public java.lang.String getMessageTypeString()

  Returns the message type of this `Frame`.

### getChannel

    public Channel getChannel()

  Returns the `Channel` to which this `Frame` belongs.

  See Also:
    `Channel`

### getMsgno

    public int getMsgno()

  Returns the message number of this `Frame`.

### getSeqno

    public long getSeqno()

  Returns the `seqno` of this `Frame`.

### getSize

    public int getSize()

  Returns the `size` of the payload for this `Frame`.

### getAnsno

    public int getAnsno()

  Returns the answer number of this `Frame`.

### isLast

    public boolean isLast()

  Indicates if this is the last `Frame` in a sequence of frames

Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.