@Service @Singleton public class InvocationManagerImpl extends Object implements InvocationManager
Constructor and Description |
---|
InvocationManagerImpl() |
Modifier and Type | Method and Description |
---|---|
List<? extends ComponentInvocation> |
getAllInvocations() |
<T extends ComponentInvocation> |
getCurrentInvocation()
return the Invocation object of the component being called
|
<T extends ComponentInvocation> |
getPreviousInvocation()
return the Invocation object of the caller
return null if none exist (e.g.
|
boolean |
isInvocationStackEmpty()
return true iff no invocations on the stack for this thread
|
ApplicationEnvironment |
peekAppEnvironment()
Gets the current application environment on the current thread
|
Method |
peekWebServiceMethod() |
List<? extends ComponentInvocation> |
popAllInvocations()
Useful to temp clear the invocation list for example when spawning a new Thread
to prevent potential classloader leaks.
|
void |
popAppEnvironment()
To be called by the infrastructure to indicate that some user code not associated with any Java EE specification is
finished being called.
|
void |
popWebServiceMethod() |
<T extends ComponentInvocation> |
postInvoke(T invocation)
To be called by a Container to indicate that the Container has just completed the invocation of a method on a
component.
|
<T extends ComponentInvocation> |
preInvoke(T invocation)
To be called by a Container to indicate that the Container is about to invoke a method on a component.
|
void |
pushAppEnvironment(ApplicationEnvironment env)
To be called by the infrastructure to indicate that some user code not associated with any Java EE specification may
be called.
|
void |
pushWebServiceMethod(Method method) |
void |
putAllInvocations(List<? extends ComponentInvocation> invocations)
Useful to temp clear the invocation list for example when spawning a new Thread
to prevent potential classloader leaks.
|
void |
registerComponentInvocationHandler(ComponentInvocation.ComponentInvocationType type,
RegisteredComponentInvocationHandler handler) |
void |
setThreadInheritableInvocation(List<? extends ComponentInvocation> parentValue)
Installs the given invocation as thread local in the same way as would be done automatically at
thread creation time.
|
public void setThreadInheritableInvocation(List<? extends ComponentInvocation> parentValue)
InvocationManager
setThreadInheritableInvocation
in interface InvocationManager
parentValue
- the invocation stack from the parent threadpublic <T extends ComponentInvocation> void preInvoke(T invocation) throws InvocationException
InvocationManager
preInvoke
in interface InvocationManager
invocation
- the Invocation objectInvocationException
public <T extends ComponentInvocation> void postInvoke(T invocation) throws InvocationException
InvocationManager
postInvoke
in interface InvocationManager
invocation
- the Invocation objectInvocationException
public boolean isInvocationStackEmpty()
isInvocationStackEmpty
in interface InvocationManager
public <T extends ComponentInvocation> T getCurrentInvocation()
getCurrentInvocation
in interface InvocationManager
T
- public <T extends ComponentInvocation> T getPreviousInvocation() throws InvocationException
getPreviousInvocation
in interface InvocationManager
T
- InvocationException
public List<? extends ComponentInvocation> getAllInvocations()
getAllInvocations
in interface InvocationManager
public List<? extends ComponentInvocation> popAllInvocations()
InvocationManager
popAllInvocations
in interface InvocationManager
public void putAllInvocations(List<? extends ComponentInvocation> invocations)
InvocationManager
putAllInvocations
in interface InvocationManager
public void registerComponentInvocationHandler(ComponentInvocation.ComponentInvocationType type, RegisteredComponentInvocationHandler handler)
registerComponentInvocationHandler
in interface InvocationManager
public void pushAppEnvironment(ApplicationEnvironment env)
InvocationManager
The pushAppEnvironment and popAppEnvironment must be called in pairs and well-nested.
pushAppEnvironment
in interface InvocationManager
env
- may not be null. Information about the application environmentpublic ApplicationEnvironment peekAppEnvironment()
InvocationManager
peekAppEnvironment
in interface InvocationManager
public void popAppEnvironment()
InvocationManager
The pushAppEnvironment and popAppEnvironment must be called in pairs and well-nested.
popAppEnvironment
in interface InvocationManager
public void pushWebServiceMethod(Method method)
pushWebServiceMethod
in interface InvocationManager
public Method peekWebServiceMethod()
peekWebServiceMethod
in interface InvocationManager
public void popWebServiceMethod()
popWebServiceMethod
in interface InvocationManager
Copyright © 2019. All rights reserved.