org.cometd.bayeux.server
Interface ServerMessage

All Superinterfaces:
java.util.Map<java.lang.String,java.lang.Object>, Message
All Known Subinterfaces:
ServerMessage.Mutable

public interface ServerMessage
extends Message

Representation of server side message.


Nested Class Summary
static interface ServerMessage.Mutable
          Updateable ServerMessage
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface org.cometd.bayeux.Message
ADVICE_FIELD, CHANNEL_FIELD, CLIENT_FIELD, CONNECTION_TYPE_FIELD, DATA_FIELD, ERROR_FIELD, EXT_FIELD, ID_FIELD, INTERVAL_FIELD, MIN_VERSION_FIELD, RECONNECT_FIELD, RECONNECT_HANDSHAKE_VALUE, RECONNECT_NONE_VALUE, RECONNECT_RETRY_VALUE, SERVICE, SUBSCRIPTION_FIELD, SUCCESSFUL_FIELD, SUPPORTED_CONNECTION_TYPES_FIELD, TIMESTAMP_FIELD, TRANSPORT_FIELD, VERSION_FIELD
 
Method Summary
 ServerMessage.Mutable asMutable()
           
 void decRef()
          Decrement reference for the messsage.
 ServerMessage getAssociated()
           
 void incRef()
          Increment reference count for the messsage.
 boolean isLazy()
           
 
Methods inherited from interface org.cometd.bayeux.Message
getAdvice, getChannel, getClientId, getData, getDataAsMap, getExt, getId, getJSON, isMeta, isSuccessful
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getAssociated

ServerMessage getAssociated()
Returns:
A message associated with this message on the server. Typically this is a meta message that the current message is being sent in response to.

isLazy

boolean isLazy()
Returns:
True if the message is lazy and should not force a sessions queue to be flushed.

incRef

void incRef()
Increment reference count for the messsage. If a reference to a message is to be kept longer than the calling scope into which a message was passed, then the holder of the reference should call incRef() to avoid the message being cleared and pooled.


decRef

void decRef()
Decrement reference for the messsage. If a reference to a message is to be kept longer than the calling scope into which a message was passed, then the holder of the reference should call decRef() once the reference is cleared, so the message can be cleared and pooled.


asMutable

ServerMessage.Mutable asMutable()


Copyright © 2010 Dojo Foundation. All Rights Reserved.