Package org.glassfish.api.invocation
Class InvocationManagerImpl
- java.lang.Object
-
- org.glassfish.api.invocation.InvocationManagerImpl
-
- All Implemented Interfaces:
InvocationManager
@Service @Singleton public class InvocationManagerImpl extends Object implements InvocationManager
-
-
Constructor Summary
Constructors Constructor Description InvocationManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List
getAllInvocations()
<T extends ComponentInvocation>
TgetCurrentInvocation()
return the Invocation object of the component being called<T extends ComponentInvocation>
TgetPreviousInvocation()
return the Inovcation object of the caller return null if none exist (e.g.boolean
isInvocationStackEmpty()
return true iff no invocations on the stack for this threadApplicationEnvironment
peekAppEnvironment()
Gets the current application environment on the current threadvoid
popAppEnvironment()
To be called by the infrastructure to indicate that some user code not associated with any Java EE specification is finished being called.<T extends ComponentInvocation>
voidpostInvoke(T inv)
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>
voidpreInvoke(T inv)
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
registerComponentInvocationHandler(ComponentInvocation.ComponentInvocationType type, RegisteredComponentInvocationHandler handler)
-
-
-
Method Detail
-
preInvoke
public <T extends ComponentInvocation> void preInvoke(T inv) throws InvocationException
Description copied from interface:InvocationManager
To be called by a Container to indicate that the Container is about to invoke a method on a component. The preInvoke and postInvoke must be called in pairs and well-nested.- Specified by:
preInvoke
in interfaceInvocationManager
- Parameters:
inv
- the Invocation object- Throws:
InvocationException
-
postInvoke
public <T extends ComponentInvocation> void postInvoke(T inv) throws InvocationException
Description copied from interface:InvocationManager
To be called by a Container to indicate that the Container has just completed the invocation of a method on a component. The preInvoke and postInvoke must be called in pairs and well-nested.- Specified by:
postInvoke
in interfaceInvocationManager
- Parameters:
inv
- the Invocation object- Throws:
InvocationException
-
isInvocationStackEmpty
public boolean isInvocationStackEmpty()
return true iff no invocations on the stack for this thread- Specified by:
isInvocationStackEmpty
in interfaceInvocationManager
-
getCurrentInvocation
public <T extends ComponentInvocation> T getCurrentInvocation()
return the Invocation object of the component being called- Specified by:
getCurrentInvocation
in interfaceInvocationManager
-
getPreviousInvocation
public <T extends ComponentInvocation> T getPreviousInvocation() throws InvocationException
return the Inovcation object of the caller return null if none exist (e.g. caller is from another VM)- Specified by:
getPreviousInvocation
in interfaceInvocationManager
- Throws:
InvocationException
-
getAllInvocations
public List getAllInvocations()
- Specified by:
getAllInvocations
in interfaceInvocationManager
-
registerComponentInvocationHandler
public void registerComponentInvocationHandler(ComponentInvocation.ComponentInvocationType type, RegisteredComponentInvocationHandler handler)
- Specified by:
registerComponentInvocationHandler
in interfaceInvocationManager
-
pushAppEnvironment
public void pushAppEnvironment(ApplicationEnvironment env)
Description copied from interface:InvocationManager
To be called by the infrastructure to indicate that some user code not associated with any Java EE specification may be called. In particular must be called by the Weld integration layer to indicate the application environment in which the portable extensions are runningThe pushAppEnvironment and popAppEnvironment must be called in pairs and well-nested.
- Specified by:
pushAppEnvironment
in interfaceInvocationManager
- Parameters:
env
- may not be null. Information about the application environment
-
peekAppEnvironment
public ApplicationEnvironment peekAppEnvironment()
Description copied from interface:InvocationManager
Gets the current application environment on the current thread- Specified by:
peekAppEnvironment
in interfaceInvocationManager
- Returns:
- The current ApplicationEnvironment, or null if there is none
-
popAppEnvironment
public void popAppEnvironment()
Description copied from interface:InvocationManager
To be called by the infrastructure to indicate that some user code not associated with any Java EE specification is finished being called. In particular must be called by the Weld integration layer to indicate the application environment in which the portable extensions are runningThe pushAppEnvironment and popAppEnvironment must be called in pairs and well-nested.
- Specified by:
popAppEnvironment
in interfaceInvocationManager
-
-