com.threerings.presents.net
Class Message

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.presents.net.Message
All Implemented Interfaces:
Streamable
Direct Known Subclasses:
DownstreamMessage, UpstreamMessage

public abstract class Message
extends SimpleStreamableObject

The superclass of UpstreamMessage and DownstreamMessage.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
 long received
          A timestamp indicating when this message was received from the network.
 
Constructor Summary
Message()
           
 
Method Summary
 Transport getTransport()
          Returns the message transport parameters.
 void noteActualTransport(Transport transport)
          For messages sent over the network, this notes the actual type of transport used to deliver the message.
 void setTransport(Transport transport)
          Sets the message transport parameters.
 
Methods inherited from class com.threerings.io.SimpleStreamableObject
toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

received

public transient long received
A timestamp indicating when this message was received from the network.

Constructor Detail

Message

public Message()
Method Detail

setTransport

public void setTransport(Transport transport)
Sets the message transport parameters. For messages received over the network, these describe the mode of transport over which the message was received. When sending messages, they act as a hint as to the type of transport desired. Calling this method may have no effect, depending on whether non-default modes of transport are supported for this message type.


getTransport

public Transport getTransport()
Returns the message transport parameters.


noteActualTransport

public void noteActualTransport(Transport transport)
For messages sent over the network, this notes the actual type of transport used to deliver the message. This may not be the same as the hinted transport for various reasons (message too large to send as datagram, no datagram connection established, etc.)