Listener - email : Listener

Represents a service listener that monitors the email server location.

Constructor

Gets invoked during the email:Listener initialization.



__init

(ListenerConfig listenerConfig)

Methods

Stops consuming messages and detaches the service from the email:Listener.

Stops the email:Listener forcefully.

Stops the email:Listener gracefully.

Registers for the Email service.

LifeCycle Methods

Starts the email:Listener.

Stops the email:Listener.

Binds a service to the email:Listener.

Methods

__detach

(service s)

returns error?

Stops consuming messages and detaches the service from the email:Listener.

 email:Error? result = emailListener.__detach(helloService);

Parameters

  • s service
  • Type descriptor of the service

  • Return Type

    (error?)
  • () or else a email:Error upon failure to detach the service

__immediateStop

()

returns error?

Stops the email:Listener forcefully.

 email:Error? result = emailListener.__immediateStop();
  • Return Type

    (error?)
  • () or else a email:Error upon failure to stop the listener

__gracefulStop

()

returns error?

Stops the email:Listener gracefully.

 email:Error? result = emailListener.__gracefulStop();
  • Return Type

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

register

(service emailService, string? name)

Registers for the Email service.

 emailListener.register(helloService, hello);

Parameters

  • emailService service
  • Type descriptor of the service

  • name string?
  • Service name

LifeCycle Methods

__start

()

returns error?

Starts the email:Listener.

 email:Error? result = emailListener.__start();
  • Return Type

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

__stop

()

returns error?

Stops the email:Listener.

 email:Error? result = emailListener.__stop();
  • Return Type

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

__attach

(service s, string? name)

returns error?

Binds a service to the email:Listener.

 email:Error? result = emailListener.__attach(helloService, hello);

Parameters

  • s service
  • Type descriptor of the service

  • name string?
  • Name of the service

  • Return Type

    (error?)
  • () or else a email:Error upon failure to register the listener