org.opends.server.protocols.ldap
Class IntermediateResponseProtocolOp

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

public class IntermediateResponseProtocolOp
extends ProtocolOp

This class defines the structures and methods for an LDAP intermediate response protocol op, which is used to provide information to a client before the final response for an operation.


Constructor Summary
IntermediateResponseProtocolOp(java.lang.String oid)
          Creates a new intermediate protocol op with the specified OID and no value.
IntermediateResponseProtocolOp(java.lang.String oid, ASN1OctetString value)
          Creates a new intermediate response protocol op with the specified OID and value.
 
Method Summary
static IntermediateResponseProtocolOp decodeIntermediateResponse(ASN1Element element)
          Decodes the provided ASN.1 element as an LDAP intermediate response protocol op.
 ASN1Element encode()
          Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.
 java.lang.String getOID()
          Retrieves the OID for this intermediate response.
 java.lang.String getProtocolOpName()
          Retrieves the name for this protocol op type.
 byte getType()
          Retrieves the BER type for this protocol op.
 ASN1OctetString getValue()
          Retrieves the value for this intermediate response.
 void setOID(java.lang.String oid)
          Specifies the OID for this intermediate response.
 void setValue(ASN1OctetString value)
          Specifies the value for this intermediate 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

IntermediateResponseProtocolOp

public IntermediateResponseProtocolOp(java.lang.String oid)
Creates a new intermediate protocol op with the specified OID and no value.

Parameters:
oid - The OID for this intermediate response.

IntermediateResponseProtocolOp

public IntermediateResponseProtocolOp(java.lang.String oid,
                                      ASN1OctetString value)
Creates a new intermediate response protocol op with the specified OID and value.

Parameters:
oid - The OID for this intermediate response.
value - The value for this intermediate response.
Method Detail

getOID

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

Returns:
The OID for this intermediate response, or null if there is no OID.

setOID

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

Parameters:
oid - The OID for this intermediate response.

getValue

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

Returns:
The value for this intermediate response, or null if there is no value.

setValue

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

Parameters:
value - The value for this intermediate 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.

decodeIntermediateResponse

public static IntermediateResponseProtocolOp decodeIntermediateResponse(ASN1Element element)
                                                                 throws LDAPException
Decodes the provided ASN.1 element as an LDAP intermediate response protocol op.

Parameters:
element - The ASN.1 element to be decoded.
Returns:
The decoded intermediate response protocol op.
Throws:
LDAPException - If a problem occurs while attempting to decode the provided ASN.1 element as an LDAP intermediate response 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.