users@grizzly.java.net

Re: disableIOEvent read

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Wed, 04 Feb 2015 10:11:53 -0800

Hi,

as I understand you run "command" in the separate thread, not in the one
FilterChain was executed, is it correct?
Normally there's no need to deal directly with
disableIOEvent/enableIOEvent, in 99% of cases you can control that with
FilterChain NextAction commands returned from handleXXX methods.

Take a look at this sample:
https://github.com/GrizzlyNIO/grizzly-mirror/blob/2.3.x/samples/framework-samples/src/main/java/org/glassfish/grizzly/samples/echo/EchoFilterAsync.java

Pls. let me know if you have more questions.

WBR,
Alexey.

On 04.02.15 06:42, Ben-Yosef Efrat wrote:
>
> Hello
>
> I want to simulate a synchronic behavior so when client issues two
> commands at once, when the first command is still executing. Flow is:
>
> 1.Client issues command
>
> 2.On handleRead() I perform, connection. disableIOEvent(IOEvent.READ)
>
> 3.Command is executing (sleeps)
>
> 4.Client issues another command – I would expect that the handleRead()
> will not be called until connection. enableIOEvent(IOEvent.READ) is
> called. However, the handleRead() is called anyway.
>
> Am I missing something?
>
> Thanks
>
> Efrat
>
> ------------------------------------------------------------------------
> “This e-mail message may contain confidential, commercial or
> privileged information that constitutes proprietary information of
> Comverse Inc. or its subsidiaries. If you are not the intended
> recipient of this message, you are hereby notified that any review,
> use or distribution of this information is absolutely prohibited and
> we request that you delete all copies and contact us by e-mailing to:
> security_at_comverse.com. Thank You.”