Closes this endpoint and the REST server (service) that was opened earlier.
(optional) transaction id to trace execution through call chain.
(optional) the function to call once the closing process is complete. Will be called with an error if one is raised.
Configures this HttpEndpoint using the given configuration parameters.
Configuration parameters:
configuration parameters, containing a "connection(s)" section.
Returns correlationId from request
http request
Returns correlationId from request
Gets an HTTP server instance.
an HTTP server instance of null
if endpoint is closed.
whether or not this endpoint is open with an actively listening REST server.
Opens a connection using the parameters resolved by the referenced connection resolver and creates a REST server (service) using the set options and parameters.
(optional) transaction id to trace execution through call chain.
(optional) the function to call once the opening process is complete. Will be called with an error if one is raised.
Registers a registerable object for dynamic endpoint discovery.
the registration to add.
Registers a middleware action for the given route.
the route to register in this object's REST server (service).
the middleware action to perform at the given route.
Registers an action in this objects REST server (service) by the given method and route.
the HTTP method of the route.
the route to register in this object's REST server (service).
the schema to use for parameter validation.
the action to perform at the given route.
Registers an action with authorization in this objects REST server (service) by the given method and route.
the HTTP method of the route.
the route to register in this object's REST server (service).
the schema to use for parameter validation.
the authorization interceptor
the action to perform at the given route.
Sets references to this endpoint's logger, counters, and connection resolver.
References:
"*:logger:*:*:1.0"
"*:counters:*:*:1.0"
"*:discovery:*:*:1.0"
(for the connection resolver)an IReferences object, containing references to a logger, counters, and a connection resolver.
Unregisters a registerable object, so that it is no longer used in dynamic endpoint discovery.
the registration to remove.
Generated using TypeDoc
Used for creating HTTP endpoints. An endpoint is a URL, at which a given service can be accessed by a client.
Configuration parameters
Parameters to pass to the configure method for component configuration:
References
A logger, counters, and a connection resolver can be referenced by passing the following references to the object's setReferences method:
"*:logger:*:*:1.0"
;"*:counters:*:*:1.0"
;"*:discovery:*:*:1.0"
(for the connection resolver).Examples
public MyMethod(_config: ConfigParams, _references: IReferences) { let endpoint = new HttpEndpoint(); if (this._config) endpoint.configure(this._config); if (this._references) endpoint.setReferences(this._references); ... this._endpoint.open(correlationId, (err) => { this._opened = err == null; callback(err); }); ... }