Class SyncRequestControl

  • All Implemented Interfaces:
    Control, RequestControl

    public class SyncRequestControl
    extends AbstractControl
    implements RequestControl
    Request control for ldap content synchronization. See RFC 4533. Control is defined as:
        syncRequestValue ::= SEQUENCE {
            mode ENUMERATED {
                -- 0 unused
                refreshOnly       (1),
                -- 2 reserved
                refreshAndPersist (3)
            },
            cookie     syncCookie OPTIONAL,
            reloadHint BOOLEAN DEFAULT FALSE
        }
     
    • Field Detail

      • HASH_CODE_SEED

        private static final int HASH_CODE_SEED
        hash value seed.
        See Also:
        Constant Field Values
      • cookie

        private byte[] cookie
        server generated cookie.
      • reloadHint

        private boolean reloadHint
        reload hint.
    • Constructor Detail

      • SyncRequestControl

        public SyncRequestControl()
        Default constructor.
      • SyncRequestControl

        public SyncRequestControl​(SyncRequestControl.Mode mode)
        Creates a new sync request control.
        Parameters:
        mode - request mode
      • SyncRequestControl

        public SyncRequestControl​(SyncRequestControl.Mode mode,
                                  boolean critical)
        Creates a new sync request control.
        Parameters:
        mode - request mode
        critical - whether this control is critical
      • SyncRequestControl

        public SyncRequestControl​(SyncRequestControl.Mode mode,
                                  byte[] value,
                                  boolean critical)
        Creates a new sync request control.
        Parameters:
        mode - request mode
        value - sync request cookie
        critical - whether this control is critical
      • SyncRequestControl

        public SyncRequestControl​(SyncRequestControl.Mode mode,
                                  byte[] value,
                                  boolean hint,
                                  boolean critical)
        Creates a new sync request control.
        Parameters:
        mode - request mode
        value - sync request cookie
        hint - reload hint
        critical - whether this control is critical
    • Method Detail

      • hasValue

        public boolean hasValue()
        Description copied from interface: RequestControl
        Returns whether the control has a value associated with it.
        Specified by:
        hasValue in interface RequestControl
        Returns:
        whether the control has a value
      • setRequestMode

        public void setRequestMode​(SyncRequestControl.Mode mode)
        Sets the request mode.
        Parameters:
        mode - request mode
      • getCookie

        public byte[] getCookie()
        Returns the sync request cookie.
        Returns:
        sync request cookie
      • setCookie

        public void setCookie​(byte[] value)
        Sets the sync request cookie.
        Parameters:
        value - sync request cookie
      • getReloadHint

        public boolean getReloadHint()
        Returns the reload hint.
        Returns:
        reload hint
      • setReloadHint

        public void setReloadHint​(boolean b)
        Sets the reload hint.
        Parameters:
        b - reload hint
      • hashCode

        public int hashCode()
        Description copied from class: AbstractControl
        Returns the hash code for this object.
        Specified by:
        hashCode in class AbstractControl
        Returns:
        hash code
      • encode

        public byte[] encode()
        Description copied from interface: RequestControl
        Provides the BER encoding of this control.
        Specified by:
        encode in interface RequestControl
        Returns:
        BER encoded request control