|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Message
A Bayeux Message.
A Map of String to Object that has been optimized for conversion to JSON messages.
Even if this class implements Cloneable, it is not supported to deep clone
a message (mostly due to the fact that Object.clone() is broken in Java).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Deprecated. If you want a deep copy of a message, consider instantiating a new message object and populating it with deep copies of the fields of this message. A quicker alternative in case the fields of the messages are not known a priori or not easily deep copyable, is to convert this message to JSON and then back to a Message, functionality that is present in the Bayeux implementation. |
Message |
getAssociated()
When this message represent a response to a request message, this method returns the request message. |
java.lang.String |
getChannel()
Convenience method for message.get(Bayeux.CHANNEL_FIELD). |
java.lang.String |
getClientId()
Convenience method for message.get(Bayeux.CLIENT_FIELD). |
java.lang.Object |
getData()
Convenience method for message.get(Bayeux.DATA_FIELD). |
java.util.Map<java.lang.String,java.lang.Object> |
getExt(boolean create)
Returns the ext field of this message, optionally creating it. |
java.lang.String |
getId()
Convenience method for message.get(Bayeux.ID_FIELD). |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Method Detail |
|---|
java.lang.String getClientId()
message.get(Bayeux.CLIENT_FIELD).
java.lang.String getChannel()
message.get(Bayeux.CHANNEL_FIELD).
java.lang.String getId()
message.get(Bayeux.ID_FIELD).
java.lang.Object getData()
message.get(Bayeux.DATA_FIELD).
java.util.Map<java.lang.String,java.lang.Object> getExt(boolean create)
ext field of this message, optionally creating it.
create - whether the ext field should be created if it is absent.
Message getAssociated()
@Deprecated java.lang.Object clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||