ClientOptions class

Passes additional client-specific properties to the REST Rest.new or the Realtime Realtime.new

Inheritance

Properties

authCallback ↔ AuthCallback?
Called when a new token is required.
getter/setter pairinherited
authHeaders Map<String, String>?
A set of key-value pair headers to be added to any request made to the authUrl.
getter/setter pairinherited
authMethod String?
The HTTP verb to use for any request made to the authUrl, either GET or POST.
getter/setter pairinherited
authParams Map<String, String>?
A set of key-value pair params to be added to any request made to the authUrl.
getter/setter pairinherited
authUrl String?
A URL that the library may use to obtain a token string (in plain text format), or a signed TokenRequest or TokenDetails (in JSON format) from.
getter/setter pairinherited
autoConnect bool
Whether the client connects to Ably as soon as it is instantiated. You can set this to false and explicitly connect to Ably using the Connection.connect method. The default is true.
getter/setter pair
channelRetryTimeout int
When a channel becomes ChannelState.suspended following a server initiated ChannelState.detached, after this delay, if the channel is still ChannelState.suspended and the connection is ConnectionState.connected, the client library will attempt to re-attach the channel automatically. The default is 15000 miliseconds (15s).
getter/setter pair
clientId String?
A client ID, used for identifying this client when publishing messages or for presence purposes.
getter/setter pair
defaultTokenParams TokenParams?
When a TokenParams object is provided, it overrides the client library defaults when issuing new Ably Tokens or Ably TokenRequests.
getter/setter pair
disconnectedRetryTimeout int
If the connection is still in the ConnectionState.disconnected state after this delay, the client library will attempt to reconnect automatically. The default is 15000 miliseconds (15s).
getter/setter pair
echoMessages bool
Whether messages originating from this connection should be echoed back on the same connection. The default is true.
getter/setter pair
environment String?
Enables a custom environment to be used with the Ably service.
getter/setter pair
fallbackHosts List<String>?
A list of fallback hosts to be used in the case of an error necessitating the use of an alternative host.
getter/setter pair
fallbackHostsUseDefault bool?
DEPRECATED: this property is deprecated and will be removed in a future version. Enables default fallback hosts to be used.
getter/setter pair
fallbackRetryTimeout int
The maximum time before HTTP requests are retried against the default endpoint. The default is 600000 miliseconds (600s).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
httpMaxRetryCount int
The maximum number of fallback hosts to use as a fallback when an HTTP request to the primary host is unreachable or indicates that it is unserviceable. The default value is 3.
getter/setter pair
httpOpenTimeout int
Timeout for opening a connection to Ably to initiate an HTTP request. The default is 4000 miliseconds (4s).
getter/setter pair
httpRequestTimeout int
Timeout for a client performing a complete HTTP request to Ably, including the connection phase. The default is 10000 miliseconds (10s).
getter/setter pair
idempotentRestPublishing bool?
Whether idempotent publishing should be enabled.
getter/setter pair
key String?
The full API key string, as obtained from the Ably dashboard.
getter/setter pairinherited
logHandler LogHandler?
Controls the log output of the library. This is a function to handle each line of log output.
getter/setter pair
logLevel LogLevel
Controls the verbosity of the logs output from the library. Levels include verbose, debug, info, warn and error.
getter/setter pair
port int?
Enables a non-default Ably port to be specified. For development environments only.
getter/setter pair
queryTime bool?
Whether the library queries the Ably servers for the current time when issuing TokenRequests instead of relying on a locally-available time of day.
getter/setter pairinherited
queueMessages bool
Whether the default behavior whereby the library queues messages on a connection in the disconnected or connecting states is used.
getter/setter pair
realtimeHost String?
Enables a non-default Ably host to be specified for realtime connections. For development environments only.
getter/setter pair
realtimeRequestTimeout int?
Timeout for the wait of acknowledgement for operations performed via a realtime connection, before the client library considers a request failed and triggers a failure condition.
getter/setter pair
recover String?
Enables a connection to inherit the state of a previous connection that may have existed under a different instance of the Realtime library. This might typically be used by clients of the browser library to ensure connection state can be preserved when the user refreshes the page. A recovery key string can be explicitly provided, or alternatively if a callback function is provided, the client library will automatically persist the recovery key between page reloads and call the callback when the connection is recoverable. The callback is then responsible for confirming whether the connection should be recovered or not. See connection state recovery for further information.
getter/setter pair
restHost String?
Enables a non-default Ably host to be specified. For development environments only.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suspendedRetryTimeout int
When the connection enters the ConnectionState.suspended state, after this delay, if the state is still ConnectionState.suspended, the client library attempts to reconnect automatically. The default is 30000 miliseconds (30s).
getter/setter pair
tls bool
Whether the client will use a secure connection. The default is true, meaning a TLS connection will be used to connect to Ably.
getter/setter pair
tlsPort int?
Enables a non-default Ably TLS port to be specified. For development environments only.
getter/setter pair
tokenDetails TokenDetails?
An authenticated TokenDetails object (most commonly obtained from an Ably Token Request response).
getter/setter pairinherited
transportParams Map<String, String>?
A set of key-value pairs that can be used to pass in arbitrary connection parameters, such as heartbeatInterval or remainPresentFor.
getter/setter pair
useBinaryProtocol bool
Whether the more efficient MsgPack binary encoding is used. When false, JSON text encoding is used. The default is true.
getter/setter pair
useTokenAuth bool?
Whether library is forced to use token authentication.
getter/setter pairinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited