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_NAMES
static java.lang.String[]
CONTROL_OIDS
java.lang.String
controlType
byte[]
controlValue
java.nio.ByteBuffer
controlValueBuffer
boolean
criticality
static int
OID_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 boolean
canHandleControl()
Returns true if this class can handle the encoding/decoding of the control value.java.lang.String
controlAttrPrefix()
Returns the internal name for the control type.java.nio.ByteBuffer
getBuffer()
This method returns the entire LDAP control as an encoded BER sequence.Entry
getControlValueEntry()
This method parses the control value into an entry object if the control is known to this class.byte[]
getEncodedValue()
java.lang.String
getID()
boolean
isCritical()
boolean
isPagedSearchControl()
void
setControlValueEntry(Entry entry)
This method converts the entry object to the control value sequence required by the control type.java.lang.String
toString()
-
-
-
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:
toString
in 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.Exception
This method returns the entire LDAP control as an encoded BER sequence.- Throws:
java.lang.Exception
-
getEncodedValue
public byte[] getEncodedValue()
- Specified by:
getEncodedValue
in interfacejavax.naming.ldap.Control
-
getID
public java.lang.String getID()
- Specified by:
getID
in interfacejavax.naming.ldap.Control
-
isCritical
public boolean isCritical()
- Specified by:
isCritical
in interfacejavax.naming.ldap.Control
-
-