public class HubConnection extends Connection
mGson, mJsonParser, mState, PROTOCOL_VERSION| Constructor and Description |
|---|
HubConnection(String url)
Initialized the connection
|
HubConnection(String url,
boolean useDefaultUrl)
Initializes the connection
|
HubConnection(String url,
String queryString,
boolean useDefaultUrl,
Logger logger)
Initializes the connection
|
| Modifier and Type | Method and Description |
|---|---|
HubProxy |
createHubProxy(String hubName)
Creates a proxy for a hub
|
String |
getConnectionData()
Returns the data used by the connection
|
protected String |
getSourceNameForLog() |
protected void |
onClosed()
Triggers the Closed event
|
void |
onReceived(com.google.gson.JsonElement message) |
protected void |
onReconnecting()
Triggers the Reconnecting event
|
closed, connected, connectionSlow, disconnect, error, getConnectionId, getConnectionToken, getCredentials, getGroupsToken, getGson, getHeaders, getJsonParser, getLogger, getMessageId, getQueryString, getState, getUrl, log, log, onConnected, onError, onReconnected, prepareRequest, processMessage, received, reconnected, reconnecting, send, send, setClientCertificate, setCredentials, setGroupsToken, setGson, setMessageId, start, start, stateChanged, stoppublic HubConnection(String url, String queryString, boolean useDefaultUrl, Logger logger)
url - The connection URLqueryString - The connection query stringuseDefaultUrl - indicates if the default SignalR URL should be usedlogger - The connection loggerpublic HubConnection(String url)
url - The connection URLpublic HubConnection(String url, boolean useDefaultUrl)
url - The connection URLuseDefaultUrl - indicates if the default SignalR URL should be usedpublic void onReceived(com.google.gson.JsonElement message)
onReceived in interface ConnectionBaseonReceived in class Connectionpublic String getConnectionData()
ConnectionBasegetConnectionData in interface ConnectionBasegetConnectionData in class Connectionprotected void onClosed()
ConnectiononClosed in class Connectionprotected void onReconnecting()
ConnectiononReconnecting in class Connectionpublic HubProxy createHubProxy(String hubName)
hubName - The hub nameInvalidStateException - If called when not disconnected, the method will throw an
exceptionprotected String getSourceNameForLog()
getSourceNameForLog in class ConnectionCopyright © 2019. All rights reserved.