com.sun.grizzly.cometd.bayeux
Class Reconnect
java.lang.Object
com.sun.grizzly.cometd.bayeux.VerbBase
com.sun.grizzly.cometd.bayeux.Connect
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 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, data, dataId, error, ext, first, follow, id, last, metaChannel, successful, type |
| 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 |
META_RECONNECT
public static final String META_RECONNECT
- See Also:
- Constant Field Values
Reconnect
public Reconnect()
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.