diff --git a/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java b/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java index 4e7eb64821..88dd1cb72d 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java @@ -71,6 +71,9 @@ import org.jboss.netty.util.TimerTask; * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) * @version $Rev$, $Date$ + * + * @see ReadTimeoutHandler + * @see WriteTimeoutHandler */ @ChannelPipelineCoverage("one") public class IdleStateHandler extends SimpleChannelUpstreamHandler diff --git a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java index 5d5a3195f8..18220b0263 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java @@ -39,9 +39,15 @@ import org.jboss.netty.util.Timer; import org.jboss.netty.util.TimerTask; /** + * Raises a {@link ReadTimeoutException} when no data was read within a certain + * period of time. + * * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) * @version $Rev$, $Date$ + * + * @see WriteTimeoutHandler + * @see IdleStateHandler */ @ChannelPipelineCoverage("one") public class ReadTimeoutHandler extends SimpleChannelUpstreamHandler @@ -56,10 +62,28 @@ public class ReadTimeoutHandler extends SimpleChannelUpstreamHandler private volatile ReadTimeoutTask task; volatile long lastReadTime; + /** + * Creates a new instance. + * + * @param timer + * the {@link Timer} that is used to trigger the scheduled event + * @param timeoutSeconds + * read timeout in seconds + */ public ReadTimeoutHandler(Timer timer, int timeoutSeconds) { this(timer, timeoutSeconds, TimeUnit.SECONDS); } + /** + * Creates a new instance. + * + * @param timer + * the {@link Timer} that is used to trigger the scheduled event + * @param timeout + * read timeout + * @param unit + * the {@link TimeUnit} of {@code timeout} + */ public ReadTimeoutHandler(Timer timer, long timeout, TimeUnit unit) { if (timer == null) { throw new NullPointerException("timer"); diff --git a/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java b/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java index dc6bfcd525..53bf0fde72 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java @@ -39,9 +39,15 @@ import org.jboss.netty.util.Timer; import org.jboss.netty.util.TimerTask; /** + * Raises a {@link WriteTimeoutException} when no data was written within a + * certain period of time. + * * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) * @version $Rev$, $Date$ + * + * @see ReadTimeoutHandler + * @see IdleStateHandler */ @ChannelPipelineCoverage("all") public class WriteTimeoutHandler extends SimpleChannelDownstreamHandler @@ -52,10 +58,28 @@ public class WriteTimeoutHandler extends SimpleChannelDownstreamHandler private final Timer timer; private final long timeoutMillis; + /** + * Creates a new instance. + * + * @param timer + * the {@link Timer} that is used to trigger the scheduled event + * @param timeoutSeconds + * write timeout in seconds + */ public WriteTimeoutHandler(Timer timer, int timeoutSeconds) { this(timer, timeoutSeconds, TimeUnit.SECONDS); } + /** + * Creates a new instance. + * + * @param timer + * the {@link Timer} that is used to trigger the scheduled event + * @param timeout + * write timeout + * @param unit + * the {@link TimeUnit} of {@code timeout} + */ public WriteTimeoutHandler(Timer timer, long timeout, TimeUnit unit) { if (timer == null) { throw new NullPointerException("timer");