/** * Compute the AbandonRequest length * <br> * AbandonRequest : * <pre> * 0x50 0x0(1..4) abandoned MessageId * * Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId) * </pre> */ @Override public int computeLength() { return 1 + 1 + BerValue.getNbBytes( getAbandoned() ); } }
/** * {@inheritDoc} */ @Override public AbandonRequest setAbandoned( int requestId ) { getDecorated().setAbandoned( requestId ); return this; }
AbandonRequestDecorator abandonRequest = new AbandonRequestDecorator( container.getLdapCodecService(), internalAbandonRequest ); container.setMessage( abandonRequest ); abandonRequest.setAbandoned( abandonnedMessageId );
decorator = new AbandonRequestDecorator( codec, ( AbandonRequest ) decoratedMessage ); break;
AbandonRequestDecorator abandonRequest = new AbandonRequestDecorator( container.getLdapCodecService(), internalAbandonRequest ); container.setMessage( abandonRequest ); abandonRequest.setAbandoned( abandonnedMessageId );
decorator = new AbandonRequestDecorator( codec, ( AbandonRequest ) decoratedMessage ); break;
AbandonRequestDecorator abandonRequest = new AbandonRequestDecorator( container.getLdapCodecService(), internalAbandonRequest ); container.setMessage( abandonRequest ); abandonRequest.setAbandoned( abandonnedMessageId );
/** * {@inheritDoc} */ @Override public int getAbandoned() { return getDecorated().getAbandoned(); }
/** * Compute the AbandonRequest length * <br> * AbandonRequest : * <pre> * 0x50 0x0(1..4) abandoned MessageId * * Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId) * </pre> */ @Override public int computeLength() { return 1 + 1 + BerValue.getNbBytes( getAbandoned() ); } }
decorator = new AbandonRequestDecorator( codec, ( AbandonRequest ) decoratedMessage ); break;
/** * {@inheritDoc} */ @Override public int getAbandoned() { return getDecorated().getAbandoned(); }
/** * Compute the AbandonRequest length * <br> * AbandonRequest : * <pre> * 0x50 0x0(1..4) abandoned MessageId * * Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId) * </pre> */ @Override public int computeLength() { return 1 + 1 + BerValue.getNbBytes( getAbandoned() ); } }
/** * {@inheritDoc} */ @Override public AbandonRequest setAbandoned( int requestId ) { getDecorated().setAbandoned( requestId ); return this; }
/** * Encode the Abandon protocolOp part */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The tag buffer.put( LdapCodecConstants.ABANDON_REQUEST_TAG ); // The length. It has to be evaluated depending on // the abandoned messageId value. buffer.put( ( byte ) BerValue.getNbBytes( getAbandoned() ) ); // The abandoned messageId buffer.put( BerValue.getBytes( getAbandoned() ) ); } catch ( BufferOverflowException boe ) { String msg = I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ); throw new EncoderException( msg, boe ); } return buffer; }
/** * {@inheritDoc} */ @Override public int getAbandoned() { return getDecorated().getAbandoned(); }
/** * Encode the Abandon protocolOp part */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The tag buffer.put( LdapCodecConstants.ABANDON_REQUEST_TAG ); // The length. It has to be evaluated depending on // the abandoned messageId value. buffer.put( ( byte ) BerValue.getNbBytes( getAbandoned() ) ); // The abandoned messageId buffer.put( BerValue.getBytes( getAbandoned() ) ); } catch ( BufferOverflowException boe ) { String msg = I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ); throw new EncoderException( msg, boe ); } return buffer; }
/** * {@inheritDoc} */ @Override public AbandonRequest setAbandoned( int requestId ) { getDecorated().setAbandoned( requestId ); return this; }
/** * Encode the Abandon protocolOp part */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The tag buffer.put( LdapCodecConstants.ABANDON_REQUEST_TAG ); // The length. It has to be evaluated depending on // the abandoned messageId value. buffer.put( ( byte ) BerValue.getNbBytes( getAbandoned() ) ); // The abandoned messageId buffer.put( BerValue.getBytes( getAbandoned() ) ); } catch ( BufferOverflowException boe ) { String msg = I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ); throw new EncoderException( msg, boe ); } return buffer; }