org.opends.server.protocols.ldap
Class ProtocolOp

java.lang.Object
  extended by org.opends.server.protocols.ldap.ProtocolOp
Direct Known Subclasses:
AbandonRequestProtocolOp, AddRequestProtocolOp, AddResponseProtocolOp, BindRequestProtocolOp, BindResponseProtocolOp, CompareRequestProtocolOp, CompareResponseProtocolOp, DeleteRequestProtocolOp, DeleteResponseProtocolOp, ExtendedRequestProtocolOp, ExtendedResponseProtocolOp, IntermediateResponseProtocolOp, ModifyDNRequestProtocolOp, ModifyDNResponseProtocolOp, ModifyRequestProtocolOp, ModifyResponseProtocolOp, SearchRequestProtocolOp, SearchResultDoneProtocolOp, SearchResultEntryProtocolOp, SearchResultReferenceProtocolOp, UnbindRequestProtocolOp

public abstract class ProtocolOp
extends java.lang.Object

This class defines the structures and methods for an LDAP protocol op, which is the core of an LDAP message.


Constructor Summary
ProtocolOp()
           
 
Method Summary
static ProtocolOp decode(ASN1Element element)
          Decodes the provided ASN.1 element as an LDAP protocol op.
abstract  ASN1Element encode()
          Encodes this protocol op to an ASN.1 element suitable for including in an LDAP message.
abstract  java.lang.String getProtocolOpName()
          Retrieves the name for this protocol op type.
abstract  byte getType()
          Retrieves the BER type for this protocol op.
 java.lang.String toString()
          Retrieves a string representation of this LDAP protocol op.
abstract  void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this LDAP protocol op to the provided buffer.
abstract  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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProtocolOp

public ProtocolOp()
Method Detail

getType

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

Returns:
The BER type for this protocol op.

getProtocolOpName

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

Returns:
The name for this protocol op type.

encode

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

Returns:
The ASN.1 element containing the encoded protocol op.

decode

public static ProtocolOp decode(ASN1Element element)
                         throws LDAPException
Decodes the provided ASN.1 element as an LDAP protocol op.

Parameters:
element - The ASN.1 element containing the encoded LDAP protocol op.
Returns:
The LDAP protocol op decoded from the provided ASN.1 element.
Throws:
LDAPException - If a problem occurs while trying to decode the provided ASN.1 element as an LDAP protocol op.

toString

public java.lang.String toString()
Retrieves a string representation of this LDAP protocol op.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this LDAP protocol op.

toString

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

Parameters:
buffer - The buffer to which the string should be appended.

toString

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

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.