public class

SSLServerIOEventDispatch

extends Object
implements IOEventDispatch
java.lang.Object
   ↳ org.apache.http.impl.nio.SSLServerIOEventDispatch

This class is deprecated.
use SSLServerIOEventDispatch

Class Overview

Default implementation of IOEventDispatch interface for SSL (encrypted) server-side HTTP connections.

The following parameters can be used to customize the behavior of this class:

Summary

Fields
protected final NHttpServiceHandler handler
protected final HttpParams params
protected final SSLIOSessionHandler sslHandler
protected final SSLContext sslcontext
Public Constructors
SSLServerIOEventDispatch(NHttpServiceHandler handler, SSLContext sslcontext, SSLIOSessionHandler sslHandler, HttpParams params)
Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler using the given SSLContext.
SSLServerIOEventDispatch(NHttpServiceHandler handler, SSLContext sslcontext, HttpParams params)
Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler using the given SSLContext.
Public Methods
void connected(IOSession session)
Triggered after the given session has been just created.
void disconnected(IOSession session)
Triggered when the given session has been terminated.
void inputReady(IOSession session)
Triggered when the given session has input pending.
void outputReady(IOSession session)
Triggered when the given session is ready for output.
void timeout(IOSession session)
Triggered when the given session as timed out.
Protected Methods
ByteBufferAllocator createByteBufferAllocator()
Creates an instance of HeapByteBufferAllocator to be used by HTTP connections for allocating java.nio.ByteBuffer objects.
NHttpServerIOTarget createConnection(IOSession session)
Creates an instance of DefaultNHttpServerConnection based on the given IOSession.
HttpRequestFactory createHttpRequestFactory()
Creates an instance of DefaultHttpRequestFactory to be used by HTTP connections for creating HttpRequest objects.
SSLIOSession createSSLIOSession(IOSession session, SSLContext sslcontext, SSLIOSessionHandler sslHandler)
Creates an instance of SSLIOSession decorating the given IOSession.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.nio.reactor.IOEventDispatch

Fields

protected final NHttpServiceHandler handler

protected final HttpParams params

protected final SSLIOSessionHandler sslHandler

protected final SSLContext sslcontext

Public Constructors

public SSLServerIOEventDispatch (NHttpServiceHandler handler, SSLContext sslcontext, SSLIOSessionHandler sslHandler, HttpParams params)

Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler using the given SSLContext. This I/O dispatcher will transparently handle SSL protocol aspects for HTTP connections.

Parameters
handler the server protocol handler.
sslcontext the SSL context.
sslHandler the SSL handler.
params HTTP parameters.

public SSLServerIOEventDispatch (NHttpServiceHandler handler, SSLContext sslcontext, HttpParams params)

Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler using the given SSLContext. This I/O dispatcher will transparently handle SSL protocol aspects for HTTP connections.

Parameters
handler the server protocol handler.
sslcontext the SSL context.
params HTTP parameters.

Public Methods

public void connected (IOSession session)

Triggered after the given session has been just created.

Parameters
session the I/O session.

public void disconnected (IOSession session)

Triggered when the given session has been terminated.

Parameters
session the I/O session.

public void inputReady (IOSession session)

Triggered when the given session has input pending.

Parameters
session the I/O session.

public void outputReady (IOSession session)

Triggered when the given session is ready for output.

Parameters
session the I/O session.

public void timeout (IOSession session)

Triggered when the given session as timed out.

Parameters
session the I/O session.

Protected Methods

protected ByteBufferAllocator createByteBufferAllocator ()

Creates an instance of HeapByteBufferAllocator to be used by HTTP connections for allocating java.nio.ByteBuffer objects.

This method can be overridden in a super class in order to provide a different implementation of the ByteBufferAllocator interface.

Returns
  • byte buffer allocator.

protected NHttpServerIOTarget createConnection (IOSession session)

Creates an instance of DefaultNHttpServerConnection based on the given IOSession.

This method can be overridden in a super class in order to provide a different implementation of the NHttpServerIOTarget interface.

Parameters
session the underlying SSL I/O session.
Returns
  • newly created HTTP connection.

protected HttpRequestFactory createHttpRequestFactory ()

Creates an instance of DefaultHttpRequestFactory to be used by HTTP connections for creating HttpRequest objects.

This method can be overridden in a super class in order to provide a different implementation of the HttpRequestFactory interface.

Returns
  • HTTP request factory.

protected SSLIOSession createSSLIOSession (IOSession session, SSLContext sslcontext, SSLIOSessionHandler sslHandler)

Creates an instance of SSLIOSession decorating the given IOSession.

This method can be overridden in a super class in order to provide a different implementation of SSL I/O session.

Parameters
session the underlying I/O session.
sslcontext the SSL context.
sslHandler the SSL handler.
Returns
  • newly created SSL I/O session.