HubConsumerService<THub extends EventHubService> class abstract

A service consuming and processing EventHub events.

To listen to events of a specific socket override the initialize method and call listen with the socket and a handler as arguments. The member field hub provides the instance of the specified hub type from the current service scope.

See: EventHubService

Inheritance

Constructors

HubConsumerService([String? path])

Properties

configPath ConfigPath?
finalinherited
environment Environment
Fetch the environment configuration from ConfigService.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hub → THub
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

config<T>(String path) → T
Fetches a configuration value from ConfigService.
inherited
configObject<T extends TransferObjectBase>(String path, TransferBean<T> bean) → T
Fetches a configuration value from ConfigService and parse it into the TransferObject.
inherited
initialize() Future<void>
inherited
listen<TEvent>(HubEventSocket<TEvent> hubSocket, FutureOr<void> listener(TEvent event), {int? prefetch}) → void
Subscribes to a HubEventSocket.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() Future<void>
override
toString() String
A string representation of this object.
inherited

Operators

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