com.eyebolt.iplib
Class MessageHeader

java.lang.Object
  |
  +--com.eyebolt.iplib.MessageHeader
Direct Known Subclasses:
HttpHeader

public class MessageHeader
extends java.lang.Object

Header prepended to every ipmanager BASE message

Version:
0.01, 16 Jul 2000
Author:
Jay Roberts

Field Summary
static int FLAG_BEACON
          Description of the Field
static int FLAG_MESSAGE_ACK
          Description of the Field
static int FLAG_MESSAGE_CANCEL
          Description of the Field
static int FLAG_MESSAGE_CRC
          Description of the Field
static int FLAG_MESSAGE_RETRY
          Description of the Field
static int FLAG_PING
          Description of the Field
(package private)  int Flags
           
(package private) static int globalID
          class variable for message id
(package private)  int HdrCRC
           
(package private)  short HdrLen
           
static short MAX_SIZE
          Description of the Field
(package private)  IPMessage message
           
static int MSG_SIGNATURE
          Description of the Field
static short MSG_VERSION
          Description of the Field
(package private)  int MsgId
           
(package private)  int MsgLen
           
(package private)  int PktLen
           
(package private)  short SeqNum
           
(package private)  short Service
           
(package private)  int Signature
           
static short SVC_DISCONNECT
          Description of the Field
static short SVC_NORMAL
          Description of the Field
static short SVC_VERIFYCONNECTION
          Description of the Field
(package private)  short Version
           
 
Constructor Summary
MessageHeader()
          Constructor for the MessageHeader object
MessageHeader(IPMessage msg)
          Constructor for the MessageHeader object
MessageHeader(IPMessage msg, byte[] buf)
          Constructor for the MessageHeader object
 
Method Summary
 int flattenAt(byte[] buf)
          Description of the Method
static int getBaseSize()
          Gets the Size attribute of the MessageHeader class
(package private)  int getId()
          Fetch the message ID
(package private)  int getID()
          Deprecated. use getId instead
(package private)  int getResponseId()
          Fetch the message ResponseId
(package private)  short getServiceType()
          Fetch the message service type
 int getSize()
          Gets the Size attribute of the MessageHeader class
(package private)  boolean hasFlag(int flag)
          Return true if a flag is set on this message header.
(package private)  void makeID()
          Assign the header a new unique message ID
(package private)  void setFlag(int flag)
          Set a flag value
(package private)  void setId(int id)
          Sets the ID attribute of the MessageHeader object
(package private)  void setID(int id)
          Deprecated. use setId instead
(package private)  void setResponseId(int id)
          Sets the Id attribute of the HttpHeader object
(package private)  void setServiceType(short serviceId)
          Sets the service attribute of the MessageHeader object
 java.lang.String toString()
          Description of the Method
(package private)  int unFlattenFrom(byte[] buf)
          Fill this header with the contents of the input buffer.
 void updateValues()
          Description of the Method
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

MSG_SIGNATURE

public static final int MSG_SIGNATURE
Description of the Field

MSG_VERSION

public static final short MSG_VERSION
Description of the Field

FLAG_PING

public static final int FLAG_PING
Description of the Field

FLAG_BEACON

public static final int FLAG_BEACON
Description of the Field

FLAG_MESSAGE_CRC

public static final int FLAG_MESSAGE_CRC
Description of the Field

FLAG_MESSAGE_RETRY

public static final int FLAG_MESSAGE_RETRY
Description of the Field

FLAG_MESSAGE_ACK

public static final int FLAG_MESSAGE_ACK
Description of the Field

FLAG_MESSAGE_CANCEL

public static final int FLAG_MESSAGE_CANCEL
Description of the Field

SVC_NORMAL

public static final short SVC_NORMAL
Description of the Field

SVC_DISCONNECT

public static final short SVC_DISCONNECT
Description of the Field

SVC_VERIFYCONNECTION

public static final short SVC_VERIFYCONNECTION
Description of the Field

MAX_SIZE

public static final short MAX_SIZE
Description of the Field

globalID

static int globalID
class variable for message id

Signature

int Signature

Version

short Version

Service

short Service

HdrLen

short HdrLen

PktLen

int PktLen

MsgLen

int MsgLen

MsgId

int MsgId

SeqNum

short SeqNum

Flags

int Flags

HdrCRC

int HdrCRC

message

IPMessage message
Constructor Detail

MessageHeader

public MessageHeader()
Constructor for the MessageHeader object

MessageHeader

public MessageHeader(IPMessage msg)
Constructor for the MessageHeader object
Parameters:
msg - Description of Parameter

MessageHeader

public MessageHeader(IPMessage msg,
                     byte[] buf)
Constructor for the MessageHeader object
Parameters:
msg - Description of Parameter
buf - Description of Parameter
Method Detail

updateValues

public void updateValues()
Description of the Method

flattenAt

public int flattenAt(byte[] buf)
Description of the Method
Parameters:
buf - Description of Parameter
Returns:
Description of the Returned Value

unFlattenFrom

int unFlattenFrom(byte[] buf)
Fill this header with the contents of the input buffer.
Parameters:
buf - Description of Parameter
Returns:
Description of the Returned Value

toString

public java.lang.String toString()
Description of the Method
Overrides:
toString in class java.lang.Object
Returns:
Description of the Returned Value

getBaseSize

public static int getBaseSize()
Gets the Size attribute of the MessageHeader class
Returns:
The Size value

getSize

public int getSize()
Gets the Size attribute of the MessageHeader class
Returns:
The Size value

setFlag

void setFlag(int flag)
Set a flag value
Parameters:
flag - flag to set

hasFlag

boolean hasFlag(int flag)
Return true if a flag is set on this message header.
Parameters:
flag - flag to check

setID

void setID(int id)
Deprecated. use setId instead

Sets the ID attribute of the MessageHeader object
Parameters:
id - The new ID value

getID

int getID()
Deprecated. use getId instead

Fetch the message ID
Returns:
The ID value

setId

void setId(int id)
Sets the ID attribute of the MessageHeader object
Parameters:
id - The new ID value

getId

int getId()
Fetch the message ID
Returns:
The ID value

setResponseId

void setResponseId(int id)
Sets the Id attribute of the HttpHeader object
Parameters:
id - The new ResponseId value

getResponseId

int getResponseId()
Fetch the message ResponseId
Returns:
The ResponseId value

setServiceType

void setServiceType(short serviceId)
Sets the service attribute of the MessageHeader object
Parameters:
Service - The new service value

getServiceType

short getServiceType()
Fetch the message service type
Returns:
The service type value

makeID

void makeID()
Assign the header a new unique message ID


Copyright © 2001 Eyebolt, Inc.