org.apache.http.impl.nio
Class DefaultClientIODispatch

java.lang.Object
  extended by org.apache.http.impl.nio.AbstractIODispatch<NHttpClientIOTarget>
      extended by org.apache.http.impl.nio.DefaultClientIODispatch
All Implemented Interfaces:
IOEventDispatch

@Immutable
public class DefaultClientIODispatch
extends AbstractIODispatch<NHttpClientIOTarget>

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

Since:
4.2

Constructor Summary
DefaultClientIODispatch(NHttpClientHandler handler, HttpParams params)
           
DefaultClientIODispatch(NHttpClientHandler handler, NHttpConnectionFactory<NHttpClientIOTarget> connFactory)
          Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.
DefaultClientIODispatch(NHttpClientHandler handler, SSLContext sslcontext, HttpParams params)
           
DefaultClientIODispatch(NHttpClientHandler handler, SSLContext sslcontext, SSLSetupHandler sslHandler, HttpParams params)
           
 
Method Summary
protected  NHttpClientIOTarget createConnection(IOSession session)
           
protected  void onClosed(NHttpClientIOTarget conn)
           
protected  void onConnected(NHttpClientIOTarget conn)
           
protected  void onException(NHttpClientIOTarget conn, IOException ex)
           
protected  void onInputReady(NHttpClientIOTarget conn)
           
protected  void onOutputReady(NHttpClientIOTarget conn)
           
protected  void onTimeout(NHttpClientIOTarget conn)
           
 
Methods inherited from class org.apache.http.impl.nio.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

DefaultClientIODispatch

public DefaultClientIODispatch(NHttpClientHandler handler,
                               NHttpConnectionFactory<NHttpClientIOTarget> connFactory)
Creates a new instance of this class to be used for dispatching I/O event notifications to the given protocol handler.

Parameters:
handler - the client protocol handler.
connFactory - HTTP client connection factory.

DefaultClientIODispatch

public DefaultClientIODispatch(NHttpClientHandler handler,
                               HttpParams params)

DefaultClientIODispatch

public DefaultClientIODispatch(NHttpClientHandler handler,
                               SSLContext sslcontext,
                               SSLSetupHandler sslHandler,
                               HttpParams params)

DefaultClientIODispatch

public DefaultClientIODispatch(NHttpClientHandler handler,
                               SSLContext sslcontext,
                               HttpParams params)
Method Detail

createConnection

protected NHttpClientIOTarget createConnection(IOSession session)
Specified by:
createConnection in class AbstractIODispatch<NHttpClientIOTarget>

onConnected

protected void onConnected(NHttpClientIOTarget conn)
Specified by:
onConnected in class AbstractIODispatch<NHttpClientIOTarget>

onClosed

protected void onClosed(NHttpClientIOTarget conn)
Specified by:
onClosed in class AbstractIODispatch<NHttpClientIOTarget>

onException

protected void onException(NHttpClientIOTarget conn,
                           IOException ex)
Specified by:
onException in class AbstractIODispatch<NHttpClientIOTarget>

onInputReady

protected void onInputReady(NHttpClientIOTarget conn)
Specified by:
onInputReady in class AbstractIODispatch<NHttpClientIOTarget>

onOutputReady

protected void onOutputReady(NHttpClientIOTarget conn)
Specified by:
onOutputReady in class AbstractIODispatch<NHttpClientIOTarget>

onTimeout

protected void onTimeout(NHttpClientIOTarget conn)
Specified by:
onTimeout in class AbstractIODispatch<NHttpClientIOTarget>


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.