List of usage examples for io.netty.handler.codec UnsupportedMessageTypeException UnsupportedMessageTypeException
public UnsupportedMessageTypeException(Throwable cause)
From source file:io.hydramq.core.net.netty.CommandDecoder.java
License:Open Source License
@Override protected void decode(final ChannelHandlerContext ctx, final ByteBuf buffer, final List<Object> out) throws Exception { Command command = conversionContext.read(buffer); if (command == null) { String message = "Type '" + buffer.readInt() + "' not supported"; throw new UnsupportedMessageTypeException(message); }// w ww. j a va 2 s. com out.add(command); }