Listener: Listener

Isolated

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

Constructor

Creates a new Directory listener.

init (ListenerConfig listenerConfig)
  • listenerConfig ListenerConfig
  • The ListenerConfig record with the directory details

LifeCycle Methods

attach

Binds a service to the file:Listener.

Methods

'start

Starts the file:Listener.

gracefulStop

Stops the file:Listener gracefully.

immediateStop

Stops the file:Listener forcefully.

detach

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

attach

function attach(service object {}  s, string[ ] | string? name) returns error?
Isolated Function

Binds a service to the file:Listener.

Parameters

  • s service object {}
  • Type descriptor of the service

Return Type

(error?)

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

'start

function 'start() returns error?
Isolated Function

Starts the file:Listener.

Return Type

(error?)

() or else error upon failure to start the listener

gracefulStop

function gracefulStop() returns error?
Isolated Function

Stops the file:Listener gracefully.

Return Type

(error?)

() or else error upon failure to stop the listener

immediateStop

function immediateStop() returns error?
Isolated Function

Stops the file:Listener forcefully.

Return Type

(error?)

() or else error upon failure to stop the listener

detach

function detach(service object {}  s) returns error?
Isolated Function

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

Parameters

  • s service object {}
  • Type descriptor of the service

Return Type

(error?)

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