Hi,

I have some questions regarding the Mina state machine project.

   1. First of all I'm wondering if it's possible to define the state
   defintions (i.e. the final static fields annotated with @State) externally
   and not within a handler since I cannot find a way to do this right now?
   Let's say you have two handlers A & B and some of the state definitions are
   shared between the two then you need to duplicate the state definition to
   both A & B instead of just importing it from a common state definition
   class/context. I.e. I'd like to see something like:   "StateMachine sm =
   
StateMachineFactory.getInstance(Transition.class).create(MyState.CREATE_POLICY_PROTECTIONS,
   MyState.class, instanceOfHandlerA, instanceOfHandlerB)" because then you
   don't have to duplicate the state definitions if they are shared by multiple
   handlers. Or is this even possible today? Or is this a bad thing?
   2. Why can you only annotate Strings with @State? It would be nice to be
   able to annotate an Enum for example (you use @State at the class-level of
   the enum and then Mina SM can know that each Enum (or it's string
   representation) should be used as the state).

/Johan

Reply via email to