@Override public boolean acceptOutboundMessage(Object msg) throws Exception { return eurekaCodec.accept(msg.getClass()); }
@Override public void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws Exception { ByteBufOutputStream byteBufOutputStream = new ByteBufOutputStream(out); eurekaCodec.encode(msg, byteBufOutputStream); }
@Override public void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { ByteBufInputStream byteBufInputStream = new ByteBufInputStream(in); out.add(eurekaCodec.decode(byteBufInputStream)); } }