Mytec
Recent Grizzly 2.0 updates
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:
filterChain.add(new TransportFilter());
filterChain.add(new SSLFilter());
filterChain.add(new HttpFilter());
...........................
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...
Posted at 07:53PM Oct 09, 2008 by oleksiys in Grizzly | Comments[0]