org.opends.server.protocols.ldap
Class ExtendedResponseProtocolOp

java.lang.Object
  extended by org.opends.server.protocols.ldap.ProtocolOp
      extended by org.opends.server.protocols.ldap.ExtendedResponseProtocolOp

public class ExtendedResponseProtocolOp
extends ProtocolOp

This class defines the structures and methods for an LDAP extended response protocol op, which is used to provide information about the result of processing a extended request.


Constructor Summary
ExtendedResponseProtocolOp(int resultCode)
          Creates a new extended response protocol op with the provided result code.
ExtendedResponseProtocolOp(int resultCode, Message errorMessage)
          Creates a new extended response protocol op with the provided result code and error message.
ExtendedResponseProtocolOp(int resultCode, Message errorMessage, DN matchedDN, java.util.List<java.lang.String> referralURLs)
          Creates a new extended response protocol op with the provided information.
ExtendedResponseProtocolOp(int resultCode, Message errorMessage, DN matchedDN, java.util.List<java.lang.String> referralURLs, java.lang.String oid, ASN1OctetString value)
          Creates a new extended response protocol op with the provided information.
 
Method Summary
static ExtendedResponseProtocolOp decodeExtendedResponse(ASN1Element element)
          Decodes the provided ASN.1 element as a extended response protocol op.
 ASN1Element encode()
          Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.
 Message getErrorMessage()
          Retrieves the error message for this response.
 DN getMatchedDN()
          Retrieves the matched DN for this response.
 java.lang.String getOID()
          Retrieves the OID for this extended response.
 java.lang.String getProtocolOpName()
          Retrieves the name for this protocol op type.
 java.util.List<java.lang.String> getReferralURLs()
          Retrieves the set of referral URLs for this response.
 int getResultCode()
          Retrieves the result code for this response.
 byte getType()
          Retrieves the BER type for this protocol op.
 ASN1OctetString getValue()
          Retrieves the value for this extended response.
 void setErrorMessage(Message errorMessage)
          Specifies the error message for this response.
 void setMatchedDN(DN matchedDN)
          Specifies the matched DN for this response.
 void setOID(java.lang.String oid)
          Specifies the OID for this extended response.
 void setReferralURLs(java.util.List<java.lang.String> referralURLs)
          Specifies the set of referral URLs for this response.
 void setResultCode(int resultCode)
          Specifies the result code for this response.
 void setValue(ASN1OctetString value)
          Specifies the value for this extended response.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this LDAP protocol op to the provided buffer.
 void toString(java.lang.StringBuilder buffer, int indent)
          Appends a multi-line string representation of this LDAP protocol op to the provided buffer.
 
Methods inherited from class org.opends.server.protocols.ldap.ProtocolOp
decode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedResponseProtocolOp

public ExtendedResponseProtocolOp(int resultCode)
Creates a new extended response protocol op with the provided result code.

Parameters:
resultCode - The result code for this response.

ExtendedResponseProtocolOp

public ExtendedResponseProtocolOp(int resultCode,
                                  Message errorMessage)
Creates a new extended response protocol op with the provided result code and error message.

Parameters:
resultCode - The result code for this response.
errorMessage - The error message for this response.

ExtendedResponseProtocolOp

public ExtendedResponseProtocolOp(int resultCode,
                                  Message errorMessage,
                                  DN matchedDN,
                                  java.util.List<java.lang.String> referralURLs)
Creates a new extended response protocol op with the provided information.

Parameters:
resultCode - The result code for this response.
errorMessage - The error message for this response.
matchedDN - The matched DN for this response.
referralURLs - The referral URLs for this response.

ExtendedResponseProtocolOp

public ExtendedResponseProtocolOp(int resultCode,
                                  Message errorMessage,
                                  DN matchedDN,
                                  java.util.List<java.lang.String> referralURLs,
                                  java.lang.String oid,
                                  ASN1OctetString value)
Creates a new extended response protocol op with the provided information.

Parameters:
resultCode - The result code for this response.
errorMessage - The error message for this response.
matchedDN - The matched DN for this response.
referralURLs - The referral URLs for this response.
oid - The OID for this extended response.
value - The value for this extended response.
Method Detail

getResultCode

public int getResultCode()
Retrieves the result code for this response.

Returns:
The result code for this response.

setResultCode

public void setResultCode(int resultCode)
Specifies the result code for this response.

Parameters:
resultCode - The result code for this response.

getErrorMessage

public Message getErrorMessage()
Retrieves the error message for this response.

Returns:
The error message for this response, or null if none is available.

setErrorMessage

public void setErrorMessage(Message errorMessage)
Specifies the error message for this response.

Parameters:
errorMessage - The error message for this response.

getMatchedDN

public DN getMatchedDN()
Retrieves the matched DN for this response.

Returns:
The matched DN for this response, or null if none is available.

setMatchedDN

public void setMatchedDN(DN matchedDN)
Specifies the matched DN for this response.

Parameters:
matchedDN - The matched DN for this response.

getReferralURLs

public java.util.List<java.lang.String> getReferralURLs()
Retrieves the set of referral URLs for this response.

Returns:
The set of referral URLs for this response, or null if none are available.

setReferralURLs

public void setReferralURLs(java.util.List<java.lang.String> referralURLs)
Specifies the set of referral URLs for this response.

Parameters:
referralURLs - The set of referral URLs for this response.

getOID

public java.lang.String getOID()
Retrieves the OID for this extended response.

Returns:
The OID for this extended response, or null if none was provided.

setOID

public void setOID(java.lang.String oid)
Specifies the OID for this extended response.

Parameters:
oid - The OID for this extended response.

getValue

public ASN1OctetString getValue()
Retrieves the value for this extended response.

Returns:
The value for this extended response, or null if none was provided.

setValue

public void setValue(ASN1OctetString value)
Specifies the value for this extended response.

Parameters:
value - The value for this extended response.

getType

public byte getType()
Retrieves the BER type for this protocol op.

Specified by:
getType in class ProtocolOp
Returns:
The BER type for this protocol op.

getProtocolOpName

public java.lang.String getProtocolOpName()
Retrieves the name for this protocol op type.

Specified by:
getProtocolOpName in class ProtocolOp
Returns:
The name for this protocol op type.

encode

public ASN1Element encode()
Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.

Specified by:
encode in class ProtocolOp
Returns:
The ASN.1 element containing the encoded protocol op.

decodeExtendedResponse

public static ExtendedResponseProtocolOp decodeExtendedResponse(ASN1Element element)
                                                         throws LDAPException
Decodes the provided ASN.1 element as a extended response protocol op.

Parameters:
element - The ASN.1 element to decode.
Returns:
The decoded extended response protocol op.
Throws:
LDAPException - If a problem occurs while attempting to decode the ASN.1 element to a protocol op.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP protocol op to the provided buffer.

Specified by:
toString in class ProtocolOp
Parameters:
buffer - The buffer to which the string should be appended.

toString

public void toString(java.lang.StringBuilder buffer,
                     int indent)
Appends a multi-line string representation of this LDAP protocol op to the provided buffer.

Specified by:
toString in class ProtocolOp
Parameters:
buffer - The buffer to which the information should be appended.
indent - The number of spaces from the margin that the lines should be indented.