Package org.wildfly.common.selector
Class Selector<T>
java.lang.Object
org.wildfly.common.selector.Selector<T>
- Direct Known Subclasses:
GlobalSelector,ThreadLocalSelector
Deprecated.
A selector for an object which is obtainable via static context.
- Author:
- David M. Lloyd
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDeprecated.An efficient, unchecked getter for a selector for a given class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Tget()Deprecated.Get the currently relevant object, ornullif there is none.static SelectorPermissiongetChangePermissionFor(Class<?> clazz) Deprecated.Get thechangepermission for the given class.static SelectorPermissiongetGetPermissionFor(Class<?> clazz) Deprecated.Get thegetpermission for the given class.static SelectorPermissiongetSetPermissionFor(Class<?> clazz) Deprecated.Get thesetpermission for the given class.static <T> Selector<T>Deprecated.Get thenullselector.static <T> Selector<T>selectorFor(Class<T> clazz) Deprecated.Get the selector for a given class.static <T> PrivilegedAction<Selector.Getter<T>>selectorGetterActionFor(Class<T> clazz) Deprecated.Get a privileged action which returns the getter for a selector.static <T> Selector.Getter<T>selectorGetterFor(Class<T> clazz) Deprecated.Get an efficient, unchecked selector getter for a given class.static <T> voidsetSelectorFor(Class<T> clazz, Selector<T> selector) Deprecated.Set the selector for a given class.
-
Constructor Details
-
Selector
protected Selector()Deprecated.
-
-
Method Details
-
get
Deprecated.Get the currently relevant object, ornullif there is none.- Returns:
- the currently relevant object
-
nullSelector
Deprecated.Get thenullselector. This selector always returnsnull.- Type Parameters:
T- the selectable class' type- Returns:
- the
nullselector
-
selectorFor
Deprecated.Get the selector for a given class. Never returnsnull. If there is a selector set, the caller must have thegetSelectorPermissionfor the class.- Type Parameters:
T- the class type- Parameters:
clazz- the class- Returns:
- the selector for the given type (not
null)
-
setSelectorFor
Deprecated.Set the selector for a given class. If there is no selector set, the caller must have thesetSelectorPermissionfor that class. If there is one set, the caller must have thechangeSelectorPermission. If there is a selector set, and it is identical to the proposed selector, this method returns without taking any action.- Type Parameters:
T- the class type- Parameters:
clazz- the classselector- the selector to set for the class
-
selectorGetterFor
Deprecated.Get an efficient, unchecked selector getter for a given class. The caller must have thegetSelectorPermissionfor the class.- Type Parameters:
T- the class type- Parameters:
clazz- the class- Returns:
- the unchecked selector getter
-
selectorGetterActionFor
Deprecated.Get a privileged action which returns the getter for a selector.- Type Parameters:
T- the class type- Parameters:
clazz- the class- Returns:
- the getter privileged action
-
getGetPermissionFor
Deprecated.Get thegetpermission for the given class. The permission is cached.- Parameters:
clazz- the class to get the permission for- Returns:
- the selector permission for the class
-
getSetPermissionFor
Deprecated.Get thesetpermission for the given class. The permission is cached.- Parameters:
clazz- the class to get the permission for- Returns:
- the selector permission for the class
-
getChangePermissionFor
Deprecated.Get thechangepermission for the given class. The permission is cached.- Parameters:
clazz- the class to get the permission for- Returns:
- the selector permission for the class
-
Contextualinstead.