Hi Matt,
> Which is the correct "2.0" approach to writing clients? For example
> in com.sun.grizzly.samples.ssl I can see three alternative client
> implementations: FilterChain, Standalone, and StringBased. The
> latter looks like a more elegant version of the FilterChain
> implementation, so I guess there's actually only two fundamentally
> different approaches: use FilterChains or use StreamReader/
> StreamWriters.
Absolutely.
> Which is the recommended approach? The StreamReader/StreamWriter
> approach looks cleaner somehow. Is one approach better than the other?
StreamReader/StreamWriter approach (aka standalone), IMO, is more
useful for testing. This API allows developers, who has experience
with Sockets, easily rewrite there applications to use Grizzly 2.0
But still I'd recommend to use FilterChains for real products. For now
it's more optimized.
> I seem to remember that Codecs are new in 2.0. Should we use these?
If you have something to encode/decode - then yes. Codecs
(Transformers) could be used the same way in FilterChain and
standalone approaches.
> From the server point of view I guess there's only one approach to
> take (e.g. SSLEchoServer and other samples). Am I correct? Are there
> any preferred 2.0 APIs that we should use in the server?
Actually you can use Streams with server (see StandaloneTest), but
again, for now, I'd recommend FilterChain.
Thanks.
WBR,
Alexey.
>
> Cheers,
>
>
> Matt
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>