users@grizzly.java.net

Re: [Q] Trouble invoking the selectorHandler protocolChain

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 06 Mar 2008 11:42:00 -0500

Simon Trudeau wrote:
> Here’s my trouble I am almost done building this very nifty client
> (attached to this email) following our previous thread of discussion
> (thanks alot!) but my only trouble is that my protocolChain from my
> selectorHandler never gets invoked! I really don’t understand what needs
> to be done to invoke it, I though it would get invoked automatically
> when a packet is read on the channel.

Inside you ClientCallBackHandler onRead/OnWrite, make sure you call:

ctx.getProtocolChain().execute(ioEvent.attachment());

because by default, the framework doesn't invoke the protocol chain for
the client.

Thanks

-- Jeanfrancois



>
>
>
> On the server side, the protocolChain from the Controller gets invoked
> without a glitch. I know that because my server implements and
> EchoFilter and the callbackHandler from my client receives something (it
> triggers on OnRead()).
>
>
>
> I could really appreciate some pointers! Thanks,
>
>
>
>
>
> Simon
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net