org.apache.directory.api.ldap.model.message.controls
Class AbstractControl

java.lang.Object
  extended by org.apache.directory.api.ldap.model.message.controls.AbstractControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
CascadeImpl, EntryChangeImpl, ManageDsaITImpl, OpaqueControl, PagedResultsImpl, PersistentSearchImpl, SubentriesImpl

public abstract class AbstractControl
extends Object
implements Control

A simple implementation of the Control interface with storage for the OID and the criticality properties. When the codec factory service does not have specific control factories available, hence the control is unrecognized, it creates instances of this control for them.

Author:
Apache Directory Project

Constructor Summary
AbstractControl(String oid)
          Creates a Control with a specific OID.
AbstractControl(String oid, boolean criticality)
          Creates a Control with a specific OID, and criticality set.
 
Method Summary
 boolean equals(Object o)
           
 String getOid()
          Get the OID
 int hashCode()
           
 boolean isCritical()
          Get the criticality
 void setCritical(boolean criticality)
          Set the criticality
 String toString()
          Return a String representing a Control
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractControl

public AbstractControl(String oid)
Creates a Control with a specific OID.

Parameters:
oid - The OID of this Control.

AbstractControl

public AbstractControl(String oid,
                       boolean criticality)
Creates a Control with a specific OID, and criticality set.

Parameters:
oid - The OID of this Control.
criticality - true if this Control is critical, false otherwise.
Method Detail

getOid

public String getOid()
Get the OID

Specified by:
getOid in interface Control
Returns:
A string which represent the control oid

isCritical

public boolean isCritical()
Get the criticality

Specified by:
isCritical in interface Control
Returns:
true if the criticality flag is true.

setCritical

public void setCritical(boolean criticality)
Set the criticality

Specified by:
setCritical in interface Control
Parameters:
criticality - The criticality value

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

toString

public String toString()
Return a String representing a Control

Overrides:
toString in class Object


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.