|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.collection.correlation.BaseApplicationImpl
This is the base application implementation with the basic correlator management funcitons in place.
| Field Summary | |
|---|---|
protected IContextHandler |
handler
|
| Constructor Summary | |
|---|---|
BaseApplicationImpl()
|
|
| Method Summary | |
|---|---|
protected CorrelatorAssociation |
createCorrelatorAssociation()
Creates a correlator association either by drawing an existing instance from the association pool, or by instantiating a new instance. |
ICorrelatorData |
createCorrelatorData()
Creates an initialized copy of ICorrelatorData. |
protected CorrelatorStack |
createCorrelatorStack(java.util.Comparator key)
Creates a new stack for this key, and adds it to the existing collection of correlator stacks. |
void |
deregisterHandler()
Deregisters any current event handler. |
protected void |
destroyCorrelatorStack(java.util.Comparator key)
Removes the stack for this key from the collection of correlator stacks. |
protected CorrelatorStack |
findCorrelatorStack(java.util.Comparator key)
Tries to locate the correlator stack for this key. |
ICorrelatorData |
getActiveCorrelatorByKey(java.util.Comparator key)
Returns the most recent correlator for this key in this application. |
CorrelatorAssociation |
handleCall(java.util.Comparator key)
Is exactly the same as handleCall(key, null). |
CorrelatorAssociation |
handleCall(java.util.Comparator key,
ICorrelatorData parent)
Creates and handles the call context by forwarding the current active correlator data for the key to the destination of a remote invocation. |
CorrelatorAssociation |
handleReturn(java.util.Comparator key,
ICorrelatorData parent)
Is exactly the same as handleReturn(key, parent, null). |
CorrelatorAssociation |
handleReturn(java.util.Comparator key,
ICorrelatorData parent,
ICorrelatorData child)
Creates and handles the return context by receiving the current active correlator data for the key from the destination of a remote invocation. |
protected long |
incrementCounter()
Increments and returns the application counter, which can be used to determine the total ordering of events on a single instance of this application cross multiple threads. |
void |
initialize()
Initializes this application so that it is ready to be (re-)used. |
abstract BaseCorrelatorDataImpl |
instantiateCorrelator()
Instantiates a new instance of the correlator. |
CorrelatorAssociation |
popChild(java.util.Comparator key)
Creates and handles the pop-child context by popping the child correlator off the correlator stack for the key. |
CorrelatorAssociation |
popParent(java.util.Comparator key)
Is exactly the same as popParent(key, null). |
CorrelatorAssociation |
popParent(java.util.Comparator key,
ICorrelatorData parent)
Creates and handles the pop-parent context by popping the parent correlator off the correlator stack for the key. |
CorrelatorAssociation |
pushChild(java.util.Comparator key,
ICorrelatorData child)
Creates and handles the push-child context by pushing the child correlator onto the correlator stack for the key. |
CorrelatorAssociation |
pushParent(java.util.Comparator key,
ICorrelatorData parent)
Is exactly the same as pushParent(key, parent, null). |
CorrelatorAssociation |
pushParent(java.util.Comparator key,
ICorrelatorData parent,
ICorrelatorData child)
Creates and handles the push-parent context by pushing the parent correlator onto the correlator stack for the key. |
void |
registerHandler(IContextHandler handler)
Registers a context event handler with the application, so that all later events are handled through this handler. |
void |
releaseAssociation(CorrelatorAssociation association)
Releases an application-specific correlator association for later re-use. |
void |
returnCorrelatorData(ICorrelatorData correlator)
Returns a correlator to the pool for later reuse. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.hyades.collection.correlation.IApplication |
|---|
getId, getVersion |
| Field Detail |
protected IContextHandler handler
| Constructor Detail |
public BaseApplicationImpl()
| Method Detail |
public abstract BaseCorrelatorDataImpl instantiateCorrelator()
public void initialize()
IApplication
initialize in interface IApplicationIApplication.initialize()public ICorrelatorData createCorrelatorData()
IApplicationICorrelatorData.
createCorrelatorData in interface IApplicationIApplication.createCorrelatorData()public void returnCorrelatorData(ICorrelatorData correlator)
correlator - the correlator to be returnedprotected CorrelatorAssociation createCorrelatorAssociation()
public CorrelatorAssociation handleCall(java.util.Comparator key,
ICorrelatorData parent)
IApplicationIApplication.handleReturn(Comparator, ICorrelatorData).
The context handler should be IContextHandler.handleSend(CorrelatorAssociation). This API
is created in attempt to pass more information to the engine so that a richer set of contexts can be
handled.
handleCall in interface IApplicationkey - the key to the context to be createdparent - the parent of the context representing the local context
IApplication.handleCall(Comparator, ICorrelatorData)public CorrelatorAssociation handleCall(java.util.Comparator key)
IApplicationhandleCall(key, null).
handleCall in interface IApplicationkey - the key to the context to be created
IApplication.handleCall(Comparator)
public CorrelatorAssociation handleReturn(java.util.Comparator key,
ICorrelatorData parent,
ICorrelatorData child)
IApplication#handleCall(Comparator, ICorrelator).
The context handler should be IContextHandler.handleReturn(CorrelatorAssociation). This API
is created in attempt to pass more information to the engine so that a richer set of contexts can be
handled.
handleReturn in interface IApplicationkey - the key to the context to be createdparent - the updated correlator data for the parent from the destinationchild - the correlator data for the child
IApplication.handleReturn(Comparator, ICorrelatorData, ICorrelatorData)
public CorrelatorAssociation handleReturn(java.util.Comparator key,
ICorrelatorData parent)
IApplicationhandleReturn(key, parent, null).
handleReturn in interface IApplicationkey - the key to the context to be createdparent - the updated correlator data for the parent from the destination
IApplication.handleReturn(Comparator, ICorrelatorData)
public CorrelatorAssociation pushChild(java.util.Comparator key,
ICorrelatorData child)
IApplicationIApplication.popChild(Comparator). The context handler is
IContextHandler.handleEntry(CorrelatorAssociation).
pushChild in interface IApplicationkey - the key to the context stackchild - the correlator data for the child
IApplication.pushChild(Comparator, ICorrelatorData)public CorrelatorAssociation popChild(java.util.Comparator key)
IApplicationIApplication.pushChild(Comparator, ICorrelatorData). The context handler is
IContextHandler.handleExit(CorrelatorAssociation).
popChild in interface IApplicationkey - the key to the context stack
IApplication.popChild(Comparator)
public CorrelatorAssociation pushParent(java.util.Comparator key,
ICorrelatorData parent,
ICorrelatorData child)
IApplicationIApplication.popParent(Comparator). The context handler is
IContextHandler.handleReceive(CorrelatorAssociation). This API is created in attempt to pass
more information to the engine so that a richer set of contexts can be handled.
pushParent in interface IApplicationkey - the key to the context stackparent - the correlator data for the parentchild - the correlator data for the child
IApplication.pushParent(Comparator, ICorrelatorData, ICorrelatorData)
public CorrelatorAssociation pushParent(java.util.Comparator key,
ICorrelatorData parent)
IApplicationpushParent(key, parent, null).
pushParent in interface IApplicationkey - the key to the context stackparent - the correlator data for the parent
IApplication.pushParent(Comparator, ICorrelatorData)
public CorrelatorAssociation popParent(java.util.Comparator key,
ICorrelatorData parent)
IApplicationIApplication.pushParent(Comparator, ICorrelatorData). The context handler is
IContextHandler.handleReply(CorrelatorAssociation). This API is created in attempt to pass
more information to the engine so that a richer set of contexts can be handled.
popParent in interface IApplicationkey - the key to the context stackparent - the correlator data for the parent
IApplication.popParent(Comparator, ICorrelatorData)public CorrelatorAssociation popParent(java.util.Comparator key)
IApplicationpopParent(key, null).
popParent in interface IApplicationkey - the key to the context stack
IApplication.popParent(Comparator)protected long incrementCounter()
public ICorrelatorData getActiveCorrelatorByKey(java.util.Comparator key)
IApplicationnull pointer will be returned.
getActiveCorrelatorByKey in interface IApplicationkey - the key for which the most recent correlator data in this application is to be located
null
if no such data exists.IApplication.getActiveCorrelatorByKey(Comparator)protected CorrelatorStack createCorrelatorStack(java.util.Comparator key)
protected void destroyCorrelatorStack(java.util.Comparator key)
protected CorrelatorStack findCorrelatorStack(java.util.Comparator key)
key - the key for the target correlator stack
null if none is found.public void releaseAssociation(CorrelatorAssociation association)
IApplication
releaseAssociation in interface IApplicationassociation - a valid application-specific contextIApplication.releaseAssociation(CorrelatorAssociation)public void registerHandler(IContextHandler handler)
handler - a context event handlerpublic void deregisterHandler()
|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||