dev@grizzly.java.net

Re: ParserProtocolFilter API

From: John ROM <snake-john_at_gmx.de>
Date: Tue, 27 May 2008 08:28:34 +0200

Hi Oleksiy ,
well that was my first thought too but even
when you use delagation and share the same ReadFilter
PUReadFilter still comes first in the chain and reads
the bytes away.....

maybe you should leave everything as it is because flags
always make things worse....

Many Greetings
John
-------- Original-Nachricht --------
> Datum: Mon, 26 May 2008 16:46:39 +0200
> Von: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
> An: dev_at_grizzly.dev.java.net
> Betreff: Re: ParserProtocolFilter API

> Hello John,
>
>
> > I had the following problem.
> >
> > I set up Portunification
> >
> > I have a Protocol parser down the chain.
> >
> > Now when MyProtocolParser returns true on isExpectingMoreData()
> > the ReadFilter of MyProtocolParser fails because
> > PUReadFilter read the expected bytes.
> I see. It's really bad issue. Currently both PUReadFilter and
> ParserProtocolFilter extend ReadFilter, which makes them difficult to
> use together :(
> So ideally we should split PUReadFilter and ParserProtocolFilter with
> ReadFilter, so they will not extend ReadFilter any more.
>
> >
> > Ok since My MyProtocolParsER is statefull I can cope with this, but
> > it makes my Parser ugly.
> >
> > So I am thinking maybe you could change the API with a flag on
> > ParserProtocolFilter
> > forcing a skipping of the Reading of the ParserProtocolFilter
> > ReadFilter.
> >
> > for Example in
> > ParserProtocolFilter.java
> >
> > boolean continueExecution = isFlag()? true:super.execute(ctx);
> >
> > private boolean flag=false;
> > public void setFlag(boolean flag) {
> > this.flag = flag;
> > }
> >
> > public boolean isFlag() {
> > return flag;
> > }
> I will add some flag to ParserProtocolFilter and PUFilter, which will
> mean whether we want these Filters to read bytes from channel. By
> default flag will be true, so we will not break anyone.
>
> Can you pls. fill the issue?
>
> WBR,
> Alexey.
>
> >
> >
> > Many Greetings
> > John
> >
> >
> >
> >
> > --
> > Psssst! Schon vom neuen GMX MultiMessenger gehört?
> > Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> > For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer