Package org.infinispan.notifications
Enum Listener.Observation
- java.lang.Object
-
- java.lang.Enum<Listener.Observation>
-
- org.infinispan.notifications.Listener.Observation
-
- All Implemented Interfaces:
Serializable
,Comparable<Listener.Observation>
- Enclosing class:
- Listener
public static enum Listener.Observation extends Enum<Listener.Observation>
Enumeration that defines when a listener event can be observed. A listener can receive an event before and/or after an operation has occurred. If the user wishes to be notified just before the operation completes the listener should observe usingPRE
level. If the user wishes to be notified only after the operation completes the listener should observe usingPOST
level. If the user wishes to have an event before and after they should observe usingBOTH
level.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTH
Observation level used to be notified of an operation before and after it occursPOST
Observation level used to only be notified of an operation after it has completedPRE
Observation level used to only be notified of an operation before it completes
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
shouldInvoke(boolean pre)
static Listener.Observation
valueOf(String name)
Returns the enum constant of this type with the specified name.static Listener.Observation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PRE
public static final Listener.Observation PRE
Observation level used to only be notified of an operation before it completes
-
POST
public static final Listener.Observation POST
Observation level used to only be notified of an operation after it has completed
-
BOTH
public static final Listener.Observation BOTH
Observation level used to be notified of an operation before and after it occurs
-
-
Method Detail
-
values
public static Listener.Observation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Listener.Observation c : Listener.Observation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Listener.Observation valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
shouldInvoke
public abstract boolean shouldInvoke(boolean pre)
-
-