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, dataId, error, ext, first, follow, id, last, successful, type |
Constructor Summary |
Data()
|
Methods inherited from class com.sun.grizzly.cometd.bayeux.VerbBase |
getAdvice, getAuthToken, getChannel, getData, getDataId, getExt, getId, getJSONPostfix, getJSONPrefix, getType, hasValidAdvice, isFirst, isFollow, isLast, isValid, setAdvice, setAuthToken, setChannel, setData, setDataId, setExt, setFirst, setFollow, setId, setLast, toString |
Data
public Data()
getMapData
public Map<String,Object> getMapData()
setMapData
public void setMapData(Map<String,Object> data)
toJSON
public String toJSON()
- Description copied from interface:
Verb
- Return the JSON representation of the Verb.
getConnectionId
public String getConnectionId()
setConnectionId
public void setConnectionId(String connectionId)
getClientId
public String getClientId()
setClientId
public void setClientId(String clientId)
Copyright © 2008 SUN Microsystems. All Rights Reserved.