/** * 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; }
/** * Transform a CompareRequest message from a CodecMessage to a * InternalMessage * * @param compareRequest The message to transform * @param messageId The message Id * @return A Internal CompareRequestImpl */ private static InternalMessage transformCompareRequest( CompareRequestCodec compareRequest, int messageId ) { CompareRequestImpl internalMessage = new CompareRequestImpl( messageId ); // Codec : DN entry -> Internal : private DN internalMessage.setName( compareRequest.getEntry() ); // Codec : LdapString attributeDesc -> Internal : String attrId internalMessage.setAttributeId( compareRequest.getAttributeDesc() ); // Codec : OctetString assertionValue -> Internal : byte[] attrVal if ( compareRequest.getAssertionValue() instanceof String ) { internalMessage.setAssertionValue( ( String ) compareRequest.getAssertionValue() ); } else { internalMessage.setAssertionValue( ( byte[] ) compareRequest.getAssertionValue() ); } return internalMessage; }