Apama 10.3.1 | Apama Documentation | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The HTTP Server Transport Connectivity Plug-in | Configuring the HTTP server transport
 
Configuring the HTTP server transport
The HTTP server has a manager that deals with connections and a chain that deals with mapping events into the correlator. There must be exactly one chain definition which will be used by all managers. If you require multiple ports (that is, with different options), then you need multiple managers. The HTTP server should be added to a manager and chain containing the appropriate mapping rules (see Mapping events between EPL and HTTP server requests for detailed information).
Manager
Example:
dynamicChainManagers:
httpServer:
transport: httpServer
managerConfig:
port: 15910
bindAddress: 10.13.23.125
tls: false
tlsKeyFile: ${PARENT_DIR}/servername.key.pem
tlsCertificateFile: ${PARENT_DIR}/servername.cert.pem
connectionTimeoutSecs: 60
maxConnections: 16
staticFiles:
/swagger.json:
file: ${PARENT_DIR}/swaggerDefault.json
contentType: application/json
charset: utf-8
The following configuration options are available for the manager on the HTTP server:
Configuration option
Description
port
Required. The user-defined port on which the server is accessible.
Type: integer.
bindAddress
Optional. Binds to specific interfaces, potentially on multiple ports. Each entry is either a host, or a host:port combination. If a port is provided, it is used. Otherwise, the port option applies. The default is to bind to all interfaces on the configured port.
Type: string or list<string>.
Default: blank.
tls
Optional. Set this to true to enable TLS (https).
Type: bool.
Default: false.
tlsCertificateFile
The server certificate file in PEM format. Required if TLS is enabled.
Type: path.
tlsKeyFile
The private key for the certificate in PEM format. Required if TLS is enabled.
Type: path.
connectionTimeoutSecs
Maximum time to handle a single request before returning a timeout (in seconds).
Type: integer.
Default: 60.
maxConnections
Maximum number of simultaneous connections which can be handled.
Type: integer.
Default: 16.
staticFiles
Optional. Map of static files. Elements are of the form:
/url:
file: ${PARENT_DIR}/source_file.txt
contentType: text/plain
charset: utf-8
file and contentType are required, charset is optional.
Type: Map.
Default: undefined.
Chain
Example:
dynamicChains:
httpServer:
- apama.eventMap
        mapping rules...
- httpServer:
authentication:
authenticationType: none
allowedUsersFile: ${PARENT_DIR}/userfile.txt
maxAttempts: 5
coolDownSecs: 30
automaticResponses: false
responseTimeoutMs: 5000
allowedMethods: [PUT]
The following configuration options are available for the chain on the HTTP server:
Configuration option
Description
authentication/authenticationType
Set this to HTTP_BASIC if you require HTTP basic authentication.
Type: HTTP_BASIC or none.
Default: none.
authentication/allowedUsersFile
Path to the password file (see Authentication). Required if the authentication type is HTTP_BASIC.
Type: path.
authentication/maxAttempts
Maximum number of failed login attempts before throttling the requests for that user. See Authentication for more information.
Type: integer.
Default: 3.
authentication/coolDownSecs
The number of seconds after the maximum number of failed login attempts before the HTTP server attempts authentication of the user again. See Authentication for more information.
Type: integer.
Default: 20.
automaticResponses
Set this to true if you want a submission-only API where the responses are generated automatically by the transport. If set to false, the transport will wait for a response from the EPL application, subject to a timeout.
Type: bool.
responseTimeoutMs
The number of milliseconds we wait for a response from the EPL application before returning to the client.
Type: integer.
Default: 5000 (5s).
allowedMethods
Required. List of permitted HTTP verbs (for example, PUT or GET).
Type: string or list<string>.
maxRequestBytes
Maximum permitted HTTP payload size in bytes.
Type: integer.
Default: 1048576 (1MB).

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.