Package com.ibm.di.eventhandler.ldap
Class LDAPControl
- java.lang.Object
-
- com.ibm.di.eventhandler.ldap.LDAPControl
-
- All Implemented Interfaces:
java.io.Serializable,javax.naming.ldap.Control
public class LDAPControl extends java.lang.Object implements javax.naming.ldap.Control- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]CONTROL_NAMESstatic java.lang.String[]CONTROL_OIDSjava.lang.StringcontrolTypebyte[]controlValuejava.nio.ByteBuffercontrolValueBufferbooleancriticalitystatic intOID_PAGED_SEARCH
-
Constructor Summary
Constructors Constructor Description LDAPControl(java.lang.String oid)Creates a new instance with the given OID.LDAPControl(java.nio.ByteBuffer buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandleControl()Returns true if this class can handle the encoding/decoding of the control value.java.lang.StringcontrolAttrPrefix()Returns the internal name for the control type.java.nio.ByteBuffergetBuffer()This method returns the entire LDAP control as an encoded BER sequence.EntrygetControlValueEntry()This method parses the control value into an entry object if the control is known to this class.byte[]getEncodedValue()java.lang.StringgetID()booleanisCritical()booleanisPagedSearchControl()voidsetControlValueEntry(Entry entry)This method converts the entry object to the control value sequence required by the control type.java.lang.StringtoString()
-
-
-
Field Detail
-
controlType
public java.lang.String controlType
-
criticality
public boolean criticality
-
controlValue
public byte[] controlValue
-
controlValueBuffer
public transient java.nio.ByteBuffer controlValueBuffer
-
OID_PAGED_SEARCH
public static final int OID_PAGED_SEARCH
- See Also:
- Constant Field Values
-
CONTROL_OIDS
public static final java.lang.String[] CONTROL_OIDS
-
CONTROL_NAMES
public static final java.lang.String[] CONTROL_NAMES
-
-
Constructor Detail
-
LDAPControl
public LDAPControl(java.lang.String oid)
Creates a new instance with the given OID. The provided OID is checked against the local names to translate it to an OID. Otherwise, it is expected that the oid value is a dotted decimal.
-
LDAPControl
public LDAPControl(java.nio.ByteBuffer buf) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
canHandleControl
public boolean canHandleControl()
Returns true if this class can handle the encoding/decoding of the control value.
-
isPagedSearchControl
public boolean isPagedSearchControl()
-
controlAttrPrefix
public java.lang.String controlAttrPrefix()
Returns the internal name for the control type. The control name is used as a suffix when generating an entry for its values.
-
getControlValueEntry
public Entry getControlValueEntry() throws java.lang.Exception
This method parses the control value into an entry object if the control is known to this class. Otherwise, null is returned.- Throws:
java.lang.Exception
-
setControlValueEntry
public void setControlValueEntry(Entry entry) throws java.lang.Exception
This method converts the entry object to the control value sequence required by the control type. If the control type is unknown to this class an exception is thrown.- Throws:
java.lang.Exception
-
getBuffer
public java.nio.ByteBuffer getBuffer() throws java.lang.ExceptionThis method returns the entire LDAP control as an encoded BER sequence.- Throws:
java.lang.Exception
-
getEncodedValue
public byte[] getEncodedValue()
- Specified by:
getEncodedValuein interfacejavax.naming.ldap.Control
-
getID
public java.lang.String getID()
- Specified by:
getIDin interfacejavax.naming.ldap.Control
-
isCritical
public boolean isCritical()
- Specified by:
isCriticalin interfacejavax.naming.ldap.Control
-
-