-
- All Implemented Interfaces:
-
io.ably.lib.transport.ITransport.ConnectListener
public class ConnectionManager implements ITransport.ConnectListener
*********************Actions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceConnectionManager.ChannelsMethods on the channels map owned by the AblyRealtime instancewhich the ConnectionManager needs access to.
public classConnectionManager.StateIndication*********************************a class encapsulating informationassociated with a currentState changerequest or notification
public abstract classConnectionManager.State***********************************a class encapsulating state machineinformation for a given state
public classConnectionManager.QueuedMessage****************event queueing
-
Field Summary
Fields Modifier and Type Field Description public longmsgSerialpublic intmaxMessageSize
-
Constructor Summary
Constructors Constructor Description ConnectionManager(AblyRealtime ably, Connection connection, ConnectionManager.Channels channels, PlatformAgentProvider platformAgentProvider, LiveObjectsPlugin liveObjectsPlugin)*********************ConnectionManager
-
Method Summary
Modifier and Type Method Description ErrorInfogetStateErrorInfo()booleanisActive()StringgetHost()*******************host management synchronized ConnectionManager.StategetConnectionState()*******************states API synchronized voidconnect()voidclose()voidrequestState(ConnectionState state)voidrequestState(ConnectionManager.StateIndication state)voidping(CompletionListener listener)*******************ping API voidonAuthUpdated(String token, boolean waitForResponse)(RTC8) For a realtime client, Auth.authorize instructs the library toobtain a token using the provided tokenParams and authOptions and upgradethe current connection to use that token; or if not currently connected,to connect with the token. voidonAuthUpdatedAsync(String token, Auth.AuthUpdateResult authUpdateResult)Async version of onAuthUpdated that returns a Future that includes an option Ably exception voidonAuthError(ErrorInfo errorInfo)Called when where was an error during authentication attempt voidonMessage(ITransport transport, ProtocolMessage message)React on message from the transport synchronized voidonTransportAvailable(ITransport transport)synchronized voidonTransportUnavailable(ITransport transport, ErrorInfo reason)voidsend(ProtocolMessage msg, boolean queueEvents, CompletionListener listener)-
-
Constructor Detail
-
ConnectionManager
ConnectionManager(AblyRealtime ably, Connection connection, ConnectionManager.Channels channels, PlatformAgentProvider platformAgentProvider, LiveObjectsPlugin liveObjectsPlugin)
*********************ConnectionManager
-
-
Method Detail
-
getStateErrorInfo
ErrorInfo getStateErrorInfo()
-
isActive
boolean isActive()
-
getConnectionState
synchronized ConnectionManager.State getConnectionState()
*******************states API
-
connect
synchronized void connect()
-
close
void close()
-
requestState
void requestState(ConnectionState state)
-
requestState
void requestState(ConnectionManager.StateIndication state)
-
ping
void ping(CompletionListener listener)
*******************ping API
-
onAuthUpdated
void onAuthUpdated(String token, boolean waitForResponse)
(RTC8) For a realtime client, Auth.authorize instructs the library toobtain a token using the provided tokenParams and authOptions and upgradethe current connection to use that token; or if not currently connected,to connect with the token.
-
onAuthUpdatedAsync
void onAuthUpdatedAsync(String token, Auth.AuthUpdateResult authUpdateResult)
Async version of onAuthUpdated that returns a Future that includes an option Ably exception
-
onAuthError
void onAuthError(ErrorInfo errorInfo)
Called when where was an error during authentication attempt
- Parameters:
errorInfo- Error associated with unsuccessful authentication
-
onMessage
void onMessage(ITransport transport, ProtocolMessage message)
React on message from the transport
- Parameters:
transport- transport instance or null to bypass transport correctness check (for testing)
-
onTransportAvailable
synchronized void onTransportAvailable(ITransport transport)
-
onTransportUnavailable
synchronized void onTransportUnavailable(ITransport transport, ErrorInfo reason)
-
send
void send(ProtocolMessage msg, boolean queueEvents, CompletionListener listener)
-
-
-
-