org.apache.directory.server.core.event
Enum EventType
java.lang.Object
java.lang.Enum<EventType>
org.apache.directory.server.core.event.EventType
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<EventType>
public enum EventType
- extends java.lang.Enum<EventType>
The different kinds of events a 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.
- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
Method Summary |
static EventType[] |
getEventTypes(int psearchChangeTypes)
Gets an array of EventTypes from the PSearchControl changeTypes
parameter value. |
int |
getMask()
|
static int |
getMask(EventType... eventTypes)
|
static boolean |
isAdd(int mask)
|
static boolean |
isDelete(int mask)
|
static boolean |
isModify(int mask)
|
static boolean |
isMove(int mask)
|
static boolean |
isMoveAndRename(int mask)
|
static boolean |
isRename(int mask)
|
static EventType |
valueOf(java.lang.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're declared. |
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ADD
public static final EventType ADD
DELETE
public static final EventType DELETE
MODIFY
public static final EventType MODIFY
RENAME
public static final EventType RENAME
MOVE
public static final EventType MOVE
ALL_EVENT_TYPES_MASK
public static final int ALL_EVENT_TYPES_MASK
MOVE_OR_RENAME_MASK
public static final int MOVE_OR_RENAME_MASK
values
public static final EventType[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(EventType c : EventType.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static EventType valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
getMask
public int getMask()
getEventTypes
public static EventType[] getEventTypes(int psearchChangeTypes)
- Gets an array of EventTypes from the PSearchControl changeTypes
parameter value. According to the documentation of the changeTypes
field of the Persistent Search Control:
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.
- Parameters:
psearchChangeTypes
- the value of the changeTypes parameter
- Returns:
- array of EventType objects
- See Also:
PersistentSearchControl
isAdd
public static boolean isAdd(int mask)
isDelete
public static boolean isDelete(int mask)
isModify
public static boolean isModify(int mask)
isMove
public static boolean isMove(int mask)
isRename
public static boolean isRename(int mask)
isMoveAndRename
public static boolean isMoveAndRename(int mask)
getMask
public static int getMask(EventType... eventTypes)
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.