Package com.ibm.di.eventhandler.ldap
Class LDAPMessage
- java.lang.Object
-
- com.ibm.di.eventhandler.ldap.Sequence
-
- com.ibm.di.eventhandler.ldap.LDAPMessage
-
public class LDAPMessage extends Sequence
-
-
Field Summary
Fields Modifier and Type Field Description static intABANDON_REQUESTstatic intADD_REQUESTstatic intADD_RESPONSEstatic intAPPLICATIONLDAP Protocol OP Codesstatic intBIND_REQUESTstatic intBIND_RESPONSEstatic intCOMPARE_REQUESTstatic intCOMPARE_RESPONSEstatic intDELETE_REQUESTstatic intDELETE_RESPONSEstatic intEXTENDED_REQUESTstatic intEXTENDED_RESPONSEstatic intMODIFY_REQUESTstatic intMODIFY_RESPONSEstatic intMODIFYDN_REQUESTstatic intMODIFYDN_RESPONSEstatic intSEARCH_REQUESTstatic intSEARCH_RESULT_DONEstatic intSEARCH_RESULT_ENTRYstatic intSEARCH_RESULT_REFERENCEstatic intUNBIND_REQUEST
-
Constructor Summary
Constructors Constructor Description LDAPMessage()LDAPMessage(int messageID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(Log log)Dumps the contents of the LDAP message to the logjava.nio.ByteBuffergetBuffer()Returns the BER encoded LDAP message as a ByteBufferEntrygetEntry()Returns the normalized Entry object that represents the LDAP messageintgetMessageID()Returns the message id for this LDAP messageRequestgetRequest()Returns the request object from the LDAP message ( call after successful parse() )booleanparse(java.io.InputStream is)This method is called to parse an input message.booleanparse(java.io.InputStream is, java.lang.String charset, java.util.Vector binattrs)This method is called to parse an input message.voidsetControls(java.lang.Object[] arr)Sets the controls array (array of LDAPControl objects) that is sent back to the client.voidsetMessageID(int messageID)Sets the messageID to use in a response packet.voidsetResponse(Sequence response)Sets the response (LDAPResult) message that is sent back to the client.
-
-
-
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
-
-
Method Detail
-
getBuffer
public java.nio.ByteBuffer getBuffer()
Returns the BER encoded LDAP message as a ByteBuffer
-
parse
public boolean parse(java.io.InputStream is) throws java.lang.ExceptionThis 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.ExceptionThis 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.ExceptionSets 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
-
-