com.ibm.di.eventhandler.ldap
Class LDAPMessage

java.lang.Object
  extended by com.ibm.di.eventhandler.ldap.Sequence
      extended by com.ibm.di.eventhandler.ldap.LDAPMessage

public class LDAPMessage
extends Sequence


Field Summary
static int ABANDON_REQUEST
           
static int ADD_REQUEST
           
static int ADD_RESPONSE
           
static int APPLICATION
          LDAP Protocol OP Codes
static int BIND_REQUEST
           
static int BIND_RESPONSE
           
static int COMPARE_REQUEST
           
static int COMPARE_RESPONSE
           
static int DELETE_REQUEST
           
static int DELETE_RESPONSE
           
static int EXTENDED_REQUEST
           
static int EXTENDED_RESPONSE
           
static int MODIFY_REQUEST
           
static int MODIFY_RESPONSE
           
static int MODIFYDN_REQUEST
           
static int MODIFYDN_RESPONSE
           
static int SEARCH_REQUEST
           
static int SEARCH_RESULT_DONE
           
static int SEARCH_RESULT_ENTRY
           
static int SEARCH_RESULT_REFERENCE
           
static int UNBIND_REQUEST
           
 
Fields inherited from class com.ibm.di.eventhandler.ldap.Sequence
buffer, tag
 
Constructor Summary
LDAPMessage()
           
LDAPMessage(int messageID)
           
 
Method Summary
 void dump(Log log)
          Dumps the contents of the LDAP message to the log
 java.nio.ByteBuffer getBuffer()
          Returns the BER encoded LDAP message as a ByteBuffer
 Entry getEntry()
          Returns the normalized Entry object that represents the LDAP message
 int getMessageID()
          Returns the message id for this LDAP message
 Request getRequest()
          Returns the request object from the LDAP message ( call after successful parse() )
 boolean parse(java.io.InputStream is)
          This method is called to parse an input message.
 boolean parse(java.io.InputStream is, java.lang.String charset, java.util.Vector binattrs)
          This method is called to parse an input message.
 void setControls(java.lang.Object[] arr)
          Sets the controls array (array of LDAPControl objects) that is sent back to the client.
 void setMessageID(int messageID)
          Sets the messageID to use in a response packet.
 void setResponse(Sequence response)
          Sets the response (LDAPResult) message that is sent back to the client.
 
Methods inherited from class com.ibm.di.eventhandler.ldap.Sequence
addBuffer, addBuffer, flip, getBuffer, getBuffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION

public static final int APPLICATION
LDAP Protocol OP Codes

See Also:
Constant Field Values

BIND_REQUEST

public static final int BIND_REQUEST
See Also:
Constant Field Values

BIND_RESPONSE

public static final int BIND_RESPONSE
See Also:
Constant Field Values

UNBIND_REQUEST

public static final int UNBIND_REQUEST
See Also:
Constant Field Values

SEARCH_REQUEST

public static final int SEARCH_REQUEST
See Also:
Constant Field Values

SEARCH_RESULT_ENTRY

public static final int SEARCH_RESULT_ENTRY
See Also:
Constant Field Values

SEARCH_RESULT_DONE

public static final int SEARCH_RESULT_DONE
See Also:
Constant Field Values

MODIFY_REQUEST

public static final int MODIFY_REQUEST
See Also:
Constant Field Values

MODIFY_RESPONSE

public static final int MODIFY_RESPONSE
See Also:
Constant Field Values

ADD_REQUEST

public static final int ADD_REQUEST
See Also:
Constant Field Values

ADD_RESPONSE

public static final int ADD_RESPONSE
See Also:
Constant Field Values

DELETE_REQUEST

public static final int DELETE_REQUEST
See Also:
Constant Field Values

DELETE_RESPONSE

public static final int DELETE_RESPONSE
See Also:
Constant Field Values

MODIFYDN_REQUEST

public static final int MODIFYDN_REQUEST
See Also:
Constant Field Values

MODIFYDN_RESPONSE

public static final int MODIFYDN_RESPONSE
See Also:
Constant Field Values

COMPARE_REQUEST

public static final int COMPARE_REQUEST
See Also:
Constant Field Values

COMPARE_RESPONSE

public static final int COMPARE_RESPONSE
See Also:
Constant Field Values

ABANDON_REQUEST

public static final int ABANDON_REQUEST
See Also:
Constant Field Values

SEARCH_RESULT_REFERENCE

public static final int SEARCH_RESULT_REFERENCE
See Also:
Constant Field Values

EXTENDED_REQUEST

public static final int EXTENDED_REQUEST
See Also:
Constant Field Values

EXTENDED_RESPONSE

public static final int EXTENDED_RESPONSE
See Also:
Constant Field Values
Constructor Detail

LDAPMessage

public LDAPMessage()

LDAPMessage

public LDAPMessage(int messageID)
Method Detail

getBuffer

public java.nio.ByteBuffer getBuffer()
Returns the BER encoded LDAP message as a ByteBuffer

Overrides:
getBuffer in class Sequence

parse

public boolean parse(java.io.InputStream is)
              throws java.lang.Exception
This method is called to parse an input message. On success the getRequest() and getMessageID() methods can be called to retrieve the LDAP request.

Throws:
java.lang.Exception

parse

public boolean parse(java.io.InputStream is,
                     java.lang.String charset,
                     java.util.Vector binattrs)
              throws java.lang.Exception
This method is called to parse an input message. On success the getRequest() and getMessageID() methods can be called to retrieve the LDAP request.

Throws:
java.lang.Exception

getMessageID

public int getMessageID()
Returns the message id for this LDAP message


setResponse

public void setResponse(Sequence response)
Sets the response (LDAPResult) message that is sent back to the client.


setControls

public void setControls(java.lang.Object[] arr)
                 throws java.lang.Exception
Sets the controls array (array of LDAPControl objects) that is sent back to the client.

Throws:
java.lang.Exception

setMessageID

public void setMessageID(int messageID)
Sets the messageID to use in a response packet.


getRequest

public Request getRequest()
Returns the request object from the LDAP message ( call after successful parse() )


getEntry

public Entry getEntry()
Returns the normalized Entry object that represents the LDAP message


dump

public void dump(Log log)
Dumps the contents of the LDAP message to the log