dev@grizzly.java.net

Re: do I neet to stop filter chain?

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Mon, 10 Mar 2014 17:28:15 -0700

Hi Tigran,

if you're sure this is the last filter - you can return StopAction, but
even if you returned InvokeAction - Grizzly would figure out that
there's no next filter and stop the processing.

Thanks.

WBR,
Alexey.

On 10.03.14 13:53, Mkrtchyan, Tigran wrote:
>
> Hi,
>
> I have a filter which extends BaseFilter.
> Do I need to stop execution after successful reply?
> E.g:
>
> public NextAction handleRead(FilterChainContext ctx) throws IOException {
> // do some staff
>
> ctx.write(peerAddress, message, null);
> return ctx.getStopAction();
> }
>
> or
>
> public NextAction handleRead(FilterChainContext ctx) throws IOException {
> // do some staff
>
> ctx.write(peerAddress, message, null);
> return ctx.getInvokeAction();
> }
>
>
> The filter is the last in the chain.
>
> Thanks,
> Tigran.