com.sun.grizzly.cometd.bayeux
Class Reconnect

java.lang.Object
  extended by com.sun.grizzly.cometd.bayeux.VerbBase
      extended by com.sun.grizzly.cometd.bayeux.Connect
          extended by com.sun.grizzly.cometd.bayeux.Reconnect
All Implemented Interfaces:
Verb
Direct Known Subclasses:
ReconnectRequest, ReconnectResponse

public abstract class Reconnect
extends Connect

Bayeux Reconnect implementation. See http://svn.xantus.org/shortbus/trunk/bayeux/protocol.txt for the technical details. Upon connection, clients are implicitly subscribed to a connection-specific channel located at: /meta/clients/[SOME_UNIQUE_CLIENT_ID] The client ID is used in reconnection. The reconnect verb allows occasionally connected clients and the posting of messages for pre-authenticated systems. // reconnection is very similar to initial connection: //----------------- // CLIENT -> SERVER //----------------- [ { "channel": "/meta/reconnect", "clientId": "SOME_UNIQUE_CLIENT_ID", "timestamp": "LastReceivedTimeAtServer", "id": "LastReceivedMessageId" "connectionId": "/meta/connections/26", "connectionType": "iframe", // FIXME: is this necessaray? // optional "authToken": "SOME_NONCE_PREVIOUSLY_PROVIDED_BY_SERVER" } // , ... ] // generally, the first message in the array of responded messages will // begin with: //----------------- // SERVER -> CLIENT //----------------- [ { "channel": "/meta/reconnect", "connectionId": "/meta/connections/26", "successful": true, // optional "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
static String META_RECONNECT
           
 
Fields inherited from class com.sun.grizzly.cometd.bayeux.Connect
connectionType, DATA_WRAPPER_FOOTER, DATA_WRAPPER_HEADER, HTML_HEADER, META_CONNECT
 
Fields inherited from class com.sun.grizzly.cometd.bayeux.VerbBase
advice, authToken, channel, clientId, data, dataId, error, ext, first, follow, id, last, metaChannel, successful, type
 
Constructor Summary
Reconnect()
           
 
Method Summary
 String toJSON()
          Return the JSON representation of the Verb.
 String toJSON(String timestamp)
           
 
Methods inherited from class com.sun.grizzly.cometd.bayeux.Connect
isValid
 
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, 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
 

Field Detail

META_RECONNECT

public static final String META_RECONNECT
See Also:
Constant Field Values
Constructor Detail

Reconnect

public Reconnect()
Method Detail

toJSON

public String toJSON()
Description copied from interface: Verb
Return the JSON representation of the Verb.


toJSON

public String toJSON(String timestamp)


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.