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
Class DefaultHttpServerIODispatch<H extends NHttpServerEventHandler>

    java.lang.Object
      org.apache.http.impl.nio.reactor.AbstractIODispatch<DefaultNHttpServerConnection>
          org.apache.http.impl.nio.DefaultHttpServerIODispatch<H>

Type Parameters:
  `H` - an implementation of `NHttpServerEventHandler`.

All Implemented Interfaces:
  IOEventDispatch

    @Contract(threading=IMMUTABLE_CONDITIONAL)
    public class DefaultHttpServerIODispatch<H extends NHttpServerEventHandler>

extends AbstractIODispatch<DefaultNHttpServerConnection>

Default `IOEventDispatch` implementation that supports both plain (non-encrypted) and SSL encrypted server side HTTP connections.

Since:
  4.2

Field Summary

Fields inherited from interface org.apache.http.nio.reactor.IOEventDispatch
`CONNECTION_KEY`

Constructor Summary
`DefaultHttpServerIODispatch(H handler, ConnectionConfig config)`
`DefaultHttpServerIODispatch(H handler, HttpParams params)` Deprecated. (4.3) use `DefaultHttpServerIODispatch( NHttpServerEventHandler, ConnectionConfig)`
`DefaultHttpServerIODispatch(H handler, NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connFactory)`
`DefaultHttpServerIODispatch(H handler, SSLContext sslContext, ConnectionConfig config)`
`DefaultHttpServerIODispatch(H handler, SSLContext sslContext, HttpParams params)` Deprecated. (4.3) use `DefaultHttpServerIODispatch( NHttpServerEventHandler, SSLContext, ConnectionConfig)`
`DefaultHttpServerIODispatch(H handler, SSLContext sslContext, SSLSetupHandler sslHandler, ConnectionConfig config)`
`DefaultHttpServerIODispatch(H handler, SSLContext sslContext, SSLSetupHandler sslHandler, HttpParams params)` Deprecated. (4.3) use `DefaultHttpServerIODispatch( NHttpServerEventHandler, SSLContext, SSLSetupHandler, ConnectionConfig)`

Method Summary
`static
`<T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T>`
` | `create(T handler, SSLContext sslContext, ConnectionConfig config)` Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.
`static
`<T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T>`
` | `create(T eventHandler, SSLContext sslContext, ConnectionConfig config, HttpRequestFactory httpRequestFactory)` Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.
`static
`<T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T>`
` | `create(T handler, SSLContext sslContext, SSLSetupHandler sslHandler, ConnectionConfig config)` Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.
`protected DefaultNHttpServerConnection` | `createConnection(IOSession session)`
`NHttpConnectionFactory<? extends DefaultNHttpServerConnection>` | `getConnectionFactory()` Gets the connection factory used to construct this dispatch.
`H` | `getHandler()` Gets the handler used to construct this dispatch.
`protected void` | `onClosed(DefaultNHttpServerConnection conn)`
`protected void` | `onConnected(DefaultNHttpServerConnection conn)`
`protected void` | `onException(DefaultNHttpServerConnection conn, IOException ex)`
`protected void` | `onInputReady(DefaultNHttpServerConnection conn)`
`protected void` | `onOutputReady(DefaultNHttpServerConnection conn)`
`protected void` | `onTimeout(DefaultNHttpServerConnection conn)`

Methods inherited from class org.apache.http.impl.nio.reactor.AbstractIODispatch
`connected, disconnected, inputReady, outputReady, timeout`

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

Constructor Detail

### DefaultHttpServerIODispatch

    public DefaultHttpServerIODispatch(H handler,
                                       NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connFactory)

### DefaultHttpServerIODispatch

    @Deprecated
    public DefaultHttpServerIODispatch(H handler,
                                                  HttpParams params)

  Deprecated. (4.3) use `DefaultHttpServerIODispatch( NHttpServerEventHandler, ConnectionConfig)`

### DefaultHttpServerIODispatch

    @Deprecated
    public DefaultHttpServerIODispatch(H handler,
                                                  SSLContext sslContext,
                                                  SSLSetupHandler sslHandler,
                                                  HttpParams params)

  Deprecated. (4.3) use `DefaultHttpServerIODispatch( NHttpServerEventHandler, SSLContext, SSLSetupHandler, ConnectionConfig)`

### DefaultHttpServerIODispatch

    @Deprecated
    public DefaultHttpServerIODispatch(H handler,
                                                  SSLContext sslContext,
                                                  HttpParams params)

  Deprecated. (4.3) use `DefaultHttpServerIODispatch( NHttpServerEventHandler, SSLContext, ConnectionConfig)`

### DefaultHttpServerIODispatch

    public DefaultHttpServerIODispatch(H handler,
                                       ConnectionConfig config)

Since:
  4.3

### DefaultHttpServerIODispatch

    public DefaultHttpServerIODispatch(H handler,
                                       SSLContext sslContext,
                                       SSLSetupHandler sslHandler,
                                       ConnectionConfig config)

Since:
  4.3

### DefaultHttpServerIODispatch

    public DefaultHttpServerIODispatch(H handler,
                                       SSLContext sslContext,
                                       ConnectionConfig config)

Since:
  4.3

Method Detail

### create

    public static <T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T> create(T handler,
                                                                                            SSLContext sslContext,
                                                                                            ConnectionConfig config)

  Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.

  Parameters:
    `handler` - the server protocol handler.
    `sslContext` - an SSLContext or null (for a plain text connection.)
    `config` - a connection configuration
  Returns:
    a new instance
  Since:
    4.4.7

### create

    public static <T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T> create(T eventHandler,
                                                                                            SSLContext sslContext,
                                                                                            ConnectionConfig config,
                                                                                            HttpRequestFactory httpRequestFactory)

  Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.

  Parameters:
    `eventHandler` - the server protocol handler.
    `sslContext` - an SSLContext or null (for a plain text connection.)
    `config` - a connection configuration
    `httpRequestFactory` - the request factory used by this object to generate `HttpRequest` instances.
  Returns:
    a new instance
  Since:
    4.4.10

### create

    public static <T extends NHttpServerEventHandler> DefaultHttpServerIODispatch<T> create(T handler,
                                                                                            SSLContext sslContext,
                                                                                            SSLSetupHandler sslHandler,
                                                                                            ConnectionConfig config)

  Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.

  Parameters:
    `handler` - the server protocol handler.
    `sslContext` - an SSLContext or null (for a plain text connection.)
    `sslHandler` - customizes various aspects of the TLS/SSL protocol.
    `config` - a connection configuration
  Returns:
    a new instance
  Since:
    4.4.7

### createConnection

    protected DefaultNHttpServerConnection createConnection(IOSession session)

  Specified by:
    `createConnection` in class `AbstractIODispatch<DefaultNHttpServerConnection>`

### getConnectionFactory

    public NHttpConnectionFactory<? extends DefaultNHttpServerConnection> getConnectionFactory()

  Gets the connection factory used to construct this dispatch.

  Returns:
    the connection factory used to construct this dispatch.
  Since:
    4.4.9

### getHandler

    public H getHandler()

  Gets the handler used to construct this dispatch.

  Returns:
    the handler used to construct this dispatch.
  Since:
    4.4.9

### onConnected

    protected void onConnected(DefaultNHttpServerConnection conn)

  Specified by:
    `onConnected` in class `AbstractIODispatch<DefaultNHttpServerConnection>`

### onClosed

    protected void onClosed(DefaultNHttpServerConnection conn)

  Specified by:
    `onClosed` in class `AbstractIODispatch<DefaultNHttpServerConnection>`

### onException

    protected void onException(DefaultNHttpServerConnection conn,
                               IOException ex)

  Specified by:
    `onException` in class `AbstractIODispatch<DefaultNHttpServerConnection>`

### onInputReady

    protected void onInputReady(DefaultNHttpServerConnection conn)

  Specified by:
    `onInputReady` in class `AbstractIODispatch<DefaultNHttpServerConnection>`

### onOutputReady

    protected void onOutputReady(DefaultNHttpServerConnection conn)

  Specified by:
    `onOutputReady` in class `AbstractIODispatch<DefaultNHttpServerConnection>`

### onTimeout

    protected void onTimeout(DefaultNHttpServerConnection conn)

  Specified by:
    `onTimeout` in class `AbstractIODispatch<DefaultNHttpServerConnection>`

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.