public interface PushConnection
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect(Command command)
Closes the push connection.
|
String |
getTransportType()
Returns a human readable string representation of the transport type used
to communicate with the server.
|
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.
|
void 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 pushIllegalStateException - 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 - command to invoke when the connection has been properly
disconnectedIllegalStateException - if this connection is not activeString getTransportType()
boolean isBidirectional()
Copyright © 2000–2019 Vaadin Ltd. All rights reserved.