directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: [codec] StatefulDecoders
Date Tue, 24 Feb 2004 02:13:27 GMT
> > I've been working on the idea of stateful Decoders designed for use with
> > non-blocking reads where buffers are read from channels and used by
> > decoders.
> > http://nagoya.apache.org/jira/secure/ViewIssue.jspa?id=13599

> How does your proposal contrast/differs/combines with what has
> been referred to on this list as "streamable" codecs?
> See http://issues.apache.org/bugzilla/show_bug.cgi?id=19882

The streamable decoders have an interface like:

  public void operation(InputStream in, OutputStream out)
     throws Exception;

which means that the calling thread is going to be blocked on I/O, whereas
Alex's proposed interface is:

  public java.util.List operation(java.nio.ByteBuffer buffer);

which is called as data arrives.  The difference is pull-model (blocking
I/O) vs push-model (non-blocking I/O).

	--- Noel


Mime
View raw message