|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectionStateHandler
Interface for handling problems and other events which occur during
communication with the server.
The handler is responsible for handling any problem in XHR, heartbeat and
push connections in a way it sees fit. The default implementation is
DefaultConnectionStateHandler.
| Method Summary | |
|---|---|
void |
configurationUpdated()
Called when some part of the reconnect dialog configuration has been changed. |
void |
heartbeatException(Request request,
java.lang.Throwable exception)
Called when an exception occurs during a Heartbeat request |
void |
heartbeatInvalidStatusCode(Request request,
Response response)
Called when a heartbeat request returns a status code other than OK (200) |
void |
heartbeatOk()
Called when a Heartbeat request succeeds |
void |
pushClientTimeout(PushConnection pushConnection,
JavaScriptObject response)
Called when a client side timeout occurs before a push connection to the server completes. |
void |
pushClosed(PushConnection pushConnection,
JavaScriptObject responseObject)
Called when the push connection to the server is closed. |
void |
pushError(PushConnection pushConnection,
JavaScriptObject response)
Called when a fatal error fatal error occurs in the push connection. |
void |
pushInvalidContent(PushConnection pushConnection,
java.lang.String message)
Called when invalid content (not JSON) was pushed from the server through the push connection |
void |
pushNotConnected(elemental.json.JsonObject payload)
Called when a message is to be sent to the server through the push channel but the push channel is not connected |
void |
pushOk(PushConnection pushConnection)
Called when the push connection to the server has been established. |
void |
pushReconnectPending(PushConnection pushConnection)
Called when the push connection has lost the connection to the server and will proceed to try to re-establish the connection |
void |
pushScriptLoadError(java.lang.String resourceUrl)
Called when the required push script could not be loaded |
void |
setConnection(ApplicationConnection connection)
Sets the application connection this instance is connected to. |
void |
xhrException(XhrConnectionError xhrConnectionError)
Called when an exception occurs during an XmlHttpRequest request to the server. |
void |
xhrInvalidContent(XhrConnectionError xhrConnectionError)
Called when invalid content (not JSON) was returned from the server as the result of an XmlHttpRequest request |
void |
xhrInvalidStatusCode(XhrConnectionError xhrConnectionError)
Called when invalid status code (not 200) was returned by the server as the result of an XmlHttpRequest. |
void |
xhrOk()
Called whenever a XmlHttpRequest to the server completes successfully |
| Method Detail |
|---|
void setConnection(ApplicationConnection connection)
connection - the application connection this instance is connected to
void heartbeatException(Request request,
java.lang.Throwable exception)
Heartbeat request
request - The heartbeat requestexception - The exception which occurred
void heartbeatInvalidStatusCode(Request request,
Response response)
request - The heartbeat requestresponse - The heartbeat responsevoid heartbeatOk()
Heartbeat request succeeds
void pushClosed(PushConnection pushConnection,
JavaScriptObject responseObject)
pushConnection - The push connection which was closedresponse - An object containing response data
void pushClientTimeout(PushConnection pushConnection,
JavaScriptObject response)
pushConnection - The push connection which timed outresponse - An object containing response data
void pushError(PushConnection pushConnection,
JavaScriptObject response)
pushConnection - The push connection where the error occurredresponse - An object containing response datavoid pushReconnectPending(PushConnection pushConnection)
pushConnection - The push connection which will be reconnectedvoid pushOk(PushConnection pushConnection)
pushConnection - The push connection which was establishedvoid pushScriptLoadError(java.lang.String resourceUrl)
resourceUrl - The URL which was used for loading the scriptvoid xhrException(XhrConnectionError xhrConnectionError)
xhrConnectionError - An event containing what was being sent to the server and what
exception occurredvoid xhrInvalidContent(XhrConnectionError xhrConnectionError)
communicationProblemEvent - An event containing what was being sent to the server and what
was returnedvoid xhrInvalidStatusCode(XhrConnectionError xhrConnectionError)
communicationProblemEvent - An event containing what was being sent to the server and what
was returnedvoid xhrOk()
void pushNotConnected(elemental.json.JsonObject payload)
payload - The payload to send to the server
void pushInvalidContent(PushConnection pushConnection,
java.lang.String message)
communicationProblemEvent - An event containing what was being sent to the server and what
was returnedvoid configurationUpdated()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||