* @return ResponseHandler Instance tied to the Channel's Pipeline
*/
public static HChannelHandler getHChannelHandlerFromChannel(Channel channel)
throws NoResponseHandlerException {
if (null == channel) {
throw new NoResponseHandlerException("Received a null value for the channel. Cannot retrieve the response handler");
}
HChannelHandler handler = (HChannelHandler) channel.getPipeline().getLast();
if (null == handler) {
throw new NoResponseHandlerException("Could not retrieve the response handler from the channel's pipeline.");
}
return handler;
}