Recent Grizzly 2.0 updates
By oleksiys on Oct 09, 2008
Recently we made several updates in Grizzly 2.0:
1) introduced Buffer interface, which will be common for all kind of buffers, used in Grizzly
2) changed read/write API according to what proposed Jeanfrancois. Instead of read/write, readAsync/writeAsync, readNow/writeNow methods - now we have just read/write. The I/O mode (blocking/async) could be changed, using Transport.configureBlocking(boolean) for whole transport, or Connection.configureBlocking() for specific connection.
3) completed standalone filter chain implementation. Which works both in synchronous and asynchronous modes.
It's possible to do following:
HttpRequest request = new HttpRequest(host, port, url);
Future writeFuture = filterChain.write(connection, HttpRequest()); Future readFuture = filterChain.read(connection);
HttpResponse response = (HttpResponse) readFuture.get(timeout, timeunit);
We're planning to have more interesting features: Stream filter, smart parser filter, HTTP support...