Class AbstractResponseControl

java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.AbstractResponseControl
All Implemented Interfaces:
Control, ResponseControl, Freezable
Direct Known Subclasses:
AuthorizationIdentityResponseControl, DirSyncControl, EntryChangeNotificationControl, GenericControl, GetStatsControl, PagedResultsControl, PasswordExpiredControl, PasswordExpiringControl, PasswordPolicyControl, SessionTrackingControl, SortResponseControl, SyncDoneControl, SyncStateControl, VirtualListViewResponseControl

public abstract class AbstractResponseControl extends AbstractControl implements ResponseControl, Freezable
Base class for response controls.
  • Field Details

    • immutable

      private final AtomicBoolean immutable
      Whether this object has been marked immutable.
  • Constructor Details

    • AbstractResponseControl

      public AbstractResponseControl(String id)
      Creates a new abstract response control.
      Parameters:
      id - OID of this control
    • AbstractResponseControl

      public AbstractResponseControl(String id, boolean b)
      Creates a new abstract response control.
      Parameters:
      id - OID of this control
      b - whether this control is critical
  • Method Details

    • freeze

      public void freeze()
      Description copied from interface: Freezable
      Freezes this object, making it immutable.
      Specified by:
      freeze in interface Freezable
    • isFrozen

      public boolean isFrozen()
      Description copied from interface: Freezable
      Determines whether this object is frozen, i.e. immutable.
      Specified by:
      isFrozen in interface Freezable
      Returns:
      True if Freezable.freeze() has been invoked, false otherwise.
    • assertMutable

      public void assertMutable()
      Description copied from interface: Freezable
      Asserts that this object is in a state to permit mutations. Classes that implement this interface should invoke this method prior to performing any mutation of internal state as a means of implementing the "frozen" usage contract.
      Specified by:
      assertMutable in interface Freezable
    • freezeAndAssertMutable

      protected void freezeAndAssertMutable()
      Sets this control as immutable, throws if the control has already been frozen.
      Throws:
      IllegalStateException - if the control has already been frozen