|
||||||||||
| 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,
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. |
void |
push(JSONObject payload)
Pushes a message to the server. |
| Method Detail |
|---|
void init(ApplicationConnection connection,
com.vaadin.shared.ui.ui.UIState.PushConfigurationState pushConfigurationState,
ApplicationConnection.CommunicationErrorHandler errorHandler)
connection - The ApplicationConnectionvoid push(JSONObject payload)
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.
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||