From a1baeeb8c069153682bbb3597f3bc1be54afe4f7 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Thu, 20 Dec 2012 15:45:35 +0100 Subject: [PATCH] Mark IdleStateEvent as final and add javadocs --- .../io/netty/handler/timeout/IdleStateEvent.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/handler/src/main/java/io/netty/handler/timeout/IdleStateEvent.java b/handler/src/main/java/io/netty/handler/timeout/IdleStateEvent.java index 3383598854..c5ee6567ef 100644 --- a/handler/src/main/java/io/netty/handler/timeout/IdleStateEvent.java +++ b/handler/src/main/java/io/netty/handler/timeout/IdleStateEvent.java @@ -23,12 +23,19 @@ import io.netty.channel.Channel; * @apiviz.landmark * @apiviz.has io.netty.handler.timeout.IdleState oneway - - */ -public class IdleStateEvent { +public final class IdleStateEvent { private final IdleState state; private final int count; private final long durationMillis; + /** + * Create a new instance + * + * @param state the detailed idle state. + * @param count the count how often this kind of {@IdleStateEvent} was fired before + * @param durationMillis the duration which caused the {@link IdleStateEvent} to get fired in milliseconds + */ public IdleStateEvent(IdleState state, int count, long durationMillis) { if (state == null) { throw new NullPointerException("state"); @@ -53,10 +60,16 @@ public class IdleStateEvent { return state; } + /** + * Return the count how often this kind of {@IdleStateEvent} was fired before. + */ public int count() { return count; } + /** + * Return the duration which caused the {@link IdleStateEvent} to get fired in milliseconds. + */ public long durationMillis() { return durationMillis; }