Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.impl.nio.bootstrap
Class ServerBootstrap

    java.lang.Object
      org.apache.http.impl.nio.bootstrap.ServerBootstrap

    public class ServerBootstrap

extends Object

Since:
  4.4

Method Summary
`ServerBootstrap` | `addInterceptorFirst(HttpRequestInterceptor itcp)` Adds this protocol interceptor to the head of the protocol processing list.
`ServerBootstrap` | `addInterceptorFirst(HttpResponseInterceptor itcp)` Adds this protocol interceptor to the head of the protocol processing list.
`ServerBootstrap` | `addInterceptorLast(HttpRequestInterceptor itcp)` Adds this protocol interceptor to the tail of the protocol processing list.
`ServerBootstrap` | `addInterceptorLast(HttpResponseInterceptor itcp)` Adds this protocol interceptor to the tail of the protocol processing list.
`static ServerBootstrap` | `bootstrap()`
`HttpServer` | `create()`
`ServerBootstrap` | `registerHandler(String pattern, HttpAsyncRequestHandler<?> handler)` Registers the given `HttpAsyncRequestHandler` as a handler for URIs matching the given pattern.
`ServerBootstrap` | `setConnectionConfig(ConnectionConfig connectionConfig)` Sets connection configuration.
`ServerBootstrap` | `setConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory)` Assigns `NHttpConnectionFactory` instance.
`ServerBootstrap` | `setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)` Assigns `ConnectionReuseStrategy` instance.
`ServerBootstrap` | `setExceptionLogger(ExceptionLogger exceptionLogger)` Assigns `ExceptionLogger` instance.
`ServerBootstrap` | `setExpectationVerifier(HttpAsyncExpectationVerifier expectationVerifier)` Assigns `HttpAsyncExpectationVerifier` instance.
`ServerBootstrap` | `setHandlerMapper(HttpAsyncRequestHandlerMapper handlerMapper)` Assigns `HttpAsyncRequestHandlerMapper` instance.
`ServerBootstrap` | `setHttpProcessor(HttpProcessor httpProcessor)` Assigns `HttpProcessor` instance.
`ServerBootstrap` | `setIOReactorConfig(IOReactorConfig ioReactorConfig)` Sets I/O reactor configuration.
`ServerBootstrap` | `setListenerPort(int listenerPort)` Sets listener port number.
`ServerBootstrap` | `setLocalAddress(InetAddress localAddress)` Assigns local interface for the listener.
`ServerBootstrap` | `setResponseFactory(HttpResponseFactory responseFactory)` Assigns `HttpResponseFactory` instance.
`ServerBootstrap` | `setServerInfo(String serverInfo)` Assigns `Server` response header value.
`ServerBootstrap` | `setSslContext(SSLContext sslContext)` Assigns `SSLContext` instance.
`ServerBootstrap` | `setSslSetupHandler(SSLSetupHandler sslSetupHandler)` Assigns `SSLSetupHandler` instance.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### bootstrap

    public static ServerBootstrap bootstrap()

### setListenerPort

    public final ServerBootstrap setListenerPort(int listenerPort)

  Sets listener port number.

### setLocalAddress

    public final ServerBootstrap setLocalAddress(InetAddress localAddress)

  Assigns local interface for the listener.

### setIOReactorConfig

    public final ServerBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)

  Sets I/O reactor configuration.

### setConnectionConfig

    public final ServerBootstrap setConnectionConfig(ConnectionConfig connectionConfig)

  Sets connection configuration.

  Please note this value can be overridden by the `setConnectionFactory( org.apache.http.nio.NHttpConnectionFactory)` method.

### setHttpProcessor

    public final ServerBootstrap setHttpProcessor(HttpProcessor httpProcessor)

  Assigns `HttpProcessor` instance.

### addInterceptorFirst

    public final ServerBootstrap addInterceptorFirst(HttpResponseInterceptor itcp)

  Adds this protocol interceptor to the head of the protocol processing list.

  Please note this value can be overridden by the `setHttpProcessor( org.apache.http.protocol.HttpProcessor)` method.

### addInterceptorLast

    public final ServerBootstrap addInterceptorLast(HttpResponseInterceptor itcp)

  Adds this protocol interceptor to the tail of the protocol processing list.

  Please note this value can be overridden by the `setHttpProcessor( org.apache.http.protocol.HttpProcessor)` method.

### addInterceptorFirst

    public final ServerBootstrap addInterceptorFirst(HttpRequestInterceptor itcp)

  Adds this protocol interceptor to the head of the protocol processing list.

  Please note this value can be overridden by the `setHttpProcessor( org.apache.http.protocol.HttpProcessor)` method.

### addInterceptorLast

    public final ServerBootstrap addInterceptorLast(HttpRequestInterceptor itcp)

  Adds this protocol interceptor to the tail of the protocol processing list.

  Please note this value can be overridden by the `setHttpProcessor( org.apache.http.protocol.HttpProcessor)` method.

### setServerInfo

    public final ServerBootstrap setServerInfo(String serverInfo)

  Assigns `Server` response header value.

  Please note this value can be overridden by the `setHttpProcessor( org.apache.http.protocol.HttpProcessor)` method.

### setConnectionReuseStrategy

    public final ServerBootstrap setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)

  Assigns `ConnectionReuseStrategy` instance.

### setResponseFactory

    public final ServerBootstrap setResponseFactory(HttpResponseFactory responseFactory)

  Assigns `HttpResponseFactory` instance.

### setHandlerMapper

    public final ServerBootstrap setHandlerMapper(HttpAsyncRequestHandlerMapper handlerMapper)

  Assigns `HttpAsyncRequestHandlerMapper` instance.

### registerHandler

    public final ServerBootstrap registerHandler(String pattern,
                                                 HttpAsyncRequestHandler<?> handler)

  Registers the given `HttpAsyncRequestHandler` as a handler for URIs matching the given pattern.

  Please note this value can be overridden by the `setHandlerMapper( org.apache.http.nio.protocol.HttpAsyncRequestHandlerMapper)` )} method.

  Parameters:
    `pattern` - the pattern to register the handler for.
    `handler` - the handler.

### setExpectationVerifier

    public final ServerBootstrap setExpectationVerifier(HttpAsyncExpectationVerifier expectationVerifier)

  Assigns `HttpAsyncExpectationVerifier` instance.

### setConnectionFactory

    public final ServerBootstrap setConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory)

  Assigns `NHttpConnectionFactory` instance.

### setSslContext

    public final ServerBootstrap setSslContext(SSLContext sslContext)

  Assigns `SSLContext` instance.

  Please note this value can be overridden by the `setConnectionFactory( org.apache.http.nio.NHttpConnectionFactory)` method.

### setSslSetupHandler

    public ServerBootstrap setSslSetupHandler(SSLSetupHandler sslSetupHandler)

  Assigns `SSLSetupHandler` instance.

  Please note this value can be overridden by the `setConnectionFactory( org.apache.http.nio.NHttpConnectionFactory)` method.

### setExceptionLogger

    public final ServerBootstrap setExceptionLogger(ExceptionLogger exceptionLogger)

  Assigns `ExceptionLogger` instance.

### create

    public HttpServer create()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.