On 10/29/07, Niklas Therning <[EMAIL PROTECTED]> wrote:
> >
> > Any new idea on event types? :)
> >
>
> 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.

Uh... It sounds too complex?

> Alternatively StateMachineFactory takes MinaHandler.class as a
> parameter. Maybe that's a better idea?

Could you provide me some example code if StateMachineFactory takes
MinaHandler.class as a parameter?  Isn't MinaHandler a method
annotation?  How can I specify an annotation as a parameter?

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to