Construct an instance of AkeraWeb.
Can be one or an array of broker configuration for remote brokers or a broker instance when running embedded into the application server.
Returns the brokers defined in configuration (alias).
Called when the connection obtained through getConnection is no longer needed.
It is the broker responsibility to decide if to disconnect it or keep it in the connection pool.
The connection that is not needed anymore.
The broker alias.
Returns the CGI variables from the request.
The web request.
The broker alias.
Returns a connection to one of the brokers mounted for this router. If only one broker is mounted the alias parameter is ignored and a connection to that broker is returned.
When multiple application servers are defined for the same broker (alias) the first one for which a connection can be established is used (fail-over).
Log an event information using the instance logger, if any.
The message to log.
The event log level.
Mount all brokers defined in configuration and return the Express [[Router]] to be used as middleware.
If there is only on broker defined in configuration that is mounted on the router's main route, otherwise each broker is mounted on a separate path using broker's alias. Multiple application servers can be defined on each broker for fail-over functionality.
A static method that combines the default constructor and call mount on the instance to return the Express [[Router]] that can be used as middleware.
Can be one or an array of broker configuration for remote brokers or a broker instance when running embedded into the application server.
An instance of [AkeraLogger] to be used by the router for logging.
The size of connections pool, if set to zero no pooling is used.
AkeraWeb is holding information about the broker(s) used as first parameter of the constructor. If other REST interfaces are used beside the Web Handler one it is best to create an instance of AkeraWeb and use that as input to REST middleware services instead of just passing the broker configuration, that way the connections are re-used between different services. Use the mount method to get the Web Handler router.