Listener: Listener

Represents a service listener that monitors the FTP location.

Constructor

Gets invoked during object initialization.

init (ListenerConfiguration listenerConfig)

LifeCycle Methods

attach

Binds a service to the ftp:Listener.

Methods

'start

Starts the ftp:Listener.

__stop

Stops the ftp:Listener.

detach

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

immediateStop

Stops the ftp:Listener forcefully.

gracefulStop

Stops the ftp:Listener gracefully.

poll

Poll new files from a FTP server.

register

Register a FTP service in an FTP listener server.

attach

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

Binds a service to the ftp:Listener.

1error? response = listener->attach(service1);

Parameters

  • ftpService service object {}
  • Service to be detached from the listener

  • name string[ ] | string? (default ())
  • Name of the service to be detached from the listener

Return Type

(error?)

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

'start

function 'start() returns error?
Isolated Function

Starts the ftp:Listener.

1error? response = listener->start();

Return Type

(error?)

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

__stop

function __stop() returns error?
Isolated Function

Stops the ftp:Listener.

1error? response = listener->__stop();

Return Type

(error?)

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

detach

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

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

1error? response = listener->detach(service1);

Parameters

  • emailService service object {}
  • Service to be detached from the listener

Return Type

(error?)

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

immediateStop

function immediateStop() returns error?
Isolated Function

Stops the ftp:Listener forcefully.

1error? response = listener->immediateStop();

Return Type

(error?)

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

gracefulStop

function gracefulStop() returns error?
Isolated Function

Stops the ftp:Listener gracefully.

1error? response = listener->gracefulStop();

Return Type

(error?)

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

poll

function poll() returns error?
Isolated Function

Poll new files from a FTP server.

1error? response = listener->poll();

Return Type

(error?)

An error if failed to establish communication with the FTP server

register

function register(service object {}  ftpService, string? name) returns error?
Isolated Function

Register a FTP service in an FTP listener server.

1error? response = listener->register(ftpService, name);

Parameters

  • ftpService service object {}
  • The FTP service

  • name string?
  • Name of the FTP service

Return Type

(error?)

An error if failed to establish communication with the FTP server