|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.communication.AtmospherePushConnection
public class AtmospherePushConnection
The default PushConnection implementation that uses Atmosphere for
handling the communication channel.
| Nested Class Summary | |
|---|---|
static class |
AtmospherePushConnection.AbstractJSO
|
static class |
AtmospherePushConnection.AtmosphereConfiguration
|
static class |
AtmospherePushConnection.AtmosphereResponse
|
protected static class |
AtmospherePushConnection.FragmentedMessage
Represents a message that should be sent as multiple fragments. |
protected static class |
AtmospherePushConnection.State
|
| Constructor Summary | |
|---|---|
AtmospherePushConnection()
|
|
| Method Summary | |
|---|---|
protected AtmospherePushConnection.AtmosphereConfiguration |
createConfig()
|
void |
disconnect(Command command)
Closes the push connection. |
protected AtmospherePushConnection.AtmosphereConfiguration |
getConfig()
|
java.lang.String |
getTransportType()
Returns a human readable string representation of the transport type used to communicate with the server. |
void |
init(ApplicationConnection connection,
com.vaadin.shared.ui.ui.UIState.PushConfigurationState pushConfiguration,
ApplicationConnection.CommunicationErrorHandler errorHandler)
Two-phase construction to allow using GWT.create(). |
boolean |
isActive()
Checks whether this push connection is in a state where it can push messages to the server. |
protected void |
onClientTimeout(AtmospherePushConnection.AtmosphereResponse response)
|
protected void |
onClose(AtmospherePushConnection.AtmosphereResponse response)
|
protected void |
onConnect(AtmospherePushConnection.AtmosphereResponse response)
Called whenever a server push connection is established (or re-established). |
protected void |
onError(AtmospherePushConnection.AtmosphereResponse response)
Called if the push connection fails. |
protected void |
onMessage(AtmospherePushConnection.AtmosphereResponse response)
|
protected void |
onOpen(AtmospherePushConnection.AtmosphereResponse response)
|
protected void |
onReconnect(JavaScriptObject request,
AtmospherePushConnection.AtmosphereResponse response)
|
protected void |
onReopen(AtmospherePushConnection.AtmosphereResponse response)
|
protected void |
onTransportFailure()
Called if the transport mechanism cannot be used and the fallback will be tried |
void |
push(JSONObject message)
Pushes a message to the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AtmospherePushConnection()
| Method Detail |
|---|
public void init(ApplicationConnection connection,
com.vaadin.shared.ui.ui.UIState.PushConfigurationState pushConfiguration,
ApplicationConnection.CommunicationErrorHandler errorHandler)
PushConnection
init in interface PushConnectionconnection - The ApplicationConnectionpublic boolean isActive()
PushConnectionPushConnection.disconnect(Command) has been called.
isActive in interface PushConnectiontrue if this connection can accept new messages;
false if this connection is disconnected or
disconnecting.public void push(JSONObject message)
PushConnectionPushConnection.isActive()).
Implementation detail: The implementation is responsible for queuing
messages that are pushed after #init(ApplicationConnection) has
been called but before the connection has internally been set up and then
replay those messages in the original order when the connection has been
established.
push in interface PushConnectionmessage - the payload to pushPushConnection.isActive()protected AtmospherePushConnection.AtmosphereConfiguration getConfig()
protected void onReopen(AtmospherePushConnection.AtmosphereResponse response)
protected void onOpen(AtmospherePushConnection.AtmosphereResponse response)
protected void onConnect(AtmospherePushConnection.AtmosphereResponse response)
response - public void disconnect(Command command)
PushConnection
After this method has been called, PushConnection.isActive() returns
false. Calling this method for a connection that is no
longer active will throw an exception.
disconnect in interface PushConnectioncommand - callback command invoked when the connection has been properly
disconnectedprotected void onMessage(AtmospherePushConnection.AtmosphereResponse response)
protected void onTransportFailure()
protected void onError(AtmospherePushConnection.AtmosphereResponse response)
protected void onClose(AtmospherePushConnection.AtmosphereResponse response)
protected void onClientTimeout(AtmospherePushConnection.AtmosphereResponse response)
protected void onReconnect(JavaScriptObject request,
AtmospherePushConnection.AtmosphereResponse response)
protected AtmospherePushConnection.AtmosphereConfiguration createConfig()
public java.lang.String getTransportType()
PushConnection
getTransportType in interface PushConnection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||