|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AspectProcessContext<I,U,N extends I,A extends I,S,T,X>
The context associated with a particular BusinessWorks process instance (i.e job). An advice instance can use this context to get access to job specific information.
This class is not thread safe. Asynchronous advice implementations should not access objects of this class on parallel threads.
AspectProcessContextListener
Method Summary | |
---|---|
void |
addListener(AspectProcessContextListener listener)
Adds a listener to the AspectProcessContext. |
AdviceContext<I,U,N,A,S,T,X> |
getCurrentRunningAdviceContext()
Returns the advice context of the advice instance that is currently being executed in this process instance. |
long |
getHibernateDelay()
Returns the maxdelay specified while calling setHibernateJobEnabled() |
java.lang.String |
getInvocationPath()
Returns the Invocation path for advice being executed. |
long |
getProcessInstanceID()
Returns the job's ID, which is unique in the context of the engine. |
java.io.Serializable |
getProcessObject(java.lang.String key)
Retrieves the object identified by the key |
boolean |
isHibernateJobEnabled()
Called to check if an advice has called for the job to be hibernated. |
boolean |
removeListener(AspectProcessContextListener listener)
Removes the listener from the AspectProcessContext. |
java.io.Serializable |
removeProcessObject(java.lang.String key)
Removes the object identified by the key from storage |
void |
setHibernateJobEnabled(long timedelay)
An advice implementation that hibernates jobs calls this method to trigger the hibernation of a particular job. |
void |
storeProcessObject(java.lang.String key,
java.io.Serializable obj)
Stores an object, by key, so that object will be available elsewhere in the process |
Method Detail |
---|
long getProcessInstanceID()
void setHibernateJobEnabled(long timedelay)
The job may not get hibernated right away. The engine must finish executing all advices that are part of the
same join point before initiating the hibernate procedure. Even after that, the job may still not get hibernated right away.
The advice that triggers the hibernation may choose to delay it, in order to give the chance to any asynchronous
advice or any asynchronous activity that might exist in the job on parallel tracks to finish executing. To accomplish that,
the advice implementation must call this method by passing a timedelay
greater than 0. A 0 timedelay
ensures that the hibernation is initiated right after the engine finishes executing all advices that are running in that particular
join point.
timedelay
- the time, in millisecond, to wait once all advices in the join point are executed, before the job is hibernatedboolean isHibernateJobEnabled()
void storeProcessObject(java.lang.String key, java.io.Serializable obj)
XML Documents can be stored by using XmlDocumentWrapper
objects.
key
- unique id for the objectobj
- the object to storeXmlDocumentWrapper
java.io.Serializable getProcessObject(java.lang.String key)
key
- unique id for the object
null
if no such object existsjava.io.Serializable removeProcessObject(java.lang.String key)
key
- unique if of the object to be removed
null
if no such object existed, and therefore, was not removedvoid addListener(AspectProcessContextListener listener)
listener
- the listener to addboolean removeListener(AspectProcessContextListener listener)
listener
- the listener to be removed
long getHibernateDelay()
setHibernateJobEnabled()
setHibernateJobEnabled()
AdviceContext<I,U,N,A,S,T,X> getCurrentRunningAdviceContext()
This method must be used to get the advice context by all advices that don't have the ADVICE scope.
java.lang.String getInvocationPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |