com.sun.grizzly.cometd.bayeux
Class Data
java.lang.Object
com.sun.grizzly.cometd.bayeux.VerbBase
com.sun.grizzly.cometd.bayeux.Data
- All Implemented Interfaces:
- Verb
public class Data
- extends VerbBase
Data representation of client/server interaction.
window.parent.cometd.deliver([
{
// user-sent data
"data": {
"someField": ["some", "random", "values"],
},
// the usual message meta-data
"channel": "/originating/channel",
// event ID
"id": "slkjdlkj32",
"timestamp": "TimeAtServer",
// optional meta-data
"authToken": "SOME_NONCE_THAT_NEEDS_TO_BE_PROVIDED_SUBSEQUENTLY"
},
{
"data": {
"blah blah": ["more", "random", "values"],
},
// the usual message meta-data
"channel": "/originating/channel",
// event ID
"id": "slkjdlkj31",
"timestamp": "TimeAtServer",
"authToken": "SOME_NONCE_THAT_NEEDS_TO_BE_PROVIDED_SUBSEQUENTLY"
}
// , ...
]);
- Author:
- Jeanfrancois Arcand
| Nested classes/interfaces inherited from interface com.sun.grizzly.cometd.bayeux.Verb |
Verb.Type |
| Fields inherited from class com.sun.grizzly.cometd.bayeux.VerbBase |
advice, authToken, channel, clientId, dataId, error, ext, first, follow, id, last, metaChannel, successful, type |
|
Constructor Summary |
Data()
|
|
Method Summary |
java.lang.String |
getConnectionId()
|
java.util.Map<java.lang.String,java.lang.Object> |
getMapData()
|
void |
setConnectionId(java.lang.String connectionId)
|
void |
setMapData(java.util.Map<java.lang.String,java.lang.Object> data)
|
java.lang.String |
toJSON()
Return the JSON representation of the Verb. |
| Methods inherited from class com.sun.grizzly.cometd.bayeux.VerbBase |
getAdvice, getAuthToken, getChannel, getClientId, getData, getDataId, getExt, getId, getJSONPostfix, getJSONPrefix, getMetaChannel, getType, hasValidAdvice, isFirst, isFollow, isLast, isValid, setAdvice, setAuthToken, setChannel, setClientId, setData, setDataId, setExt, setFirst, setFollow, setId, setLast, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Data
public Data()
getMapData
public java.util.Map<java.lang.String,java.lang.Object> getMapData()
setMapData
public void setMapData(java.util.Map<java.lang.String,java.lang.Object> data)
toJSON
public java.lang.String toJSON()
- Description copied from interface:
Verb
- Return the JSON representation of the Verb.
getConnectionId
public java.lang.String getConnectionId()
setConnectionId
public void setConnectionId(java.lang.String connectionId)
Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.