Package fish.payara.appserver.context
Class JavaEEContextUtilImpl.InstanceImpl
- java.lang.Object
-
- fish.payara.appserver.context.JavaEEContextUtilImpl.InstanceImpl
-
- All Implemented Interfaces:
Serializable,ContextProducer.Instance,JavaEEContextUtil.Instance
- Enclosing class:
- JavaEEContextUtilImpl
public class JavaEEContextUtilImpl.InstanceImpl extends Object implements JavaEEContextUtil.Instance
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearInstanceInvocation()remove cached invocation from this instance, in case the underlying app unloaded but component ID remains, just in case the app is reloadedStringgetInstanceComponentId()booleanisEmpty()booleanisLoaded()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.JavaEEContextUtil.ContextpushContext()pushes Java EE invocation context onto the invocation stack use try-with-resources to pop the context no-op if non-running contextJavaEEContextUtil.ContextpushRequestContext()pushes invocation context onto the stack Also creates Request scope use try-with-resources to pop the context no-op if non-running contextJavaEEContextUtil.ContextsetApplicationClassLoader()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
public JavaEEContextUtil.Context pushContext()
Description copied from interface:ContextProducer.Instancepushes Java EE invocation context onto the invocation stack use try-with-resources to pop the context no-op if non-running context- Specified by:
pushContextin interfaceContextProducer.Instance- Specified by:
pushContextin interfaceJavaEEContextUtil.Instance- Returns:
- the new context that was created
-
pushRequestContext
public JavaEEContextUtil.Context pushRequestContext()
Description copied from interface:ContextProducer.Instancepushes invocation context onto the stack Also creates Request scope use try-with-resources to pop the context no-op if non-running context- Specified by:
pushRequestContextin interfaceContextProducer.Instance- Specified by:
pushRequestContextin interfaceJavaEEContextUtil.Instance- Returns:
- new context that was created
-
setApplicationClassLoader
public JavaEEContextUtil.Context setApplicationClassLoader()
Description copied from interface:ContextProducer.Instanceset 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- Specified by:
setApplicationClassLoaderin interfaceContextProducer.Instance- Specified by:
setApplicationClassLoaderin interfaceJavaEEContextUtil.Instance- Returns:
- context so class loader can be reset
-
getInstanceComponentId
public String getInstanceComponentId()
- Specified by:
getInstanceComponentIdin interfaceContextProducer.Instance- Returns:
- component ID for the current instance, or null if empty instance
-
isLoaded
public boolean isLoaded()
Description copied from interface:ContextProducer.InstanceThis 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.- Specified by:
isLoadedin interfaceContextProducer.Instance- Returns:
- true if component is loaded and starting
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceContextProducer.Instance- Returns:
- true if this is an empty context
-
clearInstanceInvocation
public void clearInstanceInvocation()
Description copied from interface:ContextProducer.Instanceremove cached invocation from this instance, in case the underlying app unloaded but component ID remains, just in case the app is reloaded- Specified by:
clearInstanceInvocationin interfaceContextProducer.Instance
-
-