public enum EventType extends Enum<EventType>
DirectoryListener
may register for
notification on using the EventService
. Sometimes an entry is
moved and renamed at the same time. These notifications are sent when
either RENAME or MOVE notifications are enabled.Enum Constant and Description |
---|
ADD |
DELETE |
MODIFY |
MOVE |
MOVE_AND_RENAME |
RENAME |
Modifier and Type | Field and Description |
---|---|
static int |
ALL_EVENT_TYPES_MASK |
static int |
MOVE_AND_RENAME_MASK |
Modifier and Type | Method and Description |
---|---|
static EventType[] |
getEventTypes(int psearchChangeTypes)
Gets an array of EventTypes from the PSearchControl changeTypes
parameter value.
|
int |
getMask() |
static int |
getMask(EventType... eventTypes)
Compute the mask associated with the given eventTypes
|
static EventType |
getType(int mask)
checks if the given mask value matches with any of the defined
standard EventTypes
|
static boolean |
isAdd(int mask)
Tells if the EventType is an ADD
|
static boolean |
isDelete(int mask)
Tells if the EventType is a DELETE
|
static boolean |
isModify(int mask)
Tells if the EventType is a MODIFY
|
static boolean |
isMove(int mask)
Tells if the EventType is a MOVE
|
static boolean |
isMoveAndRename(int mask)
Tells if the EventType is a MOVE and RENAME
|
static boolean |
isRename(int mask)
Tells if the EventType is a RENAME
|
static String |
toString(int mask)
Print the flags
|
static EventType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EventType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EventType MOVE_AND_RENAME
public static final int ALL_EVENT_TYPES_MASK
public static final int MOVE_AND_RENAME_MASK
public static EventType[] values()
for (EventType c : EventType.values()) System.out.println(c);
public static EventType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getMask()
public static EventType[] getEventTypes(int psearchChangeTypes)
The changeTypes field is the logical OR of one or more of these values:
add (1), delete (2), modify (4), modDN (8). By default this is set to 1 |
2 | 4 | 8 which is the integer value 0x0F or 15.
NOTE: When the changeTypes mask includes a modDN(8) we include both the
RENAME and MOVE EventType objects in the array.psearchChangeTypes
- the value of the changeTypes parameterpublic static boolean isAdd(int mask)
mask
- The EventType to checkpublic static boolean isDelete(int mask)
mask
- The EventType to checkpublic static boolean isModify(int mask)
mask
- The EventType to checkpublic static boolean isMove(int mask)
mask
- The EventType to checkpublic static boolean isRename(int mask)
mask
- The EventType to checkpublic static boolean isMoveAndRename(int mask)
mask
- The EventType to checkpublic static int getMask(EventType... eventTypes)
eventTypes
- The eventTypespublic static EventType getType(int mask)
mask
- the mask value of the EventTypeCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.