blob: b5f8d6d8826db23fe8d9f2bcef25258c20f2454e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Tue Sep 18 20:44:15 GMT+01:00 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
AbstractMultiworkerIOReactor (HttpComponents Core 4.2.2 API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="AbstractMultiworkerIOReactor (HttpComponents Core 4.2.2 API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractMultiworkerIOReactor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractIOReactor.html" title="class in org.apache.http.impl.nio.reactor"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/BaseIOReactor.html" title="class in org.apache.http.impl.nio.reactor"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AbstractMultiworkerIOReactor.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.http.impl.nio.reactor</FONT>
<BR>
Class AbstractMultiworkerIOReactor</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html" title="interface in org.apache.http.nio.reactor">IOReactor</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../../org/apache/http/impl/nio/reactor/DefaultConnectingIOReactor.html" title="class in org.apache.http.impl.nio.reactor">DefaultConnectingIOReactor</A>, <A HREF="../../../../../../org/apache/http/impl/nio/reactor/DefaultListeningIOReactor.html" title="class in org.apache.http.impl.nio.reactor">DefaultListeningIOReactor</A></DD>
</DL>
<HR>
<DL>
<DT><PRE><FONT SIZE="-1"><A HREF="../../../../../../org/apache/http/annotation/ThreadSafe.html" title="annotation in org.apache.http.annotation">@ThreadSafe</A>
</FONT>public abstract class <B>AbstractMultiworkerIOReactor</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html" title="interface in org.apache.http.nio.reactor">IOReactor</A></DL>
</PRE>
<P>
Generic implementation of <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html" title="interface in org.apache.http.nio.reactor"><CODE>IOReactor</CODE></A> that can run multiple
<A HREF="../../../../../../org/apache/http/impl/nio/reactor/BaseIOReactor.html" title="class in org.apache.http.impl.nio.reactor"><CODE>BaseIOReactor</CODE></A> instance in separate worker threads and distribute
newly created I/O session equally across those I/O reactors for a more
optimal resource utilization and a better I/O performance. Usually it is
recommended to have one worker I/O reactor per physical CPU core.
<p>
<strong>Important note about exception handling</strong>
<p>
Protocol specific exceptions as well as those I/O exceptions thrown in the
course of interaction with the session's channel are to be expected are to be
dealt with by specific protocol handlers. These exceptions may result in
termination of an individual session but should not affect the I/O reactor
and all other active sessions. There are situations, however, when the I/O
reactor itself encounters an internal problem such as an I/O exception in
the underlying NIO classes or an unhandled runtime exception. Those types of
exceptions are usually fatal and will cause the I/O reactor to shut down
automatically.
<p>
There is a possibility to override this behavior and prevent I/O reactors
from shutting down automatically in case of a runtime exception or an I/O
exception in internal classes. This can be accomplished by providing a custom
implementation of the <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorExceptionHandler.html" title="interface in org.apache.http.nio.reactor"><CODE>IOReactorExceptionHandler</CODE></A> interface.
<p>
If an I/O reactor is unable to automatically recover from an I/O or a runtime
exception it will enter the shutdown mode. First off, it cancel all pending
new session requests. Then it will attempt to close all active I/O sessions
gracefully giving them some time to flush pending output data and terminate
cleanly. Lastly, it will forcibly shut down those I/O sessions that still
remain active after the grace period. This is a fairly complex process, where
many things can fail at the same time and many different exceptions can be
thrown in the course of the shutdown process. The I/O reactor will record all
exceptions thrown during the shutdown process, including the original one
that actually caused the shutdown in the first place, in an audit log. One
can obtain the audit log using <A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#getAuditLog()"><CODE>getAuditLog()</CODE></A>, examine exceptions
thrown by the I/O reactor prior and in the course of the reactor shutdown
and decide whether it is safe to restart the I/O reactor.
<p>
The following parameters can be used to customize the behavior of this
class:
<ul>
<li><A HREF="../../../../../../org/apache/http/params/CoreConnectionPNames.html#TCP_NODELAY"><CODE>CoreConnectionPNames.TCP_NODELAY</CODE></A></li>
<li><A HREF="../../../../../../org/apache/http/params/CoreConnectionPNames.html#SO_TIMEOUT"><CODE>CoreConnectionPNames.SO_TIMEOUT</CODE></A></li>
<li><A HREF="../../../../../../org/apache/http/params/CoreConnectionPNames.html#SO_LINGER"><CODE>CoreConnectionPNames.SO_LINGER</CODE></A></li>
<li><A HREF="../../../../../../org/apache/http/nio/params/NIOReactorPNames.html#SELECT_INTERVAL"><CODE>NIOReactorPNames.SELECT_INTERVAL</CODE></A></li>
<li><A HREF="../../../../../../org/apache/http/nio/params/NIOReactorPNames.html#GRACE_PERIOD"><CODE>NIOReactorPNames.GRACE_PERIOD</CODE></A></li>
<li><A HREF="../../../../../../org/apache/http/nio/params/NIOReactorPNames.html#INTEREST_OPS_QUEUEING"><CODE>NIOReactorPNames.INTEREST_OPS_QUEUEING</CODE></A></li>
</ul>
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>4.0</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/ExceptionEvent.html" title="class in org.apache.http.impl.nio.reactor">ExceptionEvent</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#auditLog">auditLog</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/IOReactorConfig.html" title="class in org.apache.http.impl.nio.reactor">IOReactorConfig</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#config">config</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorExceptionHandler.html" title="interface in org.apache.http.nio.reactor">IOReactorExceptionHandler</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#exceptionHandler">exceptionHandler</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#interestOpsQueueing">interestOpsQueueing</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/http/params/HttpParams.html" title="interface in org.apache.http.params">HttpParams</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#params">params</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>(4.2)</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/Selector.html" title="class or interface in java.nio.channels">Selector</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#selector">selector</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#selectTimeout">selectTimeout</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorStatus.html" title="enum in org.apache.http.nio.reactor">IOReactorStatus</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#status">status</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#AbstractMultiworkerIOReactor()">AbstractMultiworkerIOReactor</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of AbstractMultiworkerIOReactor with default configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#AbstractMultiworkerIOReactor(int, java.util.concurrent.ThreadFactory, org.apache.http.params.HttpParams)">AbstractMultiworkerIOReactor</A></B>(int&nbsp;workerCount,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html" title="class or interface in java.util.concurrent">ThreadFactory</A>&nbsp;threadFactory,
<A HREF="../../../../../../org/apache/http/params/HttpParams.html" title="interface in org.apache.http.params">HttpParams</A>&nbsp;params)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#AbstractMultiworkerIOReactor(org.apache.http.impl.nio.reactor.IOReactorConfig, java.util.concurrent.ThreadFactory)"><CODE>AbstractMultiworkerIOReactor(IOReactorConfig, ThreadFactory)</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#AbstractMultiworkerIOReactor(org.apache.http.impl.nio.reactor.IOReactorConfig, java.util.concurrent.ThreadFactory)">AbstractMultiworkerIOReactor</A></B>(<A HREF="../../../../../../org/apache/http/impl/nio/reactor/IOReactorConfig.html" title="class in org.apache.http.impl.nio.reactor">IOReactorConfig</A>&nbsp;config,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html" title="class or interface in java.util.concurrent">ThreadFactory</A>&nbsp;threadFactory)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of AbstractMultiworkerIOReactor with the given configuration.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#addChannel(org.apache.http.impl.nio.reactor.ChannelEntry)">addChannel</A></B>(<A HREF="../../../../../../org/apache/http/impl/nio/reactor/ChannelEntry.html" title="class in org.apache.http.impl.nio.reactor">ChannelEntry</A>&nbsp;entry)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assigns the given channel entry to one of the worker I/O reactors.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#addExceptionEvent(java.lang.Throwable)">addExceptionEvent</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A>&nbsp;ex)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang"><CODE>Throwable</CODE></A> object to the audit log.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#addExceptionEvent(java.lang.Throwable, java.util.Date)">addExceptionEvent</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A>&nbsp;ex,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A>&nbsp;timestamp)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang"><CODE>Throwable</CODE></A> object with the given time stamp
to the audit log.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#awaitShutdown(long)">awaitShutdown</A></B>(long&nbsp;timeout)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blocks for the given period of time in milliseconds awaiting
the completion of the reactor shutdown.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#cancelRequests()">cancelRequests</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Triggered to cancel pending session requests.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#doShutdown()">doShutdown</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Activates the shutdown sequence for this reactor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#execute(org.apache.http.nio.reactor.IOEventDispatch)">execute</A></B>(<A HREF="../../../../../../org/apache/http/nio/reactor/IOEventDispatch.html" title="interface in org.apache.http.nio.reactor">IOEventDispatch</A>&nbsp;eventDispatch)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Activates the main I/O reactor as well as all worker I/O reactors.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/ExceptionEvent.html" title="class in org.apache.http.impl.nio.reactor">ExceptionEvent</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#getAuditLog()">getAuditLog</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the audit log containing exceptions thrown by the I/O reactor
prior and in the course of the reactor shutdown.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorStatus.html" title="enum in org.apache.http.nio.reactor">IOReactorStatus</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#getStatus()">getStatus</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current status of the reactor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#prepareSocket(java.net.Socket)">prepareSocket</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html" title="class or interface in java.net">Socket</A>&nbsp;socket)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prepares the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html" title="class or interface in java.net"><CODE>Socket</CODE></A> by resetting some of its properties.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#processEvents(int)">processEvents</A></B>(int&nbsp;count)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Triggered to process I/O events registered by the main <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/Selector.html" title="class or interface in java.nio.channels"><CODE>Selector</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SelectionKey.html" title="class or interface in java.nio.channels">SelectionKey</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#registerChannel(java.nio.channels.SelectableChannel, int)">registerChannel</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SelectableChannel.html" title="class or interface in java.nio.channels">SelectableChannel</A>&nbsp;channel,
int&nbsp;ops)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the given channel with the main <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/Selector.html" title="class or interface in java.nio.channels"><CODE>Selector</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#setExceptionHandler(org.apache.http.nio.reactor.IOReactorExceptionHandler)">setExceptionHandler</A></B>(<A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorExceptionHandler.html" title="interface in org.apache.http.nio.reactor">IOReactorExceptionHandler</A>&nbsp;exceptionHandler)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets exception handler for this I/O reactor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#shutdown()">shutdown</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initiates shutdown of the reactor and blocks for a default period of
time waiting for the reactor to terminate all active connections, to shut
down itself and to release system resources it currently holds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#shutdown(long)">shutdown</A></B>(long&nbsp;waitMs)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initiates shutdown of the reactor and blocks approximately for the given
period of time in milliseconds waiting for the reactor to terminate all
active connections, to shut down itself and to release system resources
it currently holds.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="status"><!-- --></A><H3>
status</H3>
<PRE>
protected volatile <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorStatus.html" title="enum in org.apache.http.nio.reactor">IOReactorStatus</A> <B>status</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="params"><!-- --></A><H3>
params</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A>
</FONT>protected final <A HREF="../../../../../../org/apache/http/params/HttpParams.html" title="interface in org.apache.http.params">HttpParams</A> <B>params</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>(4.2)</I><DL>
</DL>
</DL>
<HR>
<A NAME="config"><!-- --></A><H3>
config</H3>
<PRE>
protected final <A HREF="../../../../../../org/apache/http/impl/nio/reactor/IOReactorConfig.html" title="class in org.apache.http.impl.nio.reactor">IOReactorConfig</A> <B>config</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="selector"><!-- --></A><H3>
selector</H3>
<PRE>
protected final <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/Selector.html" title="class or interface in java.nio.channels">Selector</A> <B>selector</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="selectTimeout"><!-- --></A><H3>
selectTimeout</H3>
<PRE>
protected final long <B>selectTimeout</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="interestOpsQueueing"><!-- --></A><H3>
interestOpsQueueing</H3>
<PRE>
protected final boolean <B>interestOpsQueueing</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="exceptionHandler"><!-- --></A><H3>
exceptionHandler</H3>
<PRE>
protected <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorExceptionHandler.html" title="interface in org.apache.http.nio.reactor">IOReactorExceptionHandler</A> <B>exceptionHandler</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="auditLog"><!-- --></A><H3>
auditLog</H3>
<PRE>
protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/ExceptionEvent.html" title="class in org.apache.http.impl.nio.reactor">ExceptionEvent</A>&gt; <B>auditLog</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="AbstractMultiworkerIOReactor(org.apache.http.impl.nio.reactor.IOReactorConfig, java.util.concurrent.ThreadFactory)"><!-- --></A><H3>
AbstractMultiworkerIOReactor</H3>
<PRE>
public <B>AbstractMultiworkerIOReactor</B>(<A HREF="../../../../../../org/apache/http/impl/nio/reactor/IOReactorConfig.html" title="class in org.apache.http.impl.nio.reactor">IOReactorConfig</A>&nbsp;config,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html" title="class or interface in java.util.concurrent">ThreadFactory</A>&nbsp;threadFactory)
throws <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></PRE>
<DL>
<DD>Creates an instance of AbstractMultiworkerIOReactor with the given configuration.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>config</CODE> - I/O reactor configuration.<DD><CODE>threadFactory</CODE> - the factory to create threads.
Can be <code>null</code>.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></CODE> - in case if a non-recoverable I/O error.<DT><B>Since:</B></DT>
<DD>4.2</DD>
</DL>
</DL>
<HR>
<A NAME="AbstractMultiworkerIOReactor()"><!-- --></A><H3>
AbstractMultiworkerIOReactor</H3>
<PRE>
public <B>AbstractMultiworkerIOReactor</B>()
throws <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></PRE>
<DL>
<DD>Creates an instance of AbstractMultiworkerIOReactor with default configuration.
<P>
<DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></CODE> - in case if a non-recoverable I/O error.<DT><B>Since:</B></DT>
<DD>4.2</DD>
</DL>
</DL>
<HR>
<A NAME="AbstractMultiworkerIOReactor(int, java.util.concurrent.ThreadFactory, org.apache.http.params.HttpParams)"><!-- --></A><H3>
AbstractMultiworkerIOReactor</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A>
</FONT>public <B>AbstractMultiworkerIOReactor</B>(int&nbsp;workerCount,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html" title="class or interface in java.util.concurrent">ThreadFactory</A>&nbsp;threadFactory,
<A HREF="../../../../../../org/apache/http/params/HttpParams.html" title="interface in org.apache.http.params">HttpParams</A>&nbsp;params)
throws <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#AbstractMultiworkerIOReactor(org.apache.http.impl.nio.reactor.IOReactorConfig, java.util.concurrent.ThreadFactory)"><CODE>AbstractMultiworkerIOReactor(IOReactorConfig, ThreadFactory)</CODE></A></I>
<P>
<DD>Creates an instance of AbstractMultiworkerIOReactor.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>workerCount</CODE> - number of worker I/O reactors.<DD><CODE>threadFactory</CODE> - the factory to create threads.
Can be <code>null</code>.<DD><CODE>params</CODE> - HTTP parameters.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></CODE> - in case if a non-recoverable I/O error.</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getStatus()"><!-- --></A><H3>
getStatus</H3>
<PRE>
public <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorStatus.html" title="enum in org.apache.http.nio.reactor">IOReactorStatus</A> <B>getStatus</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html#getStatus()">IOReactor</A></CODE></B></DD>
<DD>Returns the current status of the reactor.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html#getStatus()">getStatus</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html" title="interface in org.apache.http.nio.reactor">IOReactor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>reactor status.</DL>
</DD>
</DL>
<HR>
<A NAME="getAuditLog()"><!-- --></A><H3>
getAuditLog</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/ExceptionEvent.html" title="class in org.apache.http.impl.nio.reactor">ExceptionEvent</A>&gt; <B>getAuditLog</B>()</PRE>
<DL>
<DD>Returns the audit log containing exceptions thrown by the I/O reactor
prior and in the course of the reactor shutdown.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>audit log.</DL>
</DD>
</DL>
<HR>
<A NAME="addExceptionEvent(java.lang.Throwable, java.util.Date)"><!-- --></A><H3>
addExceptionEvent</H3>
<PRE>
protected void <B>addExceptionEvent</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A>&nbsp;ex,
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A>&nbsp;timestamp)</PRE>
<DL>
<DD>Adds the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang"><CODE>Throwable</CODE></A> object with the given time stamp
to the audit log.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ex</CODE> - the exception thrown by the I/O reactor.<DD><CODE>timestamp</CODE> - the time stamp of the exception. Can be
<code>null</code> in which case the current date / time will be used.</DL>
</DD>
</DL>
<HR>
<A NAME="addExceptionEvent(java.lang.Throwable)"><!-- --></A><H3>
addExceptionEvent</H3>
<PRE>
protected void <B>addExceptionEvent</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A>&nbsp;ex)</PRE>
<DL>
<DD>Adds the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang"><CODE>Throwable</CODE></A> object to the audit log.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ex</CODE> - the exception thrown by the I/O reactor.</DL>
</DD>
</DL>
<HR>
<A NAME="setExceptionHandler(org.apache.http.nio.reactor.IOReactorExceptionHandler)"><!-- --></A><H3>
setExceptionHandler</H3>
<PRE>
public void <B>setExceptionHandler</B>(<A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorExceptionHandler.html" title="interface in org.apache.http.nio.reactor">IOReactorExceptionHandler</A>&nbsp;exceptionHandler)</PRE>
<DL>
<DD>Sets exception handler for this I/O reactor.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exceptionHandler</CODE> - the exception handler.</DL>
</DD>
</DL>
<HR>
<A NAME="processEvents(int)"><!-- --></A><H3>
processEvents</H3>
<PRE>
protected abstract void <B>processEvents</B>(int&nbsp;count)
throws <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></PRE>
<DL>
<DD>Triggered to process I/O events registered by the main <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/Selector.html" title="class or interface in java.nio.channels"><CODE>Selector</CODE></A>.
<p>
Super-classes can implement this method to react to the event.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>count</CODE> - event count.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></CODE> - in case if a non-recoverable I/O error.</DL>
</DD>
</DL>
<HR>
<A NAME="cancelRequests()"><!-- --></A><H3>
cancelRequests</H3>
<PRE>
protected abstract void <B>cancelRequests</B>()
throws <A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></PRE>
<DL>
<DD>Triggered to cancel pending session requests.
<p>
Super-classes can implement this method to react to the event.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></CODE> - in case if a non-recoverable I/O error.</DL>
</DD>
</DL>
<HR>
<A NAME="execute(org.apache.http.nio.reactor.IOEventDispatch)"><!-- --></A><H3>
execute</H3>
<PRE>
public void <B>execute</B>(<A HREF="../../../../../../org/apache/http/nio/reactor/IOEventDispatch.html" title="interface in org.apache.http.nio.reactor">IOEventDispatch</A>&nbsp;eventDispatch)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/InterruptedIOException.html" title="class or interface in java.io">InterruptedIOException</A>,
<A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></PRE>
<DL>
<DD>Activates the main I/O reactor as well as all worker I/O reactors.
The I/O main reactor will start reacting to I/O events and triggering
notification methods. The worker I/O reactor in their turn will start
reacting to I/O events and dispatch I/O event notifications to the given
<A HREF="../../../../../../org/apache/http/nio/reactor/IOEventDispatch.html" title="interface in org.apache.http.nio.reactor"><CODE>IOEventDispatch</CODE></A> interface.
<p>
This method will enter the infinite I/O select loop on
the <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/Selector.html" title="class or interface in java.nio.channels"><CODE>Selector</CODE></A> instance associated with this I/O reactor and used
to manage creation of new I/O channels. Once a new I/O channel has been
created the processing of I/O events on that channel will be delegated
to one of the worker I/O reactors.
<p>
The method will remain blocked unto the I/O reactor is shut down or the
execution thread is interrupted.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html#execute(org.apache.http.nio.reactor.IOEventDispatch)">execute</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html" title="interface in org.apache.http.nio.reactor">IOReactor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>eventDispatch</CODE> - the I/O event dispatch.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/InterruptedIOException.html" title="class or interface in java.io">InterruptedIOException</A></CODE> - if the dispatch thread is interrupted.
<DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactorException.html" title="class in org.apache.http.nio.reactor">IOReactorException</A></CODE> - in case if a non-recoverable I/O error.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#processEvents(int)"><CODE>processEvents(int)</CODE></A>,
<A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html#cancelRequests()"><CODE>cancelRequests()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="doShutdown()"><!-- --></A><H3>
doShutdown</H3>
<PRE>
protected void <B>doShutdown</B>()
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/InterruptedIOException.html" title="class or interface in java.io">InterruptedIOException</A></PRE>
<DL>
<DD>Activates the shutdown sequence for this reactor. This method will cancel
all pending session requests, close out all active I/O channels,
make an attempt to terminate all worker I/O reactors gracefully,
and finally force-terminate those I/O reactors that failed to
terminate after the specified grace period.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/InterruptedIOException.html" title="class or interface in java.io">InterruptedIOException</A></CODE> - if the shutdown sequence has been
interrupted.</DL>
</DD>
</DL>
<HR>
<A NAME="addChannel(org.apache.http.impl.nio.reactor.ChannelEntry)"><!-- --></A><H3>
addChannel</H3>
<PRE>
protected void <B>addChannel</B>(<A HREF="../../../../../../org/apache/http/impl/nio/reactor/ChannelEntry.html" title="class in org.apache.http.impl.nio.reactor">ChannelEntry</A>&nbsp;entry)</PRE>
<DL>
<DD>Assigns the given channel entry to one of the worker I/O reactors.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>entry</CODE> - the channel entry.</DL>
</DD>
</DL>
<HR>
<A NAME="registerChannel(java.nio.channels.SelectableChannel, int)"><!-- --></A><H3>
registerChannel</H3>
<PRE>
protected <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SelectionKey.html" title="class or interface in java.nio.channels">SelectionKey</A> <B>registerChannel</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SelectableChannel.html" title="class or interface in java.nio.channels">SelectableChannel</A>&nbsp;channel,
int&nbsp;ops)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/ClosedChannelException.html" title="class or interface in java.nio.channels">ClosedChannelException</A></PRE>
<DL>
<DD>Registers the given channel with the main <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/Selector.html" title="class or interface in java.nio.channels"><CODE>Selector</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>channel</CODE> - the channel.<DD><CODE>ops</CODE> - interest ops.
<DT><B>Returns:</B><DD>selection key.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/channels/ClosedChannelException.html" title="class or interface in java.nio.channels">ClosedChannelException</A></CODE> - if the channel has been already closed.</DL>
</DD>
</DL>
<HR>
<A NAME="prepareSocket(java.net.Socket)"><!-- --></A><H3>
prepareSocket</H3>
<PRE>
protected void <B>prepareSocket</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html" title="class or interface in java.net">Socket</A>&nbsp;socket)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Prepares the given <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html" title="class or interface in java.net"><CODE>Socket</CODE></A> by resetting some of its properties.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>socket</CODE> - the socket
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - in case of an I/O error.</DL>
</DD>
</DL>
<HR>
<A NAME="awaitShutdown(long)"><!-- --></A><H3>
awaitShutdown</H3>
<PRE>
protected void <B>awaitShutdown</B>(long&nbsp;timeout)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></PRE>
<DL>
<DD>Blocks for the given period of time in milliseconds awaiting
the completion of the reactor shutdown. If the value of
<code>timeout</code> is set to <code>0</code> this method blocks
indefinitely.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the maximum wait time.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/InterruptedException.html" title="class or interface in java.lang">InterruptedException</A></CODE> - if interrupted.</DL>
</DD>
</DL>
<HR>
<A NAME="shutdown()"><!-- --></A><H3>
shutdown</H3>
<PRE>
public void <B>shutdown</B>()
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html#shutdown()">IOReactor</A></CODE></B></DD>
<DD>Initiates shutdown of the reactor and blocks for a default period of
time waiting for the reactor to terminate all active connections, to shut
down itself and to release system resources it currently holds. It is
up to individual implementations to decide for how long this method can
remain blocked.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html#shutdown()">shutdown</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html" title="interface in org.apache.http.nio.reactor">IOReactor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - in case of an I/O error.</DL>
</DD>
</DL>
<HR>
<A NAME="shutdown(long)"><!-- --></A><H3>
shutdown</H3>
<PRE>
public void <B>shutdown</B>(long&nbsp;waitMs)
throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html#shutdown(long)">IOReactor</A></CODE></B></DD>
<DD>Initiates shutdown of the reactor and blocks approximately for the given
period of time in milliseconds waiting for the reactor to terminate all
active connections, to shut down itself and to release system resources
it currently holds.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html#shutdown(long)">shutdown</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/http/nio/reactor/IOReactor.html" title="interface in org.apache.http.nio.reactor">IOReactor</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>waitMs</CODE> - wait time in milliseconds.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - in case of an I/O error.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractMultiworkerIOReactor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/AbstractIOReactor.html" title="class in org.apache.http.impl.nio.reactor"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/http/impl/nio/reactor/BaseIOReactor.html" title="class in org.apache.http.impl.nio.reactor"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AbstractMultiworkerIOReactor.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2005-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>