Listener -
websub
: Listener
Represents the WebSubSubscriber Service Listener.
Constructor
__init
(int port, SubscriberListenerConfiguration? config)
- port int
-
The port number of the remote service
- config SubscriberListenerConfiguration? <ballerina/websub:SubscriberListenerConfiguration?> ()
-
The configurations related to the
websub:Listener
Methods
Stops consuming messages and detaches the service from the
websub:Listener
.
Stops the
websub:Listener
gracefully.
Stops the
websub:Listener
forcefully.
LifeCycle Methods
Fields
- config SubscriberListenerConfiguration? (default ())
-
The configurations for the
websub:Listener
Methods
Stops consuming messages and detaches the service from the
websub:Listener
.
error? result = websubListener.__detach(helloService);
Parameters
- s service
-
Type descriptor of the service
-
Return Type
(error?) ()
or else anerror
upon failure to detach the service
Stops the
websub:Listener
gracefully.
error? result = websubListener.__gracefulStop();
-
Return Type
(error?) ()
or else anerror
upon failure to stop the listener
Stops the
websub:Listener
forcefully.
error? result = websubListener.__immediateStop();
-
Return Type
(error?) () or else an
error
upon failure to stop the listener
LifeCycle Methods
Binds a service to the
websub:Listener
.
error? result = websubListener.__attach(helloService);
Parameters
- s service
-
Type descriptor of the service
- name string? (default <string?> ())
-
Name of the service
-
Return Type
(error?) ()
or else anerror
upon failure to register the listener