Listener - file : Listener

Represents the directory listener endpoint, which is used to listen to a directory in the local file system.

Constructor

__init

(ListenerConfig listenerConfig)

  • listenerConfig ListenerConfig
  • The ListenerConfig record with the directory details

Methods

Stops the file:Listener gracefully.

Stops the file:Listener forcefully.

Stops listening to the directory and detaches the service from the file:Listener.

LifeCycle Methods

Starts the file:Listener.

Binds a service to the file:Listener.

Methods

__gracefulStop

()

returns error?

Stops the file:Listener gracefully.

  • Return Type

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

__immediateStop

()

returns error?

Stops the file:Listener forcefully.

  • Return Type

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

__detach

(service s)

returns error?

Stops listening to the directory and detaches the service from the file:Listener.

Parameters

  • s service
  • Type descriptor of the service

  • Return Type

    (error?)
  • () or else error upon failure to detach to the service

LifeCycle Methods

__start

()

returns error?

Starts the file:Listener.

  • Return Type

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

__attach

(service s, string? name)

returns error?

Binds a service to the file:Listener.

Parameters

  • s service
  • Type descriptor of the service

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

  • Return Type

    (error?)
  • () or else error upon failure to attach to the service