|
||||||||||
| 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.TversionMessage
public class TversionMessage
Message sent to negotiate the protocol version and maximum message size of a Styx Connection
| Field Summary |
|---|
| Fields inherited from class uk.ac.rdg.resc.jstyx.messages.StyxMessage |
|---|
buf, length, lock, name, tag, type |
| Constructor Summary | |
|---|---|
TversionMessage()
Default constructor, sets version to "9P2000" and maximum message size to 8216 (so that 8192 bytes can be read or written with a Tread/Twrite) |
|
TversionMessage(int length,
short type,
int tag)
Creates a new TversionMessage. |
|
TversionMessage(long maxMessageSize)
Creates a new TversionMessage, with the supplied maximum message size. |
|
TversionMessage(long maxMessageSize,
java.lang.String protocolVersion)
Creates a new TversionMessage, with the supplied maximum message size and version string. |
|
| Method Summary | |
|---|---|
protected void |
decodeBody(StyxBuffer styxBuf)
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. |
protected void |
encodeBody(StyxBuffer styxBuf)
Encode the body of the message into bytes in the underlying buffer |
protected java.lang.String |
getElements()
|
long |
getMaxMessageSize()
|
java.lang.String |
getVersion()
|
void |
setMaxMessageSize(long maxMessageSize)
|
void |
setVersion(java.lang.String version)
|
java.lang.String |
toFriendlyString()
|
| Methods inherited from class uk.ac.rdg.resc.jstyx.messages.StyxMessage |
|---|
createStyxMessage, dispose, 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 TversionMessage(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 TversionMessage()
public TversionMessage(long maxMessageSize)
maxMessageSize - The requested maximum size of a message that will
be sent on this connection by either party
public TversionMessage(long maxMessageSize,
java.lang.String protocolVersion)
maxMessageSize - The requested maximum size of a message that will
be sent on this connection by either partyprotocolVersion - The version string (Should always be "9P2000")| Method Detail |
|---|
protected final void decodeBody(StyxBuffer styxBuf)
StyxMessage
decodeBody in class StyxMessageprotected final void encodeBody(StyxBuffer styxBuf)
StyxMessage
encodeBody in class StyxMessagepublic long getMaxMessageSize()
public void setMaxMessageSize(long maxMessageSize)
maxMessageSize - The requested maximum size of a message that will
be sent on this connection by either partypublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version - The version string (normally "9P2000")protected 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 | |||||||||