org.apache.http.impl.nio.reactor
Class AbstractIOReactor

java.lang.Object
  extended by org.apache.http.impl.nio.reactor.AbstractIOReactor
All Implemented Interfaces:
IOReactor
Direct Known Subclasses:
BaseIOReactor

public abstract class AbstractIOReactor
extends java.lang.Object
implements IOReactor


Constructor Summary
AbstractIOReactor(long selectTimeout)
           
 
Method Summary
protected abstract  void acceptable(java.nio.channels.SelectionKey key)
           
 void addChannel(ChannelEntry channelEntry)
           
 void awaitShutdown(long timeout)
           
protected  void closeActiveChannels()
           
protected  void closeNewChannels()
           
protected  void closeSessions()
           
protected abstract  void connectable(java.nio.channels.SelectionKey key)
           
protected  void execute()
           
protected abstract  IOSession getSession(java.nio.channels.SelectionKey key)
           
 IOReactorStatus getStatus()
           
 void gracefulShutdown()
           
 void hardShutdown()
           
protected  void processEvent(java.nio.channels.SelectionKey key)
           
protected  void queueClosedSession(IOSession session)
           
protected abstract  void readable(java.nio.channels.SelectionKey key)
           
protected abstract  void sessionClosed(IOSession session)
           
protected abstract  void sessionCreated(java.nio.channels.SelectionKey key, IOSession session)
           
 void shutdown()
           
 void shutdown(long gracePeriod)
           
protected abstract  void timeoutCheck(java.nio.channels.SelectionKey key, long now)
           
protected abstract  void validate(java.util.Set<java.nio.channels.SelectionKey> keys)
           
protected abstract  void writable(java.nio.channels.SelectionKey key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.nio.reactor.IOReactor
execute
 

Constructor Detail

AbstractIOReactor

public AbstractIOReactor(long selectTimeout)
                  throws IOReactorException
Throws:
IOReactorException
Method Detail

acceptable

protected abstract void acceptable(java.nio.channels.SelectionKey key)

connectable

protected abstract void connectable(java.nio.channels.SelectionKey key)

readable

protected abstract void readable(java.nio.channels.SelectionKey key)

writable

protected abstract void writable(java.nio.channels.SelectionKey key)

timeoutCheck

protected abstract void timeoutCheck(java.nio.channels.SelectionKey key,
                                     long now)

validate

protected abstract void validate(java.util.Set<java.nio.channels.SelectionKey> keys)

sessionCreated

protected abstract void sessionCreated(java.nio.channels.SelectionKey key,
                                       IOSession session)

getSession

protected abstract IOSession getSession(java.nio.channels.SelectionKey key)

sessionClosed

protected abstract void sessionClosed(IOSession session)

getStatus

public IOReactorStatus getStatus()
Specified by:
getStatus in interface IOReactor

addChannel

public void addChannel(ChannelEntry channelEntry)

execute

protected void execute()
                throws java.io.InterruptedIOException,
                       IOReactorException
Throws:
java.io.InterruptedIOException
IOReactorException

processEvent

protected void processEvent(java.nio.channels.SelectionKey key)

queueClosedSession

protected void queueClosedSession(IOSession session)

closeSessions

protected void closeSessions()

closeNewChannels

protected void closeNewChannels()
                         throws IOReactorException
Throws:
IOReactorException

closeActiveChannels

protected void closeActiveChannels()
                            throws IOReactorException
Throws:
IOReactorException

gracefulShutdown

public void gracefulShutdown()

hardShutdown

public void hardShutdown()
                  throws IOReactorException
Throws:
IOReactorException

awaitShutdown

public void awaitShutdown(long timeout)
                   throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

shutdown

public void shutdown(long gracePeriod)
              throws IOReactorException
Specified by:
shutdown in interface IOReactor
Throws:
IOReactorException

shutdown

public void shutdown()
              throws IOReactorException
Specified by:
shutdown in interface IOReactor
Throws:
IOReactorException


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.