|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PushConnection
Represents the client-side endpoint of a bidirectional ("push") communication
channel. Can be used to send UIDL request messages to the server and to
receive UIDL messages from the server (either asynchronously or as a response
to a UIDL request.) Delegates the UIDL handling to the
ApplicationConnection.
| Method Summary | |
|---|---|
void |
disconnect(Command command)
Closes the push connection. |
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 pushConfigurationState)
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. |
void |
push(elemental.json.JsonObject payload)
Pushes a message to the server. |
| Method Detail |
|---|
void init(ApplicationConnection connection,
com.vaadin.shared.ui.ui.UIState.PushConfigurationState pushConfigurationState)
connection - The ApplicationConnectionvoid push(elemental.json.JsonObject payload)
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 isBidirectional() returns false)
payload - the payload to push
java.lang.IllegalStateException - if this connection is not activeisActive()boolean isActive()
disconnect(Command) has been called.
true if this connection can accept new messages;
false if this connection is disconnected or
disconnecting.void disconnect(Command command)
After this method has been called, isActive() returns
false. Calling this method for a connection that is no
longer active will throw an exception.
command - callback command invoked when the connection has been properly
disconnected
java.lang.IllegalStateException - if this connection is not activejava.lang.String getTransportType()
boolean isBidirectional()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||