Package org.glassfish.contextpropagation
Interface ContextLifecycle
-
- All Superinterfaces:
ViewCapable
- All Known Implementing Classes:
Location
public interface ContextLifecycle extends ViewCapable
Work contexts that implements this interface will be notified of context propagation lifecycle events when a context is changed, added, removed, or propagated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
contextAdded()
Informs this Context that it was added to the ContextMap.void
contextChanged(Object replacementContext)
Informs the receiver that a new context is taking its place in the ContextMapvoid
contextRemoved()
Informs this Context that it was removed from the ContextMapViewCapable
contextToPropagate()
Sent to a Context just before it is propagated.
-
-
-
Method Detail
-
contextChanged
void contextChanged(Object replacementContext)
Informs the receiver that a new context is taking its place in the ContextMap- Parameters:
replacementContext
- The replacement context.
-
contextAdded
void contextAdded()
Informs this Context that it was added to the ContextMap. This notification is particularly valuable when this Context was automatically added to a ContextMap during deserialization.
-
contextRemoved
void contextRemoved()
Informs this Context that it was removed from the ContextMap
-
contextToPropagate
ViewCapable contextToPropagate()
Sent to a Context just before it is propagated.- Returns:
- The context to propagate. It could be this, another context, or null if the receiver wants to prevent this context propagation.
-
-