org.apache.http.impl.nio.reactor
Class AbstractIOReactor
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractIOReactor
public AbstractIOReactor(long selectTimeout)
throws IOReactorException
- Throws:
IOReactorException
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.