Netty - Find Channel ID
===

I just started working with Netty. I already have a server, and im writing code for a client.

In the client, i set a new PipelineFactory for the ClientBootstrap object with this code

    	bootstrap.setPipelineFactory(new ChannelPipelineFactory() 
		{
			public ChannelPipeline getPipeline() 
			{
				return Channels.pipeline(new ResponseHandler());
			}
		}
                                    );

where ResponseHandler() is my class that extends SimpleChannelHandler.

Im looking to find the Channel ID. I did
    
     bootstrap.getPipeline().getChannel().getId();

but it throws IllelgalStateException and says i cant call getPipeline() because i have called setPipelineFactory(). What is the method to obtain the Channel ID ?