/** * {@inheritDoc} */ public void action( LdapMessageContainer<ModifyDnResponseDecorator> container ) { // Now, we can allocate the ModifyDnResponse Object ModifyDnResponseDecorator modifyDnResponse = new ModifyDnResponseDecorator( container.getLdapCodecService(), new ModifyDnResponseImpl( container.getMessageId() ) ); container.setMessage( modifyDnResponse ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05177_MODIFY_DN_RESPONSE ) ); } } }
/** * Compute the ModifyDNResponse length * <br> * ModifyDNResponse : * <pre> * 0x6D L1 * | * +--> LdapResult * * L1 = Length(LdapResult) * Length(ModifyDNResponse) = Length(0x6D) + Length(L1) + L1 * </pre> */ @Override public int computeLength() { modifyDnResponseLength = ( ( LdapResultDecorator ) getLdapResult() ).computeLength(); return 1 + TLV.getNbBytes( modifyDnResponseLength ) + modifyDnResponseLength; }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<ModifyDnResponseDecorator> container ) { // Now, we can allocate the ModifyDnResponse Object ModifyDnResponseDecorator modifyDnResponse = new ModifyDnResponseDecorator( container.getLdapCodecService(), new ModifyDnResponseImpl( container.getMessageId() ) ); container.setMessage( modifyDnResponse ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05177_MODIFY_DN_RESPONSE ) ); } } }
/** * Compute the ModifyDNResponse length * <br> * ModifyDNResponse : * <pre> * 0x6D L1 * | * +--> LdapResult * * L1 = Length(LdapResult) * Length(ModifyDNResponse) = Length(0x6D) + Length(L1) + L1 * </pre> */ @Override public int computeLength() { modifyDnResponseLength = ( ( LdapResultDecorator ) getLdapResult() ).computeLength(); return 1 + TLV.getNbBytes( modifyDnResponseLength ) + modifyDnResponseLength; }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<ModifyDnResponseDecorator> container ) { // Now, we can allocate the ModifyDnResponse Object ModifyDnResponseDecorator modifyDnResponse = new ModifyDnResponseDecorator( container.getLdapCodecService(), new ModifyDnResponseImpl( container.getMessageId() ) ); container.setMessage( modifyDnResponse ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05177_MODIFY_DN_RESPONSE ) ); } } }
/** * Compute the ModifyDNResponse length * <br> * ModifyDNResponse : * <pre> * 0x6D L1 * | * +--> LdapResult * * L1 = Length(LdapResult) * Length(ModifyDNResponse) = Length(0x6D) + Length(L1) + L1 * </pre> */ @Override public int computeLength() { modifyDnResponseLength = ( ( LdapResultDecorator ) getLdapResult() ).computeLength(); return 1 + TLV.getNbBytes( modifyDnResponseLength ) + modifyDnResponseLength; }
decorator = new ModifyDnResponseDecorator( codec, ( ModifyDnResponse ) decoratedMessage ); break;
/** * Encode the ModifyDnResponse message to a PDU. * * @param buffer The buffer where to put the PDU */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The ModifyResponse Tag buffer.put( LdapCodecConstants.MODIFY_DN_RESPONSE_TAG ); buffer.put( TLV.getBytes( modifyDnResponseLength ) ); // The LdapResult ( ( LdapResultDecorator ) getLdapResult() ).encode( buffer ); } catch ( BufferOverflowException boe ) { throw new EncoderException( I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ), boe ); } return buffer; } }
decorator = new ModifyDnResponseDecorator( codec, ( ModifyDnResponse ) decoratedMessage ); break;
/** * Encode the ModifyDnResponse message to a PDU. * * @param buffer The buffer where to put the PDU */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The ModifyResponse Tag buffer.put( LdapCodecConstants.MODIFY_DN_RESPONSE_TAG ); buffer.put( TLV.getBytes( modifyDnResponseLength ) ); // The LdapResult ( ( LdapResultDecorator ) getLdapResult() ).encode( buffer ); } catch ( BufferOverflowException boe ) { throw new EncoderException( I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ), boe ); } return buffer; } }
decorator = new ModifyDnResponseDecorator( codec, ( ModifyDnResponse ) decoratedMessage ); break;
/** * Encode the ModifyDnResponse message to a PDU. * * @param buffer The buffer where to put the PDU */ @Override public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The ModifyResponse Tag buffer.put( LdapCodecConstants.MODIFY_DN_RESPONSE_TAG ); buffer.put( TLV.getBytes( modifyDnResponseLength ) ); // The LdapResult ( ( LdapResultDecorator ) getLdapResult() ).encode( buffer ); } catch ( BufferOverflowException boe ) { throw new EncoderException( I18n.err( I18n.ERR_08212_PDU_BUFFER_TOO_SMALL ), boe ); } return buffer; } }