users@grizzly.java.net

Grizzly 2.0 as a client connection provider

From: steview <steve-nabble_at_jofti.com>
Date: Tue, 24 Mar 2009 06:49:12 -0700 (PDT)

Hi,
I am pretty new to Grizzly and I am exploring the use of 2.0 as a client
side library.

However, I am slightly confused as to how the 2.0 API functions.

Is the connection supposed to be for use by a single thread only? - The
reason I ask this is the streamwriter that is used to send data has
write(Buffer) - which seems ok - but the flush(CompletionHandler) is not
part of this call - so if I have multiple threads using the same connection
how do I ensure that the order of write/flush is not interleaved unless I am
synchronizing these calls myself.


Also, what would be the best approach to use as a reconnection strategy (the
transport has an exception handler - but the connection does not) -
especially around ability not to lose queued data on a connection that may
no longer be active - e.g would I have to drain the queue and reconnect and
resubmit manually.

Regards
Steve


-- 
View this message in context: http://www.nabble.com/Grizzly-2.0-as-a-client-connection-provider-tp22680820p22680820.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.