org.glassfish.api.invocation
Interface InvocationManager

All Known Implementing Classes:
InvocationManagerImpl

@Contract
public interface InvocationManager

InvocationManager provides interface to keep track of component context on a per-thread basis


Method Summary
 java.util.List<? extends ComponentInvocation> getAllInvocations()
           
<T extends ComponentInvocation>
T
getCurrentInvocation()
          Returns the current Invocation object associated with the current thread
<T extends ComponentInvocation>
T
getPreviousInvocation()
          Returns the previous Invocation object associated with the current thread.
 boolean isInvocationStackEmpty()
          return true iff no invocations on the stack for this thread
<T extends ComponentInvocation>
void
postInvoke(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>
void
preInvoke(T inv)
          To be called by a Container to indicate that the Container is about to invoke a method on a component.
 void registerComponentInvocationHandler(ComponentInvocation.ComponentInvocationType type, RegisteredComponentInvocationHandler handler)
           
 

Method Detail

preInvoke

<T extends ComponentInvocation> void preInvoke(T inv)
               throws InvocationException
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.

Parameters:
inv - the Invocation object
Throws:
InvocationException

postInvoke

<T extends ComponentInvocation> void postInvoke(T inv)
                throws InvocationException
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.

Parameters:
inv - the Invocation object
Throws:
InvocationException

getCurrentInvocation

<T extends ComponentInvocation> T getCurrentInvocation()
Returns the current Invocation object associated with the current thread


getPreviousInvocation

<T extends ComponentInvocation> T getPreviousInvocation()
                                                    throws InvocationException
Returns the previous Invocation object associated with the current thread. Returns null if there is none. This is typically used when a component A calls another component B within the same VM. In this case, it might be necessary to obtain information related to both component A using getPreviousInvocation() and B using getCurrentInvocation()

Throws:
InvocationException

isInvocationStackEmpty

boolean isInvocationStackEmpty()
return true iff no invocations on the stack for this thread


getAllInvocations

java.util.List<? extends ComponentInvocation> getAllInvocations()

registerComponentInvocationHandler

void registerComponentInvocationHandler(ComponentInvocation.ComponentInvocationType type,
                                        RegisteredComponentInvocationHandler handler)


Copyright © 2012 GlassFish Community. All Rights Reserved.