Listener: Listener
This is used for creating HTTP server endpoints. An HTTP server endpoint is capable of responding to
remote callers. The Listener
is responsible for initializing the endpoint using the provided configurations.
Constructor
Gets invoked during module initialization to initialize the listener.
init (int port, *ListenerConfiguration config)
- port int
Listening port of the HTTP service listener
- config *ListenerConfiguration
Configurations for the HTTP service listener
LifeCycle Methods
attach | Attaches a service to the listener. |
Methods
'start | Starts the registered service programmatically. |
gracefulStop | Stops the service listener gracefully. |
immediateStop | Stops the service listener immediately. |
detach | Detaches an HTTP service from the listener. |
getPort | Retrieves the port of the HTTP listener. |
getConfig | Retrieves the |
attach
Attaches a service to the listener.
Parameters
- httpService Service
The service that needs to be attached
getConfig
function getConfig() returns readonly & InferredListenerConfiguration
Retrieves the InferredListenerConfiguration
of the HTTP listener.
Return Type
(readonly & InferredListenerConfiguration)The readonly HTTP listener inferred configuration