|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor
org.apache.http.impl.nio.reactor.DefaultListeningIOReactor
public class DefaultListeningIOReactor
Default implementation of ListeningIOReactor
. This class extends
AbstractMultiworkerIOReactor
with capability to listen for incoming
connections.
Field Summary |
---|
Fields inherited from class org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor |
---|
auditLog, exceptionHandler, params, selector, selectTimeout, status |
Constructor Summary | |
---|---|
DefaultListeningIOReactor(int workerCount,
HttpParams params)
|
|
DefaultListeningIOReactor(int workerCount,
ThreadFactory threadFactory,
HttpParams params)
|
Method Summary | |
---|---|
protected void |
cancelRequests()
Triggered to cancel pending session requests. |
Set<ListenerEndpoint> |
getEndpoints()
Returns a set of endpoints for this I/O reactor. |
ListenerEndpoint |
listen(SocketAddress address)
Opens a new listener endpoint with the given socket address. |
void |
pause()
Suspends the I/O reactor preventing it from accepting new connections on all active endpoints. |
protected void |
processEvents(int readyCount)
Triggered to process I/O events registered by the main Selector . |
void |
resume()
Resumes the I/O reactor restoring its ability to accept incoming connections on all active endpoints. |
Methods inherited from class org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor |
---|
addChannel, addExceptionEvent, addExceptionEvent, awaitShutdown, doShutdown, execute, getAuditLog, getStatus, prepareSocket, registerChannel, setExceptionHandler, shutdown, shutdown |
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, getStatus, shutdown, shutdown |
Constructor Detail |
---|
public DefaultListeningIOReactor(int workerCount, ThreadFactory threadFactory, HttpParams params) throws IOReactorException
IOReactorException
public DefaultListeningIOReactor(int workerCount, HttpParams params) throws IOReactorException
IOReactorException
Method Detail |
---|
protected void cancelRequests() throws IOReactorException
AbstractMultiworkerIOReactor
Super-classes can implement this method to react to the event.
cancelRequests
in class AbstractMultiworkerIOReactor
IOReactorException
- in case if a non-recoverable I/O error.protected void processEvents(int readyCount) throws IOReactorException
AbstractMultiworkerIOReactor
Selector
.
Super-classes can implement this method to react to the event.
processEvents
in class AbstractMultiworkerIOReactor
readyCount
- event count.
IOReactorException
- in case if a non-recoverable I/O error.public ListenerEndpoint listen(SocketAddress address)
ListeningIOReactor
listen
in interface ListeningIOReactor
address
- the socket address to listen on.
public Set<ListenerEndpoint> getEndpoints()
ListeningIOReactor
getEndpoints
in interface ListeningIOReactor
public void pause() throws IOException
ListeningIOReactor
pause
in interface ListeningIOReactor
IOException
- in case of an I/O error.public void resume() throws IOException
ListeningIOReactor
resume
in interface ListeningIOReactor
IOException
- in case of an I/O error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |