|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.aae.delegate.Delegate
public abstract class Delegate
Nested Class Summary | |
---|---|
static class |
Delegate.DelegateEntry
Entry in the list of CASes pending reply. |
Field Summary | |
---|---|
protected java.lang.String |
delegateKey
|
static int |
DISABLED_STATE
|
static int |
OK_STATE
|
static int |
TIMEOUT_STATE
|
Constructor Summary | |
---|---|
Delegate()
|
Method Summary | |
---|---|
void |
addCasToOutstandingList(java.lang.String aCasReferenceId)
Adds a given Cas ID to the list of CASes pending reply. |
int |
addCasToPendingDispatchList(java.lang.String aCasReferenceId)
Adds given CAS ID to the list of CASes pending dispatch. |
void |
addNewCasToOutstandingList(java.lang.String aCasReferenceId)
|
void |
addNewCasToOutstandingList(java.lang.String aCasReferenceId,
boolean isCasGeneratingChildren)
|
void |
cancelDelegateTimer()
Cancels current timer |
void |
cleanup()
Cancels timer and clears a list of CASes pending reply |
int |
getCasPendingDispatchListSize()
|
int |
getCasPendingReplyListSize()
|
long |
getCasProcessTimeout()
|
abstract java.lang.String |
getComponentName()
|
long |
getCpcTimeout()
|
java.util.List<Delegate.DelegateEntry> |
getDelegateCasesPendingDispatch()
|
java.util.List<Delegate.DelegateEntry> |
getDelegateCasesPendingReply()
|
Endpoint |
getEndpoint()
Returns an Endpoint object |
long |
getGetMetaTimeout()
|
java.lang.String |
getKey()
Returns delegate key |
Endpoint |
getNotificationEndpoint()
|
java.lang.String |
getOldestCasIdFromOutstandingList()
|
int |
getState()
|
abstract void |
handleError(java.lang.Exception e,
ErrorContext errorContext)
|
boolean |
hasConcurrentConsumersOnReplyQueue()
|
void |
incrementRetryCount(java.lang.String aCasReferenceId)
Increments retry count |
boolean |
isAwaitingPingReply()
|
boolean |
isGeneratingChildrenFrom(java.lang.String aCasReferenceId)
|
boolean |
removeCasFromOutstandingList(java.lang.String aCasReferenceId)
Removes Delegate.DelegateEntry from the list of CASes pending reply. |
boolean |
removeCasFromPendingDispatchList(java.lang.String aCasReferenceId)
Removes an entry from the list of CASes pending dispatch that matches a given CAS Id.A CAS is delayed and placed on this list when the delegate status changes to TIMED_OUT and a PING message is sent to test delegate availability. |
java.lang.String |
removeOldestCasFromOutstandingList()
Removes Delegate.DelegateEntry from the list of CASes pending reply. |
java.lang.String |
removeOldestFromPendingDispatchList()
Removes the oldest entry from the list of CASes pending dispatch. |
void |
resetAwaitingPingReply()
|
void |
restartTimerForOldestCasInOutstandingList()
Forces Timer restart for the oldest CAS sitting in the list of CASes pending reply. |
void |
setAwaitingPingReply()
|
void |
setCasProcessTimeout(long casProcessTimeout)
|
void |
setConcurrentConsumersOnReplyQueue()
|
void |
setCpcTimeout(long cpcTimeout)
|
void |
setEndpoint(Endpoint anEndpoint)
Sets an Endpoint object |
void |
setGeneratingChildrenFrom(java.lang.String aCasReferenceId,
boolean tOf)
|
void |
setGetMetaTimeout(long getMetaTimeout)
|
void |
setNotificationEndpoint(Endpoint notificationEndpoint)
|
void |
setState(int aState)
|
void |
startGetMetaRequestTimer()
Starts GetMeta Request timer |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int OK_STATE
public static final int TIMEOUT_STATE
public static final int DISABLED_STATE
protected java.lang.String delegateKey
Constructor Detail |
---|
public Delegate()
Method Detail |
---|
public Endpoint getNotificationEndpoint()
public void setNotificationEndpoint(Endpoint notificationEndpoint)
public boolean isAwaitingPingReply()
public void setAwaitingPingReply()
public void resetAwaitingPingReply()
public java.lang.String getKey()
public void setEndpoint(Endpoint anEndpoint)
Endpoint
object
anEndpoint
- - an endpoint objectpublic Endpoint getEndpoint()
Endpoint
object
public void restartTimerForOldestCasInOutstandingList()
public java.util.List<Delegate.DelegateEntry> getDelegateCasesPendingReply()
public java.util.List<Delegate.DelegateEntry> getDelegateCasesPendingDispatch()
public void addNewCasToOutstandingList(java.lang.String aCasReferenceId)
public void addNewCasToOutstandingList(java.lang.String aCasReferenceId, boolean isCasGeneratingChildren)
public void addCasToOutstandingList(java.lang.String aCasReferenceId)
aCasReferenceId
- - CAS ID to add to pending list if not already therepublic int addCasToPendingDispatchList(java.lang.String aCasReferenceId)
aCasReferenceId
- - CAS ID to add to the delayed listpublic void incrementRetryCount(java.lang.String aCasReferenceId)
aCasReferenceId
- public java.lang.String removeOldestFromPendingDispatchList()
public boolean removeCasFromPendingDispatchList(java.lang.String aCasReferenceId)
public boolean removeCasFromOutstandingList(java.lang.String aCasReferenceId)
Delegate.DelegateEntry
from the list of CASes pending reply. The entry is removed when
either: 1) reply is received from the delegate before the timeout 2) the timeout occurs with no
retry 3) an error occurs and the CAS is dropped as part of Error Handling
aCasReferenceId
- - id of the CAS to remove from the listpublic java.lang.String removeOldestCasFromOutstandingList()
Delegate.DelegateEntry
from the list of CASes pending reply. The entry is removed when
either: 1) reply is received from the delegate before the timeout 2) the timeout occurs with no
retry 3) an error occurs and the CAS is dropped as part of Error Handling
aCasReferenceId
- - id of the CAS to remove from the listpublic java.lang.String getOldestCasIdFromOutstandingList()
public void cleanup()
public int getCasPendingReplyListSize()
public int getCasPendingDispatchListSize()
public void cancelDelegateTimer()
public void startGetMetaRequestTimer()
public long getCasProcessTimeout()
public void setCasProcessTimeout(long casProcessTimeout)
public long getGetMetaTimeout()
public void setGetMetaTimeout(long getMetaTimeout)
public long getCpcTimeout()
public void setCpcTimeout(long cpcTimeout)
public int getState()
public void setState(int aState)
public void setConcurrentConsumersOnReplyQueue()
public boolean hasConcurrentConsumersOnReplyQueue()
public boolean isGeneratingChildrenFrom(java.lang.String aCasReferenceId)
public void setGeneratingChildrenFrom(java.lang.String aCasReferenceId, boolean tOf)
public abstract void handleError(java.lang.Exception e, ErrorContext errorContext)
public abstract java.lang.String getComponentName()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |