[
https://issues.apache.org/jira/browse/DIRMINA-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540349
]
Niklas Therning commented on DIRMINA-463:
-----------------------------------------
1) Just checked in a fix for this. There are now MINA specific versions of
StateMachineFactory.
2) Fixed!
I'm not sure I like how 1) turned out. There are lots of code duplication
there. Maybe if we changed StateMachineFactory so that it isn't all static like
now and to obtain one you would always have to specifiy the annotations to be
used like so:
StateMachineFactory.getInstance(IoHandlerTransition.class).create(...)
We need a way to couple IoHandlerTransition and IoHandlerTransitions together.
I think we can use a special annotation for that:
@TransitionsCombiner(IoHandlerTransitions.class)
public interface @IoHandlerTransition {
...
}
That way you won't have to specifiy both IoHandlerTransition and
IoHandlerTransitions in the call to getInstance(...).
WDYT?
> Find the best way to specify both MINA and non-MINA events.
> -----------------------------------------------------------
>
> Key: DIRMINA-463
> URL: https://issues.apache.org/jira/browse/DIRMINA-463
> Project: MINA
> Issue Type: Task
> Components: Statemachine
> Reporter: Trustin Lee
> Assignee: Niklas Therning
> Priority: Minor
> Fix For: 2.0.0-M1
>
>
> As discussed here: http://tinyurl.com/2omrl9
> For now, we use String to identify event types, which is somewhat unsafe.
> Using an enum might be useful, but there are a few disadvantages:
> * Wildcard event type cannot be used, which could be extended further (e.g.
> "message*" or "session(Opened|Closed)")
> Probably sticking to String might be the best solution? :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.