dart_pusher_channels library
Public API library of this package
Classes
-
Channel<
T extends ChannelState> -
Receives and handles respective events delegated by
ChannelsManager
. - ChannelMembers
- Delagetes the members changes in an instance of Channel.
- ChannelReadEvent
- An implementation of PusherChannelsReadEvent that can be received from Channel.bind.
- ChannelState
- A base representation of a state Channel's instances
- ChannelTriggerEvent
-
An implementation of PusherChannelsTriggerEvent instances of which
can be triggered by
TriggerableChannelMixin.trigger
-
EndpointAuthorizableChannelAuthorizationDelegate<
T extends EndpointAuthorizationData> -
An interface for grabbing an authorization data of type
T
for the channel subscription process. -
EndpointAuthorizableChannelTokenAuthorizationDelegate<
T extends EndpointAuthorizationData> - Implements EndpointAuthorizableChannelAuthorizationDelegate to grab the authorization data from the authorizationEndpoint using the POST request powered by the http package.
- EndpointAuthorizationData
-
An interface for authorization data to be received
from by an instance of
EndpointAuthorizableChannel
. - MemberInfo
- A data class with the info about members of an instance of Channel
- PresenceChannel
-
Presence channels require users to authorized to subscribe it.
So that's why it extends
EndpointAuthorizableChannel
with PresenceChannelAuthorizationData and requires authorizationDelegate. - PresenceChannelAuthorizationData
- Authorization data that is expected to subscribe to the presence channels.
- PresenceChannelState
- A data class representing a state of PresenceChannel's instances.
- PrivateChannel
-
Private channels require users to authorized to subscribe it.
So that's why it extends
EndpointAuthorizableChannel
with PrivateChannelAuthorizationData and requires authorizationDelegate. - PrivateChannelAuthorizationData
- Authorization data that is expected to subscribe to the private channels.
- PrivateChannelState
- A data class representing a state of PrivateChannel's instances.
- PrivateEncryptedChannel
- IMPORTANT! Your server library has to support the encrypted channels feature in order to use this kind of channel.
- PrivateEncryptedChannelAuthorizationData
- The encrypted channels behave as the private channels when it comes to the authorization process. So they use authKey to subscribe, sharedSecret is used to decrypt the data of each incoming.
- PrivateEncryptedChannelState
- A data class representing a state of PrivateEncryptedChannel's instances.
- PublicChannel
- Public channels should be used for publicly accessible data as they do not require any form of authorization in order to be subscribed to.
- PublicChannelState
- A data class implementing ChannelState and representing a state of an instance of PublicChannel.
- PusherChannelsClient
- A centralized manager of connection and channel bindings.
- PusherChannelsConnection
- An interface that delegates connection of an instance of PusherChannelsClient with a server.
- PusherChannelsEvent
- A base data interface of events.
- PusherChannelsOptions
- Options passed to instances of PusherChannelsClient.
- PusherChannelsOptionsMetadata
- A data class that keeps metadata that is sent with PusherChannelsOptions.uri while connecting to a server.
- PusherChannelsPackageLogger
- An abstract singleton that logs different events of this package.
- PusherChannelsReadEvent
- A data class represents readable Pusher Channels events.
- PusherChannelsTriggerEvent
- A data class representing events that are triggered by PusherChannelsClient
- PusherChannelsWebSocketConnection
-
An implementation of PusherChannelsConnection through
WebSocketChannel
.
Enums
- ChannelStatus
- Represents a status of an instance of Channel
- PusherChannelsClientLifeCycleState
-
Represents a state of a lifecycle of
PusherChannelsClientLifeCycleController
's instances.
Extensions
Constants
- kDartPusherChannelsLibraryVersion → const String
-
Used to be passed as the
version
metadata by instances of PusherChannelsOptionsMetadata - kDefaultPusherChannelsHost → const String
- A default host that is used in PusherChannelsOptions.fromCluster factory constructor.
- kLatestAvailablePusherProtocol → const int
-
Used to be passed as the
protocol
metadata by instances of PusherChannelsOptionsMetadata - kPusherChannelsDefaultActivityDuration → const Duration
- A default activity duration that is used by instances of PusherChannelsClient in case if a server does not give the one when establishing connection.
- kPusherChannelsDefaultWaitForPongDuration → const Duration
-
A default interval duration used when waiting for the
pong
message from a server.
Typedefs
-
ChannelsManagerStreamGetter
= Stream<
ChannelReadEvent> Function() - EndpointAuthFailedCallback = void Function(dynamic exception, StackTrace trace)
-
EndpointAuthorizableChannelTokenAuthorizationParser<
T extends EndpointAuthorizationData> = FutureOr< T> Function(Response response) - LogHandler = void Function(Object? o)
- PrivateEncryptedChannelEventDataEncodeDelegate = String Function(Uint8List bytes)
- A delegate function used for encoding the decrypted message received from the server.
- PusherChannelsConnectionOnDoneCallback = void Function()
- PusherChannelsConnectionOnErrorCallback = void Function(dynamic error, StackTrace trace)
- PusherChannelsConnectionOnEventCallback = void Function(String event)
- PusherChannelsOptionsCustomUriResolver = Uri Function(PusherChannelsOptionsMetadata metadata)
Exceptions / Errors
- EndpointAuthorizableChannelTokenAuthorizationException
- EndpointAuthorizableChannelTokenAuthorizationDelegate will throw this exception if it gets irrelevant response from the authorizationEndpoint.
- PusherChannelsClientDisposedException
- PusherChannelsException
- A base exception class used across this package.
- PusherChannelsWebSocketConnectionWasClosedException