Trustin Lee wrote:
On 10/23/07, Trustin Lee <[EMAIL PROTECTED]> wrote:
<snip/>
2) WDYT about renaming MinaStateContextLookup to
IoSessionStateContextLookup and move it up to
org.apache.mina.statemachine?
3) We could mark mina-core dependency 'optional' because statemachine
module can work without mina-core.
Done in the following revision:
http://svn.apache.org/viewvc?view=rev&revision=589477
Any new idea on event types? :)
Cheers,
Trustin
Thanks for taking care of that!
I've been thinking about how one could use the IoEventType enum. One
idea is to change the @Handler annotation into a meta annotation. Other
annotations which have been annotated with @Handler can be used by the
statemachine module to build the StateMachine. Maybe something like:
@Handler(IoEnumType.class, useNullForWildcard = true)
public interface @MinaHandler {
IoEnumType on() default null
String next()
String in()
}
The @MinaHandler annotation must have the on, in, next parameters or
StateMachineFactory will complain. StateMachineFactory will have to look
at all annotations in the handler objects and see if they have been
annotated with @Handler.
Alternatively StateMachineFactory takes MinaHandler.class as a
parameter. Maybe that's a better idea?
WDYT? Could something like this work?
/Niklas