public interface ConnectionBase
Modifier and Type | Method and Description |
---|---|
void |
closed(java.lang.Runnable handler)
Sets the handler for the "Closed" event
|
void |
connected(java.lang.Runnable handler)
Sets the handler for the "Connected" event
|
void |
connectionSlow(java.lang.Runnable handler)
Sets the handler for the "ConnectionSlow" event
|
void |
disconnect()
Closes the connection
|
void |
error(ErrorCallback handler)
Sets the handler for the "Error" event
|
java.lang.String |
getConnectionData()
Returns the data used by the connection
|
java.lang.String |
getConnectionId()
Returns the connection Id
|
java.lang.String |
getConnectionToken()
Returns the connection token
|
Credentials |
getCredentials()
Returns the credentials used by the connection
|
java.lang.String |
getGroupsToken()
Returns the connection groups token
|
com.google.gson.Gson |
getGson()
Returns the Gson instance used by the connection
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Returns the connection headers
|
com.google.gson.JsonParser |
getJsonParser()
Returns the JsonParser used by the connection
|
Logger |
getLogger()
Returns the Logger used by the connection
|
java.lang.String |
getMessageId()
Returns the current message Id
|
java.lang.String |
getQueryString()
Returns the query string used by the connection
|
ConnectionState |
getState()
Returns the connection state
|
java.lang.String |
getUrl()
Returns the URL used by the connection
|
void |
onError(java.lang.Throwable error,
boolean mustCleanCurrentConnection)
Triggers the Error event
|
void |
onReceived(com.google.gson.JsonElement message) |
void |
prepareRequest(microsoft.aspnet.signalr.client.http.Request request)
Prepares a request that is going to be sent to the server
|
void |
received(MessageReceivedHandler handler)
Sets the handler for the "Received" event
|
void |
reconnected(java.lang.Runnable handler)
Sets the handler for the "Reconnected" event
|
void |
reconnecting(java.lang.Runnable handler)
Sets the handler for the "Reconnecting" event
|
SignalRFuture<java.lang.Void> |
send(java.lang.String data)
Sends data using the connection
|
void |
setCredentials(Credentials credentials)
Sets the credentials the connection should use
|
void |
setGroupsToken(java.lang.String groupsToken)
Sets the groups token the connection should use
|
void |
setMessageId(java.lang.String messageId)
Sets the message id the connection should use
|
SignalRFuture<java.lang.Void> |
start(microsoft.aspnet.signalr.client.transport.ClientTransport transport)
Starts the connection
|
void |
stateChanged(StateChangedCallback handler)
Sets the handler for the "StateChanged" event
|
void |
stop()
Aborts the connection and closes it
|
void closed(java.lang.Runnable handler)
void connected(java.lang.Runnable handler)
void connectionSlow(java.lang.Runnable handler)
void disconnect()
void error(ErrorCallback handler)
java.lang.String getConnectionData()
java.lang.String getConnectionId()
java.lang.String getConnectionToken()
Credentials getCredentials()
java.lang.String getGroupsToken()
com.google.gson.Gson getGson()
java.util.Map<java.lang.String,java.lang.String> getHeaders()
com.google.gson.JsonParser getJsonParser()
Logger getLogger()
java.lang.String getMessageId()
java.lang.String getQueryString()
ConnectionState getState()
java.lang.String getUrl()
void onError(java.lang.Throwable error, boolean mustCleanCurrentConnection)
error
- The error that triggered the eventmustCleanCurrentConnection
- True if the connection must be cleanedvoid onReceived(com.google.gson.JsonElement message)
void prepareRequest(microsoft.aspnet.signalr.client.http.Request request)
request
- The request to preparevoid received(MessageReceivedHandler handler)
void reconnected(java.lang.Runnable handler)
void reconnecting(java.lang.Runnable handler)
SignalRFuture<java.lang.Void> send(java.lang.String data)
data
- Data to sendvoid setCredentials(Credentials credentials)
void setGroupsToken(java.lang.String groupsToken)
void setMessageId(java.lang.String messageId)
SignalRFuture<java.lang.Void> start(microsoft.aspnet.signalr.client.transport.ClientTransport transport)
transport
- Transport to be used by the connectionvoid stateChanged(StateChangedCallback handler)
void stop()