Repository: mina Updated Branches: refs/heads/2.0 085abd577 -> 86085a3da
Add the missing Javadoc Project: http://git-wip-us.apache.org/repos/asf/mina/repo Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/86085a3d Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/86085a3d Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/86085a3d Branch: refs/heads/2.0 Commit: 86085a3da89ed97d4ccf6dfc572650cc7cdab087 Parents: 085abd5 Author: Emmanuel Lécharny <elecha...@symas.com> Authored: Sat Dec 10 10:12:37 2016 +0100 Committer: Emmanuel Lécharny <elecha...@symas.com> Committed: Sat Dec 10 10:12:37 2016 +0100 ---------------------------------------------------------------------- .../statemachine/StateMachineProxyBuilder.java | 3 +++ .../annotation/IoFilterTransitions.java | 3 +++ .../annotation/IoHandlerTransitions.java | 3 +++ .../mina/statemachine/annotation/State.java | 1 + .../statemachine/annotation/Transition.java | 1 + .../annotation/TransitionAnnotation.java | 1 + .../statemachine/annotation/Transitions.java | 3 +++ .../apache/mina/statemachine/event/Event.java | 1 + .../mina/statemachine/event/IoFilterEvents.java | 21 ++++++++++++++++++++ .../statemachine/event/IoHandlerEvents.java | 17 +++++++++++++++- .../event/UnhandledEventException.java | 5 +++++ .../transition/MethodSelfTransition.java | 6 ++++++ 12 files changed, 64 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/StateMachineProxyBuilder.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/StateMachineProxyBuilder.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/StateMachineProxyBuilder.java index d9488e1..267ec31 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/StateMachineProxyBuilder.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/StateMachineProxyBuilder.java @@ -63,6 +63,9 @@ public class StateMachineProxyBuilder { */ private ClassLoader defaultCl = null; + /** + * Creates a new StateMachineProxyBuilder instance + */ public StateMachineProxyBuilder() { } http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoFilterTransitions.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoFilterTransitions.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoFilterTransitions.java index 7a7855e..17e4439 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoFilterTransitions.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoFilterTransitions.java @@ -37,5 +37,8 @@ import org.apache.mina.statemachine.StateMachine; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface IoFilterTransitions { + /** + * @return The list of {@link IoFilterTransition}s + */ IoFilterTransition[] value(); } http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoHandlerTransitions.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoHandlerTransitions.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoHandlerTransitions.java index bddc374..b2c0806 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoHandlerTransitions.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/IoHandlerTransitions.java @@ -37,5 +37,8 @@ import org.apache.mina.statemachine.StateMachine; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface IoHandlerTransitions { + /** + * @return The list of {@link IoHandlerTransition}s + */ IoHandlerTransition[] value(); } http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/State.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/State.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/State.java index 27b9eea..c626190 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/State.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/State.java @@ -34,6 +34,7 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface State { + /** The intial state */ public static final String ROOT = "__root__"; /** http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transition.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transition.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transition.java index e7c9925..8ccd6f3 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transition.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transition.java @@ -37,6 +37,7 @@ import org.apache.mina.statemachine.event.Event; @Target(ElementType.METHOD) @TransitionAnnotation(Transitions.class) public @interface Transition { + /** The self transition */ public static final String SELF = "__self__"; /** http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/TransitionAnnotation.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/TransitionAnnotation.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/TransitionAnnotation.java index b11eeac..07fdb60 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/TransitionAnnotation.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/TransitionAnnotation.java @@ -35,5 +35,6 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface TransitionAnnotation { + /** The specific annotation class */ Class<? extends Annotation> value(); } http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transitions.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transitions.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transitions.java index 0b4d102..9be3b63 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transitions.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/annotation/Transitions.java @@ -32,5 +32,8 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Transitions { + /** + * @return The list of {@link Transition}s + */ Transition[] value(); } http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/Event.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/Event.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/Event.java index 5cf2580..fad0475 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/Event.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/Event.java @@ -29,6 +29,7 @@ import org.apache.mina.statemachine.context.StateContext; * @author <a href="http://mina.apache.org">Apache MINA Project</a> */ public class Event { + /** The wildcard event */ public static final String WILDCARD_EVENT_ID = "*"; private final Object id; http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java index 16dccdc..dc2076f 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java @@ -29,16 +29,37 @@ import org.apache.mina.statemachine.annotation.IoFilterTransition; * @author <a href="http://mina.apache.org">Apache MINA Project</a> */ public enum IoFilterEvents { + /** The wildcard event */ ANY(Event.WILDCARD_EVENT_ID), + + /** The Session Created event */ SESSION_CREATED("sessionCreated"), + + /** The Session Opened event */ SESSION_OPENED("sessionOpened"), + + /** The Session Closed event */ SESSION_CLOSED("sessionClosed"), + + /** The Session Idle event */ SESSION_IDLE("sessionIdle"), + + /** The Message Received event */ MESSAGE_RECEIVED("messageReceived"), + + /** The Message Sent event */ MESSAGE_SENT("messageSent"), + + /** The Exception Caught event */ EXCEPTION_CAUGHT("exceptionCaught"), + + /** The Close event */ CLOSE("filterClose"), + + /** The Write event */ WRITE("filterWrite"), + + /** The Set Traffic Mask event */ SET_TRAFFIC_MASK("filterSetTrafficMask"); private final String value; http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java index 5b1dc0b..34f9e32 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java @@ -29,13 +29,28 @@ import org.apache.mina.statemachine.annotation.IoHandlerTransition; * @author <a href="http://mina.apache.org">Apache MINA Project</a> */ public enum IoHandlerEvents { - ANY(Event.WILDCARD_EVENT_ID), + /** The wildcard event */ + ANY(Event.WILDCARD_EVENT_ID), + + /** The Session Created event */ SESSION_CREATED("sessionCreated"), + + /** The Session Opened event */ SESSION_OPENED("sessionOpened"), + + /** The Session Opened event */ SESSION_CLOSED("sessionClosed"), + + /** The Session Idle event */ SESSION_IDLE("sessionIdle"), + + /** The Message Recived event */ MESSAGE_RECEIVED("messageReceived"), + + /** The Message Sent event */ MESSAGE_SENT("messageSent"), + + /** The Exception Caught event */ EXCEPTION_CAUGHT("exceptionCaught"); private final String value; http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/UnhandledEventException.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/UnhandledEventException.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/UnhandledEventException.java index c4039fd..1839d32 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/UnhandledEventException.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/UnhandledEventException.java @@ -29,6 +29,11 @@ public class UnhandledEventException extends RuntimeException { private final Event event; + /** + * Creates a new UnhandledEventException instance + * + * @param event The unhandled event + */ public UnhandledEventException(Event event) { super("Unhandled event: " + event); this.event = event; http://git-wip-us.apache.org/repos/asf/mina/blob/86085a3d/mina-statemachine/src/main/java/org/apache/mina/statemachine/transition/MethodSelfTransition.java ---------------------------------------------------------------------- diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/transition/MethodSelfTransition.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/transition/MethodSelfTransition.java index 26156da..40c62a0 100644 --- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/transition/MethodSelfTransition.java +++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/transition/MethodSelfTransition.java @@ -51,6 +51,12 @@ public class MethodSelfTransition extends AbstractSelfTransition { private static final Object[] EMPTY_ARGUMENTS = new Object[0]; + /** + * Creates a new MethodSelfTransition instance + * + * @param method The method to invoke + * @param target The target object + */ public MethodSelfTransition(Method method, Object target) { super(); this.method = method;