You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2009/01/19 21:52:04 UTC
svn commit: r735807 - in
/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio:
codecs/ reactor/
Author: olegk
Date: Mon Jan 19 12:52:04 2009
New Revision: 735807
URL: http://svn.apache.org/viewvc?rev=735807&view=rev
Log:
Javadoc updates
Modified:
httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java
httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java
httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageWriter.java
httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java
httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java
Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java?rev=735807&r1=735806&r2=735807&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentDecoder.java Mon Jan 19 12:52:04 2009
@@ -37,6 +37,14 @@
import org.apache.http.nio.reactor.SessionInputBuffer;
import org.apache.http.impl.io.HttpTransportMetricsImpl;
+/**
+ * Abstract {@link ContentDecoder} that serves as a base for all content
+ * decoder implementations.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
+ */
public abstract class AbstractContentDecoder implements ContentDecoder {
protected final ReadableByteChannel channel;
@@ -45,6 +53,14 @@
protected boolean completed;
+ /**
+ * Creates an instance of this class.
+ *
+ * @param channel the source channel.
+ * @param buffer the session input buffer that can be used to store
+ * session data for intermediate processing.
+ * @param metrics Transport metrics of the underlying HTTP transport.
+ */
public AbstractContentDecoder(
final ReadableByteChannel channel,
final SessionInputBuffer buffer,
Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java?rev=735807&r1=735806&r2=735807&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractContentEncoder.java Mon Jan 19 12:52:04 2009
@@ -38,6 +38,14 @@
import org.apache.http.nio.ContentEncoder;
import org.apache.http.nio.reactor.SessionOutputBuffer;
+/**
+ * Abstract {@link ContentEncoder} that serves as a base for all content
+ * encoder implementations.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
+ */
public abstract class AbstractContentEncoder implements ContentEncoder {
protected final WritableByteChannel channel;
@@ -46,6 +54,14 @@
protected boolean completed;
+ /**
+ * Creates an instance of this class.
+ *
+ * @param channel the destination channel.
+ * @param buffer the session output buffer that can be used to store
+ * session data for intermediate processing.
+ * @param metrics Transport metrics of the underlying HTTP transport.
+ */
public AbstractContentEncoder(
final WritableByteChannel channel,
final SessionOutputBuffer buffer,
Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java?rev=735807&r1=735806&r2=735807&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java Mon Jan 19 12:52:04 2009
@@ -48,6 +48,14 @@
import org.apache.http.params.HttpParams;
import org.apache.http.util.CharArrayBuffer;
+/**
+ * Abstract {@link NHttpMessageParser} that serves as a base for all message
+ * parser implementations.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
+ */
public abstract class AbstractMessageParser implements NHttpMessageParser {
private final SessionInputBuffer sessionBuffer;
@@ -67,6 +75,27 @@
private int maxHeaderCount = -1;
protected final LineParser lineParser;
+ /**
+ * Creates an instance of this class.
+ * <p>
+ * The following HTTP parameters affect the initialization:
+ * <p>
+ * {@link CoreConnectionPNames#MAX_HEADER_COUNT} parameter determines
+ * the maximum HTTP header count allowed. If set to a positive value,
+ * the number of HTTP headers received from the data stream exceeding
+ * this limit will cause an IOException. A negative or zero value will
+ * effectively disable the check. Per default the check is disabled.
+ * <p>
+ * {@link CoreConnectionPNames#MAX_LINE_LENGTH} parameter determines
+ * the maximum line length limit. If set to a positive value, any HTTP line
+ * exceeding this limit will cause an IOException. A negative or zero value
+ * will effectively disable the check the check. Per default the check is
+ * disabled.
+ *
+ * @param buffer the session input buffer.
+ * @param parser the line parser.
+ * @param params HTTP parameters.
+ */
public AbstractMessageParser(final SessionInputBuffer buffer, final LineParser parser, final HttpParams params) {
super();
if (buffer == null) {
@@ -101,6 +130,15 @@
return bytesRead;
}
+ /**
+ * Creates {@link HttpMessage} instance based on the content of the input
+ * buffer containing the first line of the incoming HTTP message.
+ *
+ * @param buffer the line buffer.
+ * @return HTTP message.
+ * @throws HttpException in case of HTTP protocol violation
+ * @throws ParseException in case of a parse error.
+ */
protected abstract HttpMessage createMessage(CharArrayBuffer buffer)
throws HttpException, ParseException;
Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageWriter.java?rev=735807&r1=735806&r2=735807&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageWriter.java (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageWriter.java Mon Jan 19 12:52:04 2009
@@ -44,12 +44,27 @@
import org.apache.http.params.HttpParams;
import org.apache.http.util.CharArrayBuffer;
+/**
+ * Abstract {@link NHttpMessageWriter} that serves as a base for all message
+ * writer implementations.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
+ */
public abstract class AbstractMessageWriter implements NHttpMessageWriter {
protected final SessionOutputBuffer sessionBuffer;
protected final CharArrayBuffer lineBuf;
protected final LineFormatter lineFormatter;
+ /**
+ * Creates an instance of this class.
+ *
+ * @param buffer the session output buffer.
+ * @param formatter the line formatter.
+ * @param params HTTP parameters.
+ */
public AbstractMessageWriter(final SessionOutputBuffer buffer,
final LineFormatter formatter,
final HttpParams params) {
@@ -66,6 +81,12 @@
public void reset() {
}
+ /**
+ * Writes out the first line of {@link HttpMessage}.
+ *
+ * @param message HTTP message.
+ * @throws HttpException in case of HTTP protocol violation
+ */
protected abstract void writeHeadLine(HttpMessage message)
throws IOException;
Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java?rev=735807&r1=735806&r2=735807&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractIOReactor.java Mon Jan 19 12:52:04 2009
@@ -56,6 +56,10 @@
* Generic implementation of {@link IOReactor} that can used as a subclass
* for more specialized I/O reactors. It is based on a single {@link Selector}
* instance.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
*/
public abstract class AbstractIOReactor implements IOReactor {
Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java?rev=735807&r1=735806&r2=735807&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor.java Mon Jan 19 12:52:04 2009
@@ -95,6 +95,10 @@
* can obtain the audit log using {@link #getAuditLog()}, 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.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
*/
public abstract class AbstractMultiworkerIOReactor implements IOReactor {
Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java?rev=735807&r1=735806&r2=735807&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/BaseIOReactor.java Mon Jan 19 12:52:04 2009
@@ -49,7 +49,11 @@
* Default implementation of {@link AbstractIOReactor} that serves as a base
* for more advanced {@link IOReactor} implementations. This class adds
* support for the I/O event dispatching using {@link IOEventDispatch},
- * management of buffering sessions, and session timeout handling.
+ * management of buffering sessions, and session timeout handling.
+ *
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
*/
public class BaseIOReactor extends AbstractIOReactor {