Package org.ldaptive.control
Class EntryChangeNotificationControl
- java.lang.Object
-
- org.ldaptive.control.AbstractControl
-
- org.ldaptive.control.EntryChangeNotificationControl
-
- All Implemented Interfaces:
Control,ResponseControl
public class EntryChangeNotificationControl extends AbstractControl implements ResponseControl
Response control for persistent search. See http://tools.ietf.org/id/draft-ietf-ldapext-psearch-03.txt. Control is defined as:EntryChangeNotification ::= SEQUENCE { changeType ENUMERATED { add (1), delete (2), modify (4), modDN (8) }, previousDN LDAPDN OPTIONAL, -- modifyDN ops. only changeNumber INTEGER OPTIONAL -- if supported }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classEntryChangeNotificationControl.ChangeNumberHandlerParse handler implementation for the change number.private static classEntryChangeNotificationControl.ChangeTypeHandlerParse handler implementation for the change type.private static classEntryChangeNotificationControl.PreviousDnHandlerParse handler implementation for the previous dn.
-
Field Summary
Fields Modifier and Type Field Description private longchangeNumberchange number.private PersistentSearchChangeTypechangeTypechange type.private static intHASH_CODE_SEEDhash code seed.static StringOIDOID of this control.private StringpreviousDnprevious dn.-
Fields inherited from class org.ldaptive.control.AbstractControl
logger
-
-
Constructor Summary
Constructors Constructor Description EntryChangeNotificationControl()Default constructor.EntryChangeNotificationControl(boolean critical)Creates a new entry change notification control.EntryChangeNotificationControl(PersistentSearchChangeType type)Creates a new entry change notification control.EntryChangeNotificationControl(PersistentSearchChangeType type, boolean critical)Creates a new entry change notification control.EntryChangeNotificationControl(PersistentSearchChangeType type, String dn, long number)Creates a new entry change notification control.EntryChangeNotificationControl(PersistentSearchChangeType type, String dn, long number, boolean critical)Creates a new entry change notification control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(DERBuffer encoded)Initializes this response control with the supplied BER encoded data.booleanequals(Object o)longgetChangeNumber()Returns the change number.PersistentSearchChangeTypegetChangeType()Returns the change type.StringgetPreviousDn()Returns the previous dn.inthashCode()Returns the hash code for this object.voidsetChangeNumber(long number)Sets the change number.voidsetChangeType(PersistentSearchChangeType type)Sets the change type.voidsetPreviousDn(String dn)Sets the previous dn.StringtoString()-
Methods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOID
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
-
-
-
-
Field Detail
-
OID
public static final String OID
OID of this control.- See Also:
- Constant Field Values
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
changeType
private PersistentSearchChangeType changeType
change type.
-
previousDn
private String previousDn
previous dn.
-
changeNumber
private long changeNumber
change number.
-
-
Constructor Detail
-
EntryChangeNotificationControl
public EntryChangeNotificationControl()
Default constructor.
-
EntryChangeNotificationControl
public EntryChangeNotificationControl(boolean critical)
Creates a new entry change notification control.- Parameters:
critical- whether this control is critical
-
EntryChangeNotificationControl
public EntryChangeNotificationControl(PersistentSearchChangeType type)
Creates a new entry change notification control.- Parameters:
type- persistent search change type
-
EntryChangeNotificationControl
public EntryChangeNotificationControl(PersistentSearchChangeType type, boolean critical)
Creates a new entry change notification control.- Parameters:
type- persistent search change typecritical- whether this control is critical
-
EntryChangeNotificationControl
public EntryChangeNotificationControl(PersistentSearchChangeType type, String dn, long number)
Creates a new entry change notification control.- Parameters:
type- persistent search change typedn- previous dnnumber- change number
-
EntryChangeNotificationControl
public EntryChangeNotificationControl(PersistentSearchChangeType type, String dn, long number, boolean critical)
Creates a new entry change notification control.- Parameters:
type- persistent search change typedn- previous dnnumber- change numbercritical- whether this control is critical
-
-
Method Detail
-
getChangeType
public PersistentSearchChangeType getChangeType()
Returns the change type.- Returns:
- change type
-
setChangeType
public void setChangeType(PersistentSearchChangeType type)
Sets the change type.- Parameters:
type- change type
-
getPreviousDn
public String getPreviousDn()
Returns the previous dn.- Returns:
- previous dn
-
setPreviousDn
public void setPreviousDn(String dn)
Sets the previous dn.- Parameters:
dn- previous dn
-
getChangeNumber
public long getChangeNumber()
Returns the change number.- Returns:
- change number
-
setChangeNumber
public void setChangeNumber(long number)
Sets the change number.- Parameters:
number- change number
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractControl
-
hashCode
public int hashCode()
Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
hashCodein classAbstractControl- Returns:
- hash code
-
toString
public String toString()
- Overrides:
toStringin classAbstractControl
-
decode
public void decode(DERBuffer encoded)
Description copied from interface:ResponseControlInitializes this response control with the supplied BER encoded data.- Specified by:
decodein interfaceResponseControl- Parameters:
encoded- BER encoded response control
-
-