Listener: Listener
Represents a Subscriber Service listener endpoint.
Constructor
Invoked during the initialization of a websub:Listener
. Either an http:Listener
or a port number must be
provided to initialize the listener.
init (int | Listener listenTo, *ListenerConfiguration config)
- config *ListenerConfiguration
websub:ListenerConfiguration
to be provided to underlying HTTP Listener
LifeCycle Methods
attach | Attaches the provided Service to the Listener. |
Methods
attachWithConfig | Setup the provided Service with given configurations and attaches it to the listener |
detach | Detaches the provided Service from the Listener. |
'start | Starts the attached Service. |
gracefulStop | Gracefully stops the hub listener. |
immediateStop | Stops the service listener immediately. |
attach
function attach(SubscriberService subscriberService, string[ ] | string? name) returns error?
Attaches the provided Service to the Listener.
Parameters
- subscriberService SubscriberService
The websub:SubscriberService
object to attach
attachWithConfig
function attachWithConfig(SubscriberService subscriberService, SubscriberServiceConfiguration configuration, string[ ] | string? name) returns error?
Setup the provided Service with given configurations and attaches it to the listener
Parameters
- subscriberService SubscriberService
The websub:SubscriberService
object to attach
- configuration SubscriberServiceConfiguration
SubscriberServiceConfiguration
which should be incorporated into the provided Service
detach
function detach(SubscriberService s) returns error?
Detaches the provided Service from the Listener.
Parameters
- s SubscriberService
The service to be detached