Refine search
public void action( AdDirSyncContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getAdDirSyncControl().setCookie( cookie ); container.setGrammarEndAllowed( true ); } } );
/** * {@inheritDoc} */ @Override public void encode( IoSession session, Object message, ProtocolEncoderOutput out ) throws Exception { ByteBuffer buffer = encoder.encodeMessage( ( Message ) message ); IoBuffer ioBuffer = IoBuffer.wrap( buffer ); if ( CODEC_LOG.isDebugEnabled() ) { byte[] dumpBuffer = new byte[buffer.limit()]; buffer.get( dumpBuffer ); buffer.flip(); CODEC_LOG.debug( I18n.msg( I18n.MSG_14003_ENCODED_LDAP_MESSAGE, message, Strings.dumpBytes( dumpBuffer ) ) ); } out.write( ioBuffer ); }
public void action( EndTransactionRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { container.getEndTransactionRequest().setCommit( BooleanDecoder.parse( value ) ); } catch ( BooleanDecoderException bde ) { LOG.error( I18n .err( I18n.ERR_08221_BAD_END_TRANSACTION_COMMIT, Strings.dumpBytes( value.getData() ), bde.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( bde.getMessage(), bde ); } } } );
public void action( SyncDoneValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncDoneValueControl().setCookie( cookie ); container.setGrammarEndAllowed( true ); } } );
/** * {@inheritDoc} */ @Override public void encode( IoSession session, Object message, ProtocolEncoderOutput out ) throws Exception { ByteBuffer buffer = encoder.encodeMessage( ( Message ) message ); IoBuffer ioBuffer = IoBuffer.wrap( buffer ); if ( CODEC_LOG.isDebugEnabled() ) { byte[] dumpBuffer = new byte[buffer.limit()]; buffer.get( dumpBuffer ); buffer.flip(); CODEC_LOG.debug( I18n.msg( I18n.MSG_14003_ENCODED_LDAP_MESSAGE, message, Strings.dumpBytes( dumpBuffer ) ) ); } out.write( ioBuffer ); }
public void action( EndTransactionRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { container.getEndTransactionRequest().setCommit( BooleanDecoder.parse( value ) ); } catch ( BooleanDecoderException bde ) { LOG.error( I18n .err( I18n.ERR_08221_BAD_END_TRANSACTION_COMMIT, Strings.dumpBytes( value.getData() ), bde.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( bde.getMessage(), bde ); } } } );
public void action( AdDirSyncContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getAdDirSyncControl().setCookie( cookie ); container.setGrammarEndAllowed( true ); } } );
/** * {@inheritDoc} */ @Override public void encode( IoSession session, Object message, ProtocolEncoderOutput out ) throws Exception { ByteBuffer buffer = encoder.encodeMessage( ( Message ) message ); IoBuffer ioBuffer = IoBuffer.wrap( buffer ); if ( CODEC_LOG.isDebugEnabled() ) { byte[] dumpBuffer = new byte[buffer.limit()]; buffer.get( dumpBuffer ); buffer.flip(); CODEC_LOG.debug( I18n.msg( I18n.MSG_14003_ENCODED_LDAP_MESSAGE, message, Strings.dumpBytes( dumpBuffer ) ) ); } out.write( ioBuffer ); }
public void action( EndTransactionRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { container.getEndTransactionRequest().setCommit( BooleanDecoder.parse( value ) ); } catch ( BooleanDecoderException bde ) { LOG.error( I18n .err( I18n.ERR_08221_BAD_END_TRANSACTION_COMMIT, Strings.dumpBytes( value.getData() ), bde.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( bde.getMessage(), bde ); } } } );
public void action( SyncRequestValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncRequestValueControl().setCookie( cookie ); // We can have an END transition container.setGrammarEndAllowed( true ); } } );
public void action( EndTransactionResponseContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { int failedMessageId = IntegerDecoder.parse( value ); if ( failedMessageId > 0 ) { container.getEndTransactionResponse().setFailedMessageId( failedMessageId ); } // We may have nothing left container.setGrammarEndAllowed( true ); } catch ( IntegerDecoderException ide ) { LOG.error( I18n .err( I18n.ERR_08221_BAD_END_TRANSACTION_COMMIT, Strings.dumpBytes( value.getData() ), ide.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( ide.getMessage(), ide ); } } } );
public void action( SyncStateValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] entryUUID = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08106_ENTRY_UUID, Strings.dumpBytes( entryUUID ) ) ); } container.getSyncStateValueControl().setEntryUUID( entryUUID ); // We can have an END transition container.setGrammarEndAllowed( true ); } } );
public void action( SubentriesContainer container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // We get the value. If it's a 0, it's a FALSE. If it's // a FF, it's a TRUE. Any other value should be an error, // but we could relax this constraint. So if we have // something // which is not 0, it will be interpreted as TRUE, but we // will generate a warning. BerValue value = tlv.getValue(); try { container.getSubentriesControl().setVisibility( BooleanDecoder.parse( value ) ); // We can have an END transition container.setGrammarEndAllowed( true ); } catch ( BooleanDecoderException bde ) { LOG.error( I18n.err( I18n.ERR_05310_INVALID_VISIBILITY_FLAG, Strings.dumpBytes( value.getData() ), bde.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( bde.getMessage() ); } } } );
public void action( SyncDoneValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncDoneValueControl().setCookie( cookie ); container.setGrammarEndAllowed( true ); } } );
public void action( EndTransactionResponseContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { int failedMessageId = IntegerDecoder.parse( value ); if ( failedMessageId > 0 ) { container.getEndTransactionResponse().setFailedMessageId( failedMessageId ); } // We may have nothing left container.setGrammarEndAllowed( true ); } catch ( IntegerDecoderException ide ) { LOG.error( I18n .err( I18n.ERR_08221_BAD_END_TRANSACTION_COMMIT, Strings.dumpBytes( value.getData() ), ide.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( ide.getMessage(), ide ); } } } );
public void action( AdDirSyncContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getAdDirSyncControl().setCookie( cookie ); container.setGrammarEndAllowed( true ); } } );
public void action( EndTransactionResponseContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { int failedMessageId = IntegerDecoder.parse( value ); if ( failedMessageId > 0 ) { container.getEndTransactionResponse().setFailedMessageId( failedMessageId ); } // We may have nothing left container.setGrammarEndAllowed( true ); } catch ( IntegerDecoderException ide ) { LOG.error( I18n .err( I18n.ERR_08221_BAD_END_TRANSACTION_COMMIT, Strings.dumpBytes( value.getData() ), ide.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( ide.getMessage(), ide ); } } } );
public void action( SyncRequestValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncRequestValueControl().setCookie( cookie ); // We can have an END transition container.setGrammarEndAllowed( true ); } } );
public void action( SubentriesContainer container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); // We get the value. If it's a 0, it's a FALSE. If it's // a FF, it's a TRUE. Any other value should be an error, // but we could relax this constraint. So if we have // something // which is not 0, it will be interpreted as TRUE, but we // will generate a warning. BerValue value = tlv.getValue(); try { container.getSubentriesControl().setVisibility( BooleanDecoder.parse( value ) ); // We can have an END transition container.setGrammarEndAllowed( true ); } catch ( BooleanDecoderException bde ) { LOG.error( I18n.err( I18n.ERR_05310_INVALID_VISIBILITY_FLAG, Strings.dumpBytes( value.getData() ), bde.getMessage() ) ); // This will generate a PROTOCOL_ERROR throw new DecoderException( bde.getMessage() ); } } } );
public void action( SyncRequestValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncRequestValueControl().setCookie( cookie ); // We can have an END transition container.setGrammarEndAllowed( true ); } } );