|
||||||||||
| 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)
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. |
boolean |
isBidirectional()
Checks whether this push connection should be used for communication in both directions or if an XHR should be used for client to server communication. |
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(elemental.json.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)
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 boolean isBidirectional()
PushConnection
isBidirectional in interface PushConnectionpublic void push(elemental.json.JsonObject message)
PushConnectionPushConnection.isActive()).
Implementation detail: If the push connection is not connected and the
message can thus not be sent, the implementation must call
ConnectionStateHandler.pushNotConnected(JsonObject), which
will retry the send later.
This method must not be called if the push connection is not
bidirectional (if PushConnection.isBidirectional() returns false)
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 | |||||||||