Class ContextObservers
- java.lang.Object
-
- nl.talsmasoftware.context.observer.ContextObservers
-
@Deprecated public final class ContextObservers extends Object
Deprecated.The (static) utility methods from this class were moved to theContextManagersclass.Utility class to assist Context implementors.It implements the SPI behaviour, locating appropriate ContextObserver implementations to be notified of activate and deactivate occurrances.
- Author:
- Sjoerd Talsma
- See Also:
ContextManagers
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> voidonActivate(Class<? extends ContextManager<? super T>> contextManager, T activatedContextValue, T previousContextValue)Deprecated.This method was moved to theContextManagersutility class.static <T> voidonDeactivate(Class<? extends ContextManager<? super T>> contextManager, T deactivatedContextValue, T restoredContextValue)Deprecated.This method was moved to theContextManagersutility class.
-
-
-
Method Detail
-
onActivate
@Deprecated public static <T> void onActivate(Class<? extends ContextManager<? super T>> contextManager, T activatedContextValue, T previousContextValue)
Deprecated.This method was moved to theContextManagersutility class.Notifies all context observers for the specifiedcontextManagerabout the activated context value.- Type Parameters:
T- The type managed by the context manager.- Parameters:
contextManager- The context manager type that activated the context (required to observe).activatedContextValue- The activated context value ornullif no value was activated.previousContextValue- The previous context value ornullif unknown or unsupported.- See Also:
ContextManagers.onActivate(Class, Object, Object)
-
onDeactivate
@Deprecated public static <T> void onDeactivate(Class<? extends ContextManager<? super T>> contextManager, T deactivatedContextValue, T restoredContextValue)
Deprecated.This method was moved to theContextManagersutility class.Notifies all context observers for the specifiedcontextManagerabout the deactivated context value.- Type Parameters:
T- The type managed by the context manager.- Parameters:
contextManager- The context manager type that deactivated the context (required to observe).deactivatedContextValue- The deactivated context valuerestoredContextValue- The restored context value ornullif unknown or unsupported.- See Also:
ContextManagers.onDeactivate(Class, Object, Object)
-
-