Ability to get pipeline before connect using ClientBootstrap

"Trustin Lee (이희승)" trustin at gmail.com
Wed Apr 28 04:08:45 EDT 2010


Hi Vadim,

I'm not sure this is a better solution but you could create two
ClientBootstraps for the same ChannelFactory?  Each could be configured
to use a different pipeline factory.

HTH,
Trustin

Vadim Berezniker wrote:
> I'm rather new to Netty so my understanding may not be up to par, but...
> 
> I  think it would be nice to be able to get the pipeline before the connect
> actually happens.
> 
> Right now the pipeline creation via the factory and connect all happen in
> one operation so you don't have a chance to do anything. 
> 
> For example let's say I want to add a custom listener to a non-shared
> handler in the pipeline. 
> The only way to do it would be to either pass it to the factory or have the
> factory somehow retrieve it. In both cases it would require to you to write
> a mechanism to distinguish which handler is the source of an event.
> 
> If one could access the handler before the connect happens, one could easily
> add a listener or perform any pipeline specific handling. I guess one way to
> do it right now is to have an abstract pipeline factory and set a new
> instance right before calling connect, but changing the factory before every
> connect seems to defeat the purpose of having a factory...

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100428/5334b208/attachment-0001.bin 


More information about the netty-users mailing list