@Override public boolean acceptInboundMessage(Object msg) throws Exception { if (msg instanceof SctpMessage) { SctpMessage sctpMsg = (SctpMessage) msg; if (sctpMsg.isComplete()) { return true; } throw new CodecException(String.format("Received SctpMessage is not complete, please add %s in " + "the pipeline before this handler", SctpMessageCompletionHandler.class.getSimpleName())); } else { return false; } } }
@Override protected void decode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) throws Exception { if (!msg.isComplete()) { throw new CodecException(String.format("Received SctpMessage is not complete, please add %s in the " + "pipeline before this handler", SctpMessageCompletionHandler.class.getSimpleName())); } out.add(msg.content().retain()); } }
final int protocolIdentifier = msg.protocolIdentifier(); final int streamIdentifier = msg.streamIdentifier(); final boolean isComplete = msg.isComplete(); final boolean isUnordered = msg.isUnordered();
@Override public boolean acceptInboundMessage(Object msg) throws Exception { if (msg instanceof SctpMessage) { SctpMessage sctpMsg = (SctpMessage) msg; if (sctpMsg.isComplete()) { return true; } throw new CodecException(String.format("Received SctpMessage is not complete, please add %s in " + "the pipeline before this handler", SctpMessageCompletionHandler.class.getSimpleName())); } else { return false; } } }
@Override public boolean acceptInboundMessage(Object msg) throws Exception { if (msg instanceof SctpMessage) { SctpMessage sctpMsg = (SctpMessage) msg; if (sctpMsg.isComplete()) { return true; } throw new CodecException(String.format("Received SctpMessage is not complete, please add %s in " + "the pipeline before this handler", SctpMessageCompletionHandler.class.getSimpleName())); } else { return false; } } }
@Override protected void decode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) throws Exception { if (!msg.isComplete()) { throw new CodecException(String.format("Received SctpMessage is not complete, please add %s in the " + "pipeline before this handler", SctpMessageCompletionHandler.class.getSimpleName())); } out.add(msg.content().retain()); } }
@Override protected void decode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) throws Exception { if (!msg.isComplete()) { throw new CodecException(String.format("Received SctpMessage is not complete, please add %s in the " + "pipeline before this handler", SctpMessageCompletionHandler.class.getSimpleName())); } out.add(msg.content().retain()); } }
final int protocolIdentifier = msg.protocolIdentifier(); final int streamIdentifier = msg.streamIdentifier(); final boolean isComplete = msg.isComplete(); final boolean isUnordered = msg.isUnordered();
final int protocolIdentifier = msg.protocolIdentifier(); final int streamIdentifier = msg.streamIdentifier(); final boolean isComplete = msg.isComplete(); final boolean isUnordered = msg.isUnordered();
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) { // try { PayloadData payload; if (this.association.getIpChannelType() == IpChannelType.SCTP) { SctpMessage sctpMessage = (SctpMessage) msg; ByteBuf byteBuf = sctpMessage.content(); payload = new PayloadData(byteBuf.readableBytes(), byteBuf, sctpMessage.isComplete(), sctpMessage.isUnordered(), sctpMessage.protocolIdentifier(), sctpMessage.streamIdentifier()); } else { ByteBuf byteBuf = (ByteBuf) msg; payload = new PayloadData(byteBuf.readableBytes(), byteBuf, true, false, 0, 0); } if (logger.isDebugEnabled()) { logger.debug(String.format("Rx : Ass=%s %s", this.association.getName(), payload)); } this.association.read(payload); // } finally { // ReferenceCountUtil.release(msg); // } }