|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ascert.comms.x25.X25Message
Provides a common class encapsulating X.25 messages to be sent or received. In addition to containing a data buffer with contents of the message, the class also allows setting or retrieval of message status indicators such as the X.25 M-Bit ot Q-Bit.
Field Summary | |
protected int |
len
Indicates the length of data to be sent or which was received. |
protected boolean |
mBit
Indicates status of the X.25 M-bit when this message is sent or received. |
protected byte[] |
msg
Buffer containing the message data to be sent or received. |
protected boolean |
qBit
Indicates status of the X.25 Q-bit when this message is sent or received. |
Constructor Summary | |
X25Message(byte[] msg)
Constructs an X25Message object, using the supplied buffer for sending and receiving data. |
|
X25Message(byte[] msg,
boolean qBit,
boolean mBit)
Constructs an X25Message object, using the supplied buffer for sending and receiving data. |
|
X25Message(byte[] msg,
int len,
boolean qBit,
boolean mBit)
Constructs an X25Message object, using the supplied buffer for sending and receiving data. |
Method Summary | |
int |
getLen()
Gets the length attribute of the X25Message object. |
boolean |
getMbit()
Gets the M-bit attribute of the X25Message object |
byte[] |
getMsg()
Gets the msg attribute of the X25Message object |
boolean |
getQbit()
Gets the Q-bit attribute of the X25Message object |
void |
setLen(int len)
Sets the length attribute of the X25Message object |
void |
setMbit(boolean mBit)
Sets the M-bit attribute of the X25Message object |
void |
setQbit(boolean qBit)
Sets the Q-bit attribute of the X25Message object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int len
protected boolean mBit
protected byte[] msg
protected boolean qBit
Constructor Detail |
public X25Message(byte[] msg)
false
msg
- buffer containg data to be sent, or in which received data will be placedpublic X25Message(byte[] msg, boolean qBit, boolean mBit)
msg
- buffer containg data to be sent, or in which received data will be placedqBit
- status of the Q-bit in the constructed messagemBit
- status of the M-bit in the constructed messagepublic X25Message(byte[] msg, int len, boolean qBit, boolean mBit)
msg
- buffer containg data to be sent, or in which received data will be placedlen
- length of data to be sent, or maximum length of data to be receivedqBit
- status of the Q-bit in the constructed messagemBit
- status of the M-bit in the constructed messageMethod Detail |
public int getLen()
X25Socket.send(com.ascert.comms.x25.X25Message)
operation this value should contain the length of the data to be sent from the msg
buffer. On initiation of a X25Socket.recv(com.ascert.comms.x25.X25Message)
operation this value should contain the maximum length of data to be received. On completion of the X25Socket.recv
operation the value will contain the actual number of bytes received.
setLen(int)
public boolean getMbit()
setMbit(boolean)
public byte[] getMsg()
public boolean getQbit()
setQbit(boolean)
public void setLen(int len)
len
- The new len valuegetLen()
public void setMbit(boolean mBit)
mBit
- The new M-bit valuegetMbit()
public void setQbit(boolean qBit)
qBit
- The new Q-bit valuegetQbit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |