0

In using Apache MINA, I'm sending a login request from the client, which is interpreted on the server via LoginRequestDecoder (implements org.apache.mina.filter.codec.demux.MessageDecoder).

I now want to send a response (LoginResponse) that includes a success/failure code. Should I be sending the response from the LoginRequestDecoder's finishDecode() method, or is there a better place for it that I'm overlooking?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218

1 Answers1

0

What I needed to do was make my IoHandler of type DemuxingIoHandler. Within its constructuor, I had to make multiple calls to addReceivedMessageHandler and addSentMessageHandler. This allows the code behind DemuxingIoHandler to automatically respond based upon the type of message received.

Matt Huggins
  • 81,398
  • 36
  • 149
  • 218