Class 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 Detail

      • controlType

        public java.lang.String controlType
      • criticality

        public boolean criticality
      • controlValue

        public byte[] controlValue
      • controlValueBuffer

        public transient java.nio.ByteBuffer controlValueBuffer
      • 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 class java.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 interface javax.naming.ldap.Control
      • getID

        public java.lang.String getID()
        Specified by:
        getID in interface javax.naming.ldap.Control
      • isCritical

        public boolean isCritical()
        Specified by:
        isCritical in interface javax.naming.ldap.Control