/** * {@inheritDoc} */ @Override public Asn1Container newMessageContainer() { return new LdapMessageContainer<MessageDecorator<? extends Message>>( this ); }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the ExtensibleMatch Filter Filter extensibleMatchFilter = new ExtensibleMatchFilter( container.getTlvId() ); searchRequestDecorator.addCurrentFilter( extensibleMatchFilter ); searchRequestDecorator.setTerminalFilter( extensibleMatchFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05146_INITIALIZE_EXT_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { // Now, we can allocate the SearchRequest Object TLV tlv = container.getCurrentTLV(); SearchRequest internalSearchRequest = new SearchRequestImpl(); internalSearchRequest.setMessageId( container.getMessageId() ); SearchRequestDecorator searchRequest = new SearchRequestDecorator( container.getLdapCodecService(), internalSearchRequest ); searchRequest.setTlvId( tlv.getId() ); container.setMessage( searchRequest ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05157_SEARCH_REQUEST ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchResultEntryDecorator> container ) { // Now, we can allocate the SearchResultEntry Object SearchResultEntryDecorator searchResultEntry = new SearchResultEntryDecorator( container.getLdapCodecService(), new SearchResultEntryImpl( container.getMessageId() ) ); container.setMessage( searchResultEntry ); } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<ModifyRequestDecorator> container ) { TLV tlv = container.getCurrentTLV(); // If the length is null, we store an empty value if ( LOG.isDebugEnabled() && ( tlv.getLength() == 0 ) ) { LOG.debug( I18n.msg( I18n.MSG_05129_NO_VALS_FOR_ATTRIBUTE ) ); } // We can have an END transition container.setGrammarEndAllowed( true ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05130_SOME_VALS_NEED_DECODING ) ); } } }
public void action( LdapMessageContainer<ModifyRequestDecorator> container ) ModifyRequestDecorator modifyRequestDecorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); if ( container.isBinary( modifyRequestDecorator.getCurrentAttributeType() ) ) container.setGrammarEndAllowed( true );
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05134_EMPTY_AND_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter andFilter = new AndFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( andFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05141_INITIALIZE_AND_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { SearchRequestDecorator decorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) decorator.getTerminalFilter(); byte[] value = tlv.getValue().getData(); extensibleMatchFilter.setMatchValue( new Value( value ) ); // unstack the filters if needed decorator.unstackFilters( container ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05156_STORED_MATCH_VALUE, value ) ); } } }
if ( messageContainer.getState() == TLVStateEnum.PDU_DECODED ) CODEC_LOG.debug( I18n.msg( I18n.MSG_14002_DECODED_LDAP_MESSAGE, messageContainer.getMessage() ) ); Message message = messageContainer.getMessage(); messageContainer.clean(); messageContainer.clean(); messageContainer.clean();
if ( ( schemaManager != null ) && !( container.getBinaryAttributeDetector() instanceof SchemaBinaryAttributeDetector ) ) container.setBinaryAttributeDetector( new SchemaBinaryAttributeDetector( schemaManager ) ); new LdapMessageContainer<MessageDecorator<? extends Message>>( codec, atDetector ) );
if ( container.getState() == TLVStateEnum.PDU_DECODED ) return container.getMessage();
/** * {@inheritDoc} */ public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); int expectedLength = tlv.getLength(); // The Length should be null if ( expectedLength == 0 ) { String msg = I18n.err( I18n.ERR_08213_NULL_CONTROL_LENGTH ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } } }
public void action( LdapMessageContainer<ModifyRequestDecorator> container ) ModifyRequestDecorator modifyRequestDecorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); if ( container.isBinary( modifyRequestDecorator.getCurrentAttributeType() ) ) container.setGrammarEndAllowed( true );
/** * {@inheritDoc} */ public void action( LdapMessageContainer<BindResponseDecorator> container ) { // Now, we can allocate the BindResponse Object BindResponseDecorator bindResponse = new BindResponseDecorator( container.getLdapCodecService(), new BindResponseImpl( container.getMessageId() ) ); container.setMessage( bindResponse ); } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05134_EMPTY_AND_FILTER_PDU ); LOG.error( msg ); throw new DecoderException( msg ); } SearchRequestDecorator searchRequestDecorator = container.getMessage(); // We can allocate the SearchRequest Filter andFilter = new AndFilter( container.getTlvId() ); // Set the filter searchRequestDecorator.addCurrentFilter( andFilter ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05141_INITIALIZE_AND_FILTER ) ); } } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<SearchRequestDecorator> container ) { SearchRequestDecorator decorator = container.getMessage(); TLV tlv = container.getCurrentTLV(); // Store the value. ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) decorator.getTerminalFilter(); byte[] value = tlv.getValue().getData(); extensibleMatchFilter.setMatchValue( new Value( value ) ); // unstack the filters if needed decorator.unstackFilters( container ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05156_STORED_MATCH_VALUE, value ) ); } } }
if ( messageContainer.getState() == TLVStateEnum.PDU_DECODED ) CODEC_LOG.debug( I18n.msg( I18n.MSG_14002_DECODED_LDAP_MESSAGE, messageContainer.getMessage() ) ); Message message = messageContainer.getMessage(); messageContainer.clean(); messageContainer.clean(); messageContainer.clean();
if ( ( schemaManager != null ) && !( container.getBinaryAttributeDetector() instanceof SchemaBinaryAttributeDetector ) ) container.setBinaryAttributeDetector( new SchemaBinaryAttributeDetector( schemaManager ) ); new LdapMessageContainer<MessageDecorator<? extends Message>>( codec, atDetector ) );
if ( container.getState() == TLVStateEnum.PDU_DECODED ) return container.getMessage();
/** * {@inheritDoc} */ public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container ) throws DecoderException { TLV tlv = container.getCurrentTLV(); int expectedLength = tlv.getLength(); // The Length should be null if ( expectedLength == 0 ) { String msg = I18n.err( I18n.ERR_08213_NULL_CONTROL_LENGTH ); LOG.error( msg ); // This will generate a PROTOCOL_ERROR throw new DecoderException( msg ); } } }