com.sun.grizzly.cometd.bayeux
Class Data

java.lang.Object
  extended by com.sun.grizzly.cometd.bayeux.VerbBase
      extended by 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 Class Summary
 
Nested classes/interfaces inherited from interface com.sun.grizzly.cometd.bayeux.Verb
Verb.Type
 
Field Summary
 
Fields inherited from class com.sun.grizzly.cometd.bayeux.VerbBase
advice, ARRAY_END, ARRAY_START, authToken, channel, clientId, dataId, error, ext, first, follow, id, last, metaChannel, successful, type
 
Constructor Summary
Data()
           
 
Method Summary
 String getConnectionId()
           
 Map<String,Object> getMapData()
           
 void setConnectionId(String connectionId)
           
 void setMapData(Map<String,Object> data)
           
 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
 

Constructor Detail

Data

public Data()
Method Detail

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)


Copyright © 2012 Oracle Corporation. All Rights Reserved.