users@grizzly.java.net

Re: Thread safe method for setting the processor on a new client/server connection?

From: Matthew Swift <matthew.swift_at_gmail.com>
Date: Tue, 9 Oct 2012 17:49:32 +0200

On 9 October 2012 17:21, Oleksiy Stashok <oleksiy.stashok_at_oracle.com> wrote:

> Hi Matt,
>
> just to make sure, you call
>
>
> TCPNIOServerConnection serverConnection = transport.bind(address,
> backlog);
>
> after you started the actual transport? If yes - pls. file an issue :))
>
>

Yes I have started the transport before hand. I've raised issue
http://java.net/jira/browse/GRIZZLY-1346.

FYI, I'm currently using 2.2.18 in our LDAP SDK.



> Regarding the client connections, you can set FilterChain to
> TCPNIOConnectorHandler like:
>
> SocketConnectorHandler connectorHandler =
> TCPNIOConnectorHandler.builder(transport)
> .processor(*clientFilterChain*)
> .build();
>
> Future<Connection> future =
> connectorHandler.connect("localhost", PORT);
>
>
Nice! I didn't know about this API.

Thanks alot :-)

Matt