...
Code Block | ||||
---|---|---|---|---|
| ||||
<beans ... xmlns:httpu="http://cxf.apache.org/transports/http-undertow/configuration ... xsi:schemaLocation="... http://cxf.apache.org/transports/http-undertow/configuration http://cxf.apache.org/schemas/configuration/http-undertow.xsd ...> |
The engine-factory
element
The
...
The httpu:engine-factory
element is the root element used to configure the Undertow runtime used by an application. It has a single required attribute, bus, whose value is the name of the Bus that manages the Undertow instances being configured.
...
The httpu:engine-factory
element has three children that contain the information used to configure the HTTP ports instantiated by the Undertow runtime factory. The children are described below.
Element | Description |
---|---|
httpu:engine | Specifies the configuration for a particular Undertow runtime instance. |
httpu:identifiedTLSServerParameters | Specifies a reusable set of properties for securing an HTTP server. It has a single attribute, |
httpu:identifiedThreadingParameters | Specifies a reusable set of properties for controlling a Undertow instance's thread & |
IO pools. It has a single attribute, |
The engine
element
The httpu:engine
element is used to configure specific instances of the Undertow runtime. It has a single attribute, port
, that specifies the number of the port being managed by the Undertow instance.
Tip |
---|
You can specify a value of 0 for the port attribute. Any threading properties specified in an |
Each httpu:engine
element can have two children: one for configuring security properties and one for configuring the Undertow instance's thread & IO pools. For each type of configuration you can either directly provide the configuration information or provide a reference to a set of configuration properties defined in the parent httpu:engine-factory
element.
The child elements used to provide the configuration properties are described below.
Element | Description |
---|---|
httpu:tlsServerParameters | Specifies a set of properties for configuring the security used for the specific Undertow instance. See the TLS Configuration page for more information. |
httpu:tlsServerParametersRef | Refers to a set of security properties defined by a |
httpu:threadingParameters | Specifies the size of the thread & IO pools used by the specific Undertow instance. |
httpu:threadingParametersRef | Refers to a set of properties defined by a |
httpu:handlers | You can use Spring Beans syntax to instantiate a Undertow handler list and set these handlers' properties , the Undertow's handlers will be set to the Undertow server engine |
Configuring the thread & IO pools
You can configure the size of a Undertow instance's thread & IO pools by either:
- Specifying the size of thread pool using a
identifiedThreadingParameters
element in theengine-factory
element. You then refer to the element using athreadingParametersRef
element. Specify the size of the of thread pool directly using a
threadingParameters
element.
ThethreadingParameters
has four attributes to specify the size of a thread & IO worker pools. The attributes are described below.Warning The
httpu:identifiedThreadingParameters
element has a single childthreadingParameters
element
minThreads | Specifies the minimum number of threads available to the Undertow instance for processing requests. |
maxThreads | Specifies the maximum number of threads available to the Undertow instance for processing requests. |
workerIOThreads | Specifies the number of worker threads available to the Undertow instance for I/O processing. |
workerIOName | Specifies the name of the Undertow instance worker thread pool. |