org.apache.mina.statemachine.annotation
Annotation Type Transition


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Transition

Annotation used on methods to indicate that the method handles a specific kind of event when in a specific state.

Version:
$Rev: 592475 $, $Date: 2007-11-06 17:03:42 +0100 (mar, 06 nov 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Required Element Summary
 String[] in
          The id of the state or states that this handler applies to.
 
Optional Element Summary
 String next
          The id of the state the StateMachine should move to next after executing the annotated method.
 String[] on
          Specifies the ids of one or more events handled by the annotated method.
 int weight
          The weight used to order handler annotations which match the same event in the same state.
 

Element Detail

in

public abstract String[] in
The id of the state or states that this handler applies to. Must be specified.

on

public abstract String[] on
Specifies the ids of one or more events handled by the annotated method. If not specified the handler method will be executed for any event.

Default:
"*"

next

public abstract String next
The id of the state the StateMachine should move to next after executing the annotated method. If not specified the StateMachine will remain in the same state.

Default:
"__self__"

weight

public abstract int weight
The weight used to order handler annotations which match the same event in the same state. Transitions with lower weight will be matched first. The default weight is 0.

Default:
0


Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.