/** * The result containing response for this request. * * @return the result containing response for this request */ public InternalResultResponse getResultResponse() { if ( response == null ) { response = new CompareResponseImpl( getMessageId() ); } return response; }
public void action( IAsn1Container container ) throws DecoderException { LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer ) container; // Get the CompareRequest Object CompareRequestCodec compareRequest = ldapMessageContainer.getCompareRequest(); // Get the Value and store it in the CompareRequest TLV tlv = ldapMessageContainer.getCurrentTLV(); // We have to handle the special case of a 0 length matched // DN if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_04093 ); log.error( msg ); CompareResponseImpl response = new CompareResponseImpl( compareRequest.getMessageId() ); throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, compareRequest.getEntry(), null ); } String type = StringTools.getType( tlv.getValue().getData() ); compareRequest.setAttributeDesc( type ); if ( IS_DEBUG ) { log.debug( "Comparing attribute description {}", compareRequest.getAttributeDesc() ); } } } );
log.error( "{} : {}", msg, ine.getMessage() ); CompareResponseImpl response = new CompareResponseImpl( compareRequest.getMessageId() ); throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, DN.EMPTY_DN, ine );