@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class EntryChangeNotificationControl extends Control implements DecodeableControl
PersistentSearchRequestControl
class) and have been
changed in a way associated with the registered change types for that search.
PersistentSearchChangeType
enum.returnECs
flag set to true
to
indicate that entry change notification controls should be included in
resulting entries. Further, the entry change notification control will only
be included in entries that are returned as the result of a change in the
server and not any of the preliminary entries that may be returned if the
corresponding persistent search request had the changesOnly
flag set
to false
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENTRY_CHANGE_NOTIFICATION_OID
The OID (2.16.840.1.113730.3.4.7) for the entry change notification
control.
|
Constructor and Description |
---|
EntryChangeNotificationControl(PersistentSearchChangeType changeType,
java.lang.String previousDN,
long changeNumber)
Creates a new entry change notification control with the provided
information.
|
EntryChangeNotificationControl(PersistentSearchChangeType changeType,
java.lang.String previousDN,
long changeNumber,
boolean isCritical)
Creates a new entry change notification control with the provided
information.
|
EntryChangeNotificationControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new entry change notification control with the provided
information.
|
Modifier and Type | Method and Description |
---|---|
EntryChangeNotificationControl |
decodeControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new instance of this decodeable control from the provided
information.
|
static EntryChangeNotificationControl |
get(SearchResultEntry entry)
Extracts an entry change notification control from the provided search
result entry.
|
long |
getChangeNumber()
Retrieves the change number for the associated change, if available.
|
PersistentSearchChangeType |
getChangeType()
Retrieves the change type for this entry change notification control.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
java.lang.String |
getPreviousDN()
Retrieves the previous DN for the entry, if applicable.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, toString, writeTo
public static final java.lang.String ENTRY_CHANGE_NOTIFICATION_OID
public EntryChangeNotificationControl(PersistentSearchChangeType changeType, java.lang.String previousDN, long changeNumber)
changeType
- The change type for the change. It must not be
null
.previousDN
- The previous DN of the entry, if applicable.changeNumber
- The change number to include in this control, or
-1 if there should not be a change number.public EntryChangeNotificationControl(PersistentSearchChangeType changeType, java.lang.String previousDN, long changeNumber, boolean isCritical)
changeType
- The change type for the change. It must not be
null
.previousDN
- The previous DN of the entry, if applicable.changeNumber
- The change number to include in this control, or
-1 if there should not be a change number.isCritical
- Indicates whether this control should be marked
critical.public EntryChangeNotificationControl(java.lang.String oid, boolean isCritical, ASN1OctetString value) throws LDAPException
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided control cannot be decoded as an
entry change notification control.public EntryChangeNotificationControl decodeControl(java.lang.String oid, boolean isCritical, ASN1OctetString value) throws LDAPException
decodeControl
in interface DecodeableControl
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided information cannot be decoded as a
valid instance of this decodeable control.public static EntryChangeNotificationControl get(SearchResultEntry entry) throws LDAPException
entry
- The search result entry from which to retrieve the entry
change notification control.null
if the entry did not contain
an entry change notification control.LDAPException
- If a problem is encountered while attempting to
decode the entry change notification control
contained in the provided entry.public PersistentSearchChangeType getChangeType()
public java.lang.String getPreviousDN()
null
if there is none.public long getChangeNumber()
public java.lang.String getControlName()
getControlName
in class Control