Hello,
I recently started working on a project with a friend that is a
text-based game. We were having trouble with ReadFuture's when trying to
get a username/password combination from the user so we decided to
follow the state machine example from Tapedeck TCP server on Mina's
homepage:
http://mina.apache.org/mina-project/xref/org/apache/mina/example/tapedeck/
I have gotten the state machine to a point where it seems to be working
well. It starts, reads a username, then a password, then has some logic
to restart based on error; or it prints a message 'Authenticated'.
However our main application logic is going to be (our plan at least)
held in an IoHandlerAdapter, my question is what is a good way to
integrate the two of these:
1) The state machine authentication filter from the example above
2) An IoHandlerAdapter that will track information about connected users
and sessions
My confusion mainly lies in how to transition between the state machine
and the IoHandlerAdapter since they both respond to /sessionCreated /and
/sessionOpened /events.
Any help, ideas, or input would be appreciated.
Thanks.
Hunter