io.undertow

## Class Undertow.Builder

- java.lang.Object
- - io.undertow.Undertow.Builder

Enclosing class:
  Undertow

    public static final class Undertow.Builder
    extends Object

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`Undertow.Builder` `addAjpListener(int port, String host)`
`Undertow.Builder` `addAjpListener(int port, String host, HttpHandler rootHandler)`
`Undertow.Builder` `addHttpListener(int port, String host)`
`Undertow.Builder` `addHttpListener(int port, String host, HttpHandler rootHandler)`
`Undertow.Builder` `addHttpsListener(int port, String host, KeyManager[] keyManagers, TrustManager[] trustManagers)`
`Undertow.Builder` `addHttpsListener(int port, String host, KeyManager[] keyManagers, TrustManager[] trustManagers, HttpHandler rootHandler)`
`Undertow.Builder` `addHttpsListener(int port, String host, SSLContext sslContext)`
`Undertow.Builder` `addHttpsListener(int port, String host, SSLContext sslContext, HttpHandler rootHandler)`
`Undertow.Builder` `addListener(int port, String host)` Deprecated.
`Undertow.Builder` `addListener(int port, String host, Undertow.ListenerType listenerType)` Deprecated.
`Undertow.Builder` `addListener(Undertow.ListenerBuilder listenerBuilder)`
`Undertow` `build()`
`Undertow.Builder` `setBufferSize(int bufferSize)`
`Undertow.Builder` `setBuffersPerRegion(int buffersPerRegion)` Deprecated.
`Undertow.Builder` `setByteBufferPool(ByteBufferPool byteBufferPool)`
`Undertow.Builder` `setDirectBuffers(boolean directBuffers)`
`Undertow.Builder` `setHandler(HttpHandler handler)`
`Undertow.Builder` `setIoThreads(int ioThreads)`
`<T> Undertow.Builder` `setServerOption(org.xnio.Option<T> option, T value)`
`<T> Undertow.Builder` `setSocketOption(org.xnio.Option<T> option, T value)`
`Undertow.Builder` `setSslEngineDelegatedTaskExecutor(Executor sslEngineDelegatedTaskExecutor)`
`Undertow.Builder` `setWorker(org.xnio.XnioWorker worker)` When null (the default), a new `XnioWorker` will be created according to the various worker-related configuration (ioThreads, workerThreads, workerOptions) when `Undertow.start()` is called.
`<T> Undertow.Builder` `setWorkerOption(org.xnio.Option<T> option, T value)`
`Undertow.Builder` `setWorkerThreads(int workerThreads)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### build

    public Undertow build()

#### addListener

    @Deprecated
    public Undertow.Builder addListener(int port,
                                                    String host)

Deprecated.

#### addListener

    @Deprecated
    public Undertow.Builder addListener(int port,
                                                    String host,
                                                    Undertow.ListenerType listenerType)

Deprecated.

#### addListener

    public Undertow.Builder addListener(Undertow.ListenerBuilder listenerBuilder)

#### addHttpListener

    public Undertow.Builder addHttpListener(int port,
                                            String host)

#### addHttpsListener

    public Undertow.Builder addHttpsListener(int port,
                                             String host,
                                             KeyManager[] keyManagers,
                                             TrustManager[] trustManagers)

#### addHttpsListener

    public Undertow.Builder addHttpsListener(int port,
                                             String host,
                                             SSLContext sslContext)

#### addAjpListener

    public Undertow.Builder addAjpListener(int port,
                                           String host)

#### addHttpListener

    public Undertow.Builder addHttpListener(int port,
                                            String host,
                                            HttpHandler rootHandler)

#### addHttpsListener

    public Undertow.Builder addHttpsListener(int port,
                                             String host,
                                             KeyManager[] keyManagers,
                                             TrustManager[] trustManagers,
                                             HttpHandler rootHandler)

#### addHttpsListener

    public Undertow.Builder addHttpsListener(int port,
                                             String host,
                                             SSLContext sslContext,
                                             HttpHandler rootHandler)

#### addAjpListener

    public Undertow.Builder addAjpListener(int port,
                                           String host,
                                           HttpHandler rootHandler)

#### setBufferSize

    public Undertow.Builder setBufferSize(int bufferSize)

#### setBuffersPerRegion

    @Deprecated
    public Undertow.Builder setBuffersPerRegion(int buffersPerRegion)

Deprecated.

#### setIoThreads

    public Undertow.Builder setIoThreads(int ioThreads)

#### setWorkerThreads

    public Undertow.Builder setWorkerThreads(int workerThreads)

#### setDirectBuffers

    public Undertow.Builder setDirectBuffers(boolean directBuffers)

#### setHandler

    public Undertow.Builder setHandler(HttpHandler handler)

#### setServerOption

    public <T> Undertow.Builder setServerOption(org.xnio.Option<T> option,
                                                T value)

#### setSocketOption

    public <T> Undertow.Builder setSocketOption(org.xnio.Option<T> option,
                                                T value)

#### setWorkerOption

    public <T> Undertow.Builder setWorkerOption(org.xnio.Option<T> option,
                                                T value)

#### setWorker

    public Undertow.Builder setWorker(org.xnio.XnioWorker worker)

When null (the default), a new `XnioWorker` will be created according to the various worker-related configuration (ioThreads, workerThreads, workerOptions) when `Undertow.start()` is called. Additionally, this newly created worker will be shutdown when `Undertow.stop()` is called.

When non-null, the provided `XnioWorker` will be reused instead of creating a new `XnioWorker` when `Undertow.start()` is called. Additionally, the provided `XnioWorker` will NOT be shutdown when `Undertow.stop()` is called. Essentially, the lifecycle of the provided worker must be maintained outside of the `Undertow` instance.

#### setSslEngineDelegatedTaskExecutor

    public Undertow.Builder setSslEngineDelegatedTaskExecutor(Executor sslEngineDelegatedTaskExecutor)

#### setByteBufferPool

    public Undertow.Builder setByteBufferPool(ByteBufferPool byteBufferPool)