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 class
EntryChangeNotificationControl.ChangeNumberHandler
Parse handler implementation for the change number.private static class
EntryChangeNotificationControl.ChangeTypeHandler
Parse handler implementation for the change type.private static class
EntryChangeNotificationControl.PreviousDnHandler
Parse handler implementation for the previous dn.
-
Field Summary
Fields Modifier and Type Field Description private long
changeNumber
change number.private PersistentSearchChangeType
changeType
change type.private static int
HASH_CODE_SEED
hash code seed.static String
OID
OID of this control.private String
previousDn
previous 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 void
decode(DERBuffer encoded)
Initializes this response control with the supplied BER encoded data.boolean
equals(Object o)
long
getChangeNumber()
Returns the change number.PersistentSearchChangeType
getChangeType()
Returns the change type.String
getPreviousDn()
Returns the previous dn.int
hashCode()
Returns the hash code for this object.void
setChangeNumber(long number)
Sets the change number.void
setChangeType(PersistentSearchChangeType type)
Sets the change type.void
setPreviousDn(String dn)
Sets the previous dn.String
toString()
-
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:
equals
in classAbstractControl
-
hashCode
public int hashCode()
Description copied from class:AbstractControl
Returns the hash code for this object.- Specified by:
hashCode
in classAbstractControl
- Returns:
- hash code
-
toString
public String toString()
- Overrides:
toString
in classAbstractControl
-
decode
public void decode(DERBuffer encoded)
Description copied from interface:ResponseControl
Initializes this response control with the supplied BER encoded data.- Specified by:
decode
in interfaceResponseControl
- Parameters:
encoded
- BER encoded response control
-
-