|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.rdg.resc.jstyx.messages.StyxMessage
uk.ac.rdg.resc.jstyx.messages.RreadMessage
public class RreadMessage
Message returned by the server in response to a TreadMessage
| Field Summary |
|---|
| Fields inherited from class uk.ac.rdg.resc.jstyx.messages.StyxMessage |
|---|
buf, length, lock, name, tag, type |
| Constructor Summary | |
|---|---|
RreadMessage(byte[] bytes)
Creates an RreadMessage from the given byte array |
|
RreadMessage(byte[] bytes,
int pos,
int count)
Creates an RreadMessage from the given byte array. |
|
RreadMessage(org.apache.mina.common.ByteBuffer data)
Creates an RreadMessage from the given org.apache.mina.common.ByteBuffer. |
|
RreadMessage(int length,
short type,
int tag)
Creates a new RversionMessage |
|
| Method Summary | |
|---|---|
protected void |
decodeBody(StyxBuffer buf)
Called when a complete message has arrived; signals that we are ready to interpret the raw bytes in the buffer and turn them into meaningful information. |
void |
dispose()
This is called after the message has been sent (in StyxServerProtocolHandler.messageSent(). |
protected void |
encodeBody(StyxBuffer buf)
Writes the message into the given StyxBuffer. |
int |
getCount()
|
org.apache.mina.common.ByteBuffer |
getData()
|
protected java.lang.String |
getElements()
|
java.lang.String |
toFriendlyString()
|
| Methods inherited from class uk.ac.rdg.resc.jstyx.messages.StyxMessage |
|---|
createStyxMessage, encode, getBuffer, getFid, getLength, getName, getTag, getType, readBytesFrom, setTag, toString, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RreadMessage(int length,
short type,
int tag)
length - The total length of the message (including all header info)type - The type of the message (a number between 100 and 127)tag - The tag that identifies this messagepublic RreadMessage(byte[] bytes)
public RreadMessage(byte[] bytes,
int pos,
int count)
count bytes, starting at position pos in the
given array
java.lang.IllegalArgumentException - if pos + count > bytes.lengthpublic RreadMessage(org.apache.mina.common.ByteBuffer data)
| Method Detail |
|---|
protected final void decodeBody(StyxBuffer buf)
throws org.apache.mina.protocol.ProtocolViolationException
StyxMessage
decodeBody in class StyxMessageorg.apache.mina.protocol.ProtocolViolationException - if the payload of the message is more
than Integer.MAX_VALUEprotected final void encodeBody(StyxBuffer buf)
encodeBody in class StyxMessagepublic org.apache.mina.common.ByteBuffer getData()
public int getCount()
public void dispose()
dispose in class StyxMessageprotected java.lang.String getElements()
getElements in class StyxMessagepublic java.lang.String toFriendlyString()
toFriendlyString in class StyxMessage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||