Package org.glassfish.internal.api
Interface ContextProducer.Instance
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
JavaEEContextUtil.Instance
- All Known Implementing Classes:
JavaEEContextUtilImpl.InstanceImpl
- Enclosing interface:
- ContextProducer
public static interface ContextProducer.Instance extends Serializable
specific, immutable, thread-safe instance of the context
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearInstanceInvocation()
remove cached invocation from this instance, in case the underlying app unloaded but component ID remains, just in case the app is reloadedString
getInstanceComponentId()
boolean
isEmpty()
boolean
isLoaded()
This is different from class loaded, as there are some situations where class is loaded but initialization is not complete, such as CDI initializations, extensions start, etc.ContextProducer.Context
pushContext()
pushes Java EE invocation context onto the invocation stack use try-with-resources to pop the context no-op if non-running contextContextProducer.Context
pushRequestContext()
pushes invocation context onto the stack Also creates Request scope use try-with-resources to pop the context no-op if non-running contextContextProducer.Context
setApplicationClassLoader()
set context class loader by component id of this instance for empty or unloaded component, class loader remains unset and the context is a no-op (no re-set gets done) so it's a no-op
-
-
-
Method Detail
-
pushContext
ContextProducer.Context pushContext()
pushes Java EE invocation context onto the invocation stack use try-with-resources to pop the context no-op if non-running context- Returns:
- the new context that was created
-
pushRequestContext
ContextProducer.Context pushRequestContext()
pushes invocation context onto the stack Also creates Request scope use try-with-resources to pop the context no-op if non-running context- Returns:
- new context that was created
-
setApplicationClassLoader
ContextProducer.Context setApplicationClassLoader()
set context class loader by component id of this instance for empty or unloaded component, class loader remains unset and the context is a no-op (no re-set gets done) so it's a no-op- Returns:
- context so class loader can be reset
-
getInstanceComponentId
String getInstanceComponentId()
- Returns:
- component ID for the current instance, or null if empty instance
-
isLoaded
boolean isLoaded()
This is different from class loaded, as there are some situations where class is loaded but initialization is not complete, such as CDI initializations, extensions start, etc.- Returns:
- true if component is loaded and starting
-
isEmpty
boolean isEmpty()
- Returns:
- true if this is an empty context
-
clearInstanceInvocation
void clearInstanceInvocation()
remove cached invocation from this instance, in case the underlying app unloaded but component ID remains, just in case the app is reloaded
-
-