Listener - websub : Listener

Represents the WebSubSubscriber Service Listener.

Constructor

__init

(int port, SubscriberListenerConfiguration? config)

  • port int
  • The port number of the remote service

Methods

Stops consuming messages and detaches the service from the websub:Listener.
 error? result = websubListener.__detach(helloService);
Stops the websub:Listener gracefully.
 error? result = websubListener.__gracefulStop();
Stops the websub:Listener forcefully.
 error? result = websubListener.__immediateStop();

LifeCycle Methods

Binds a service to the websub:Listener.
 error? result = websubListener.__attach(helloService);
Starts the websub:Listener.
 error? result = websubListener.__start();

Fields

Methods

__detach

(service s)

returns error?
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 an error upon failure to detach the service

__gracefulStop

()

returns error?
Stops the websub:Listener gracefully.
 error? result = websubListener.__gracefulStop();
  • Return Type

    (error?)
  • () or else an error upon failure to stop the listener

__immediateStop

()

returns error?
Stops the websub:Listener forcefully.
 error? result = websubListener.__immediateStop();
  • Return Type

    (error?)
  • () or else an error upon failure to stop the listener

LifeCycle Methods

__attach

(service s, string? name)

returns error?
Binds a service to the websub:Listener.
 error? result = websubListener.__attach(helloService);

Parameters

  • s service
  • Type descriptor of the service

  • name string? (default ())
  • Name of the service

  • Return Type

    (error?)
  • () or else an error upon failure to register the listener

__start

()

returns error?
Starts the websub:Listener.
 error? result = websubListener.__start();
  • Return Type

    (error?)
  • () or else an error upon failure to start the listener