Trustin Lee wrote:
Hi,

A few random comments...:

1) org.apache.mina.statemachine.mina.Events could be replaced with
org.apache.mina.common.IoEventType.

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.

Cheers,
Trustin
Thanks for the comments! I think #2 and #3 are very good suggestions.

#1 I'm not sure about though. IoEventType has some events that will never be generated for an IoHandler (WRITE and CLOSE). In statemachine we also have the wildcard event "*" which matches any event. And then there is the problem of having the Handler annotation use an enum class instead of Strings for the events. That would restrict statemachine to only be able to work with the events in that enum. However, I certainly think that using an enum for the possible events would be so much nicer than using Strings. I'll see if I can come up with something which allows the use of events in an enum without restricting the code to a particular set of events.

/Niklas

Reply via email to