com.threerings.presents.net
Class UpstreamMessage
java.lang.Object
com.threerings.io.SimpleStreamableObject
com.threerings.presents.net.Message
com.threerings.presents.net.UpstreamMessage
- All Implemented Interfaces:
- Streamable
- Direct Known Subclasses:
- AuthRequest, BlockingCommunicator.TerminationMessage, CompoundUpstreamMessage, ForwardEventRequest, LogoffRequest, PingRequest, SubscribeRequest, ThrottleUpdatedMessage, TransmitDatagramsRequest, UnsubscribeRequest
public abstract class UpstreamMessage
- extends Message
This class encapsulates a message in the distributed object protocol that flows from the client
to the server. Upstream messages include object subscription, event forwarding and session
management.
|
Field Summary |
protected static short |
_nextMessageId
This is used to generate monotonically increasing message ids on the client as new messages
are generated. |
short |
messageId
This is a unique (within the context of a reasonable period of time) identifier assigned to
each upstream message. |
|
Constructor Summary |
UpstreamMessage()
Each upstream message derived class must provide a zero argument constructor so that it can
be unserialized when read from the network. |
|
Method Summary |
protected static short |
nextMessageId()
Returns the next message id suitable for use by an upstream message. |
String |
toString()
|
messageId
public short messageId
- This is a unique (within the context of a reasonable period of time) identifier assigned to
each upstream message. The message ids are used to correlate a downstream response message
to the appropriate upstream request message.
_nextMessageId
protected static short _nextMessageId
- This is used to generate monotonically increasing message ids on the client as new messages
are generated.
UpstreamMessage
public UpstreamMessage()
- Each upstream message derived class must provide a zero argument constructor so that it can
be unserialized when read from the network.
toString
public String toString()
- Overrides:
toString in class SimpleStreamableObject
nextMessageId
protected static short nextMessageId()
- Returns the next message id suitable for use by an upstream message.