code: public static void clearPipeline(ChannelPipeline pipeline)
  	{
  		if(null == pipeline){
  			return;
  		}
  		try
  		{
  			int counter = 0;
  			
  			while (pipeline.getFirst() != null)
  			{
  				pipeline.removeFirst();
  				counter++;
  			}
  			LOG.trace("Removed {} handlers from pipeline",counter);
  		}
  		catch (NoSuchElementException e)
  		{
  			// all elements removed.
  		}
  	}
docs: A utility method to clear the netty pipeline of all handlers.
  
  @param pipeline