Package org.apache.uima.aae.controller
Class AnalysisEngineControllerAdapter
- java.lang.Object
-
- org.apache.uima.aae.controller.AnalysisEngineControllerAdapter
-
- All Implemented Interfaces:
AnalysisEngineController,ControllerLifecycle
- Direct Known Subclasses:
UimacppServiceController
public abstract class AnalysisEngineControllerAdapter extends java.lang.Object implements AnalysisEngineController
Abstract class meant to provide default implementations for AnalysisEngineController instances.
-
-
Field Summary
-
Fields inherited from interface org.apache.uima.aae.controller.AnalysisEngineController
AEInstanceCount, CasPoolSize
-
-
Constructor Summary
Constructors Constructor Description AnalysisEngineControllerAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAbortedCasReferenceId(java.lang.String casReferenceId)voidaddControllerCallbackListener(ControllerCallbackListener listener)Register one or more listeners through which the controller can send notification of events.voidaddEndpointToDoNotProcessList(java.lang.String anEndpointName)voidaddInputChannel(InputChannel anInputChannel)voidaddServiceInfo(ServiceInfo serviceInfo)voidaddTimeSnapshot(long snapshot, java.lang.String key)voidbeginProcess(int msgType)voidcacheClientEndpoint(Endpoint anEndpoint)voidchangeState(BaseAnalysisEngineController.ServiceState state)voidcollectionProcessComplete(Endpoint anEndpoint)voiddropCAS(java.lang.String casReferenceId, boolean dropCacheEntry)voiddropCAS(org.apache.uima.cas.CAS acas)voiddropStats(java.lang.String casReferenceId, java.lang.String anEndpointName)voidendProcess(int msgType)voidevictExpiredEntries()voidforceTimeoutOnPendingCases(java.lang.String key)longgetAnalysisTime()AsynchAECasManagergetCasManagerWrapper()ServicePerformancegetCasStatistics(java.lang.String casReferenceId)org.apache.uima.UimaContextgetChildUimaContext(java.lang.String delegateEndpointName)EndpointgetClientEndpoint()java.lang.StringgetComponentName()ControllerLatchgetControllerLatch()longgetCpuTime()java.util.Map<java.lang.String,java.lang.String>getDeadClientMap()ErrorHandlerChaingetErrorHandlerChain()EventSubscribergetEventListener()longgetIdleTime()longgetIdleTimeBetweenProcessCalls(int msgType)intgetIndex()InProcessCachegetInProcessCache()InputChannelgetInputChannel()InputChannelgetInputChannel(java.lang.String queueName)java.lang.StringgetJmxContext()java.lang.StringgetJMXDomain()LocalCachegetLocalCache()JmxManagementgetManagementInterface()MonitorgetMonitor()java.lang.StringgetName()OutputChannelgetOutputChannel()AnalysisEngineControllergetParentController()InputChannelgetReplyInputChannel(java.lang.String delegateKey)longgetReplyTime()java.lang.StringgetServiceEndpointName()ServiceErrorsgetServiceErrors()ServiceInfogetServiceInfo()ServicePerformancegetServicePerformance()BaseAnalysisEngineController.ServiceStategetState()java.util.MapgetStats()longgetTime(java.lang.String casReferenceId, java.lang.String anEndpointName)longgetTimeSnapshot(java.lang.String key)UimaTransportgetTransport(java.lang.String key)UimaTransportgetTransport(UimaAsContext context, java.lang.String key)UimaEEAdminContextgetUimaEEAdminContext()UimaMessageListenergetUimaMessageListener(java.lang.String delegateKey)voidhandleDelegateLifeCycleEvent(java.lang.String anEndpoint, int delegateCount)voidincrementDeserializationTime(long cpuTime)voidincrementSerializationTime(long cpuTime)voidinitialize()voidinitializeVMTransport(int parentControllerReplyConsumerCount)booleanisAwaitingCacheCallbackNotification()booleanisCasMultiplier()booleanisEndpointOnDontProcessList(java.lang.String anEndpointName)booleanisPrimitive()booleanisStopped()Returns true if the AnalysisEngineController has been (or is in the process of) shutdown.booleanisTopLevelComponent()voidnotifyListenersWithInitializationStatus(java.lang.Exception e)voidonInitialize()voidprocess(org.apache.uima.cas.CAS cas, java.lang.String casId)voidprocess(org.apache.uima.cas.CAS acas, java.lang.String anInputCasReferenceId, java.lang.String newCasReferenceId, java.lang.String newCASProducedBy)voidprocess(org.apache.uima.cas.CAS acas, java.lang.String casReferenceId, Endpoint anEndpoint)abstract voidquiesceAndStop()voidregisterVmQueueWithJMX(java.lang.Object o, java.lang.String name)voidreleaseNextCas(java.lang.String casReferenceId)voidremoveControllerCallbackListener(ControllerCallbackListener listener)Removes named application listener.voidsaveReplyTime(long snapshot, java.lang.String key)voidsaveTime(long anArrivalTime, java.lang.String casReferenceId, java.lang.String anEndpointName)voidsendMetadata(Endpoint anEndpoint)voidsetCasManager(AsynchAECasManager casManager)voidsetDeployDescriptor(java.lang.String deployDescriptor)voidsetInputChannel(InputChannel anInputChannel)voidsetOutputChannel(OutputChannel anOutputChannel)voidsetStopped()Called to set the state of the AnalysisEngineController to STOPPED.voidsetUimaEEAdminContext(UimaEEAdminContext anAdminContext)voidstop()voidtakeAction(java.lang.String anAction, java.lang.String anEndpointName, ErrorContext anErrorContext)voidterminate()Called to initiate shutdown of the Asynchronous Service.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.uima.aae.controller.AnalysisEngineController
dumpState, getKey
-
-
-
-
Method Detail
-
addAbortedCasReferenceId
public void addAbortedCasReferenceId(java.lang.String casReferenceId)
- Specified by:
addAbortedCasReferenceIdin interfaceAnalysisEngineController
-
addInputChannel
public void addInputChannel(InputChannel anInputChannel) throws java.lang.Exception
- Specified by:
addInputChannelin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
addServiceInfo
public void addServiceInfo(ServiceInfo serviceInfo)
- Specified by:
addServiceInfoin interfaceAnalysisEngineController
-
addTimeSnapshot
public void addTimeSnapshot(long snapshot, java.lang.String key)
-
beginProcess
public void beginProcess(int msgType)
- Specified by:
beginProcessin interfaceAnalysisEngineController
-
cacheClientEndpoint
public void cacheClientEndpoint(Endpoint anEndpoint)
- Specified by:
cacheClientEndpointin interfaceAnalysisEngineController
-
collectionProcessComplete
public void collectionProcessComplete(Endpoint anEndpoint) throws AsynchAEException
- Specified by:
collectionProcessCompletein interfaceAnalysisEngineController- Throws:
AsynchAEException
-
dropCAS
public void dropCAS(java.lang.String casReferenceId, boolean dropCacheEntry)- Specified by:
dropCASin interfaceAnalysisEngineController
-
dropCAS
public void dropCAS(org.apache.uima.cas.CAS acas)
- Specified by:
dropCASin interfaceAnalysisEngineController
-
dropStats
public void dropStats(java.lang.String casReferenceId, java.lang.String anEndpointName)- Specified by:
dropStatsin interfaceAnalysisEngineController
-
endProcess
public void endProcess(int msgType)
- Specified by:
endProcessin interfaceAnalysisEngineController
-
forceTimeoutOnPendingCases
public void forceTimeoutOnPendingCases(java.lang.String key)
- Specified by:
forceTimeoutOnPendingCasesin interfaceAnalysisEngineController
-
getAnalysisTime
public long getAnalysisTime()
- Specified by:
getAnalysisTimein interfaceAnalysisEngineController
-
getCasManagerWrapper
public AsynchAECasManager getCasManagerWrapper()
- Specified by:
getCasManagerWrapperin interfaceAnalysisEngineController
-
getCasStatistics
public ServicePerformance getCasStatistics(java.lang.String casReferenceId)
- Specified by:
getCasStatisticsin interfaceAnalysisEngineController
-
getChildUimaContext
public org.apache.uima.UimaContext getChildUimaContext(java.lang.String delegateEndpointName) throws java.lang.Exception- Specified by:
getChildUimaContextin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
getClientEndpoint
public Endpoint getClientEndpoint()
- Specified by:
getClientEndpointin interfaceAnalysisEngineController
-
getComponentName
public java.lang.String getComponentName()
- Specified by:
getComponentNamein interfaceAnalysisEngineController
-
getDeadClientMap
public java.util.Map<java.lang.String,java.lang.String> getDeadClientMap()
- Specified by:
getDeadClientMapin interfaceAnalysisEngineController
-
getControllerLatch
public ControllerLatch getControllerLatch()
- Specified by:
getControllerLatchin interfaceAnalysisEngineController
-
getCpuTime
public long getCpuTime()
- Specified by:
getCpuTimein interfaceAnalysisEngineController
-
getErrorHandlerChain
public ErrorHandlerChain getErrorHandlerChain()
- Specified by:
getErrorHandlerChainin interfaceAnalysisEngineController
-
getEventListener
public EventSubscriber getEventListener()
- Specified by:
getEventListenerin interfaceAnalysisEngineController
-
getIdleTime
public long getIdleTime()
- Specified by:
getIdleTimein interfaceAnalysisEngineController
-
getIdleTimeBetweenProcessCalls
public long getIdleTimeBetweenProcessCalls(int msgType)
- Specified by:
getIdleTimeBetweenProcessCallsin interfaceAnalysisEngineController
-
getInProcessCache
public InProcessCache getInProcessCache()
- Specified by:
getInProcessCachein interfaceAnalysisEngineController
-
getIndex
public int getIndex()
- Specified by:
getIndexin interfaceAnalysisEngineController
-
getInputChannel
public InputChannel getInputChannel()
- Specified by:
getInputChannelin interfaceAnalysisEngineController
-
getInputChannel
public InputChannel getInputChannel(java.lang.String queueName)
- Specified by:
getInputChannelin interfaceAnalysisEngineController
-
getJMXDomain
public java.lang.String getJMXDomain()
- Specified by:
getJMXDomainin interfaceAnalysisEngineController
-
getJmxContext
public java.lang.String getJmxContext()
- Specified by:
getJmxContextin interfaceAnalysisEngineController
-
getLocalCache
public LocalCache getLocalCache()
- Specified by:
getLocalCachein interfaceAnalysisEngineController
-
getManagementInterface
public JmxManagement getManagementInterface()
- Specified by:
getManagementInterfacein interfaceAnalysisEngineController
-
getMonitor
public Monitor getMonitor()
- Specified by:
getMonitorin interfaceAnalysisEngineController
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceAnalysisEngineController
-
getOutputChannel
public OutputChannel getOutputChannel()
- Specified by:
getOutputChannelin interfaceAnalysisEngineController
-
getParentController
public AnalysisEngineController getParentController()
- Specified by:
getParentControllerin interfaceAnalysisEngineController
-
getReplyInputChannel
public InputChannel getReplyInputChannel(java.lang.String delegateKey)
- Specified by:
getReplyInputChannelin interfaceAnalysisEngineController
-
getReplyTime
public long getReplyTime()
- Specified by:
getReplyTimein interfaceAnalysisEngineController
-
getServiceEndpointName
public java.lang.String getServiceEndpointName()
- Specified by:
getServiceEndpointNamein interfaceAnalysisEngineController
-
getServiceErrors
public ServiceErrors getServiceErrors()
- Specified by:
getServiceErrorsin interfaceAnalysisEngineController
-
getServiceInfo
public ServiceInfo getServiceInfo()
- Specified by:
getServiceInfoin interfaceAnalysisEngineController
-
getServicePerformance
public ServicePerformance getServicePerformance()
- Specified by:
getServicePerformancein interfaceAnalysisEngineController
-
getStats
public java.util.Map getStats()
- Specified by:
getStatsin interfaceAnalysisEngineController
-
getTime
public long getTime(java.lang.String casReferenceId, java.lang.String anEndpointName)- Specified by:
getTimein interfaceAnalysisEngineController
-
getTimeSnapshot
public long getTimeSnapshot(java.lang.String key)
-
getTransport
public UimaTransport getTransport(UimaAsContext context, java.lang.String key) throws java.lang.Exception
- Specified by:
getTransportin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
getTransport
public UimaTransport getTransport(java.lang.String key) throws java.lang.Exception
- Specified by:
getTransportin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
getUimaEEAdminContext
public UimaEEAdminContext getUimaEEAdminContext()
- Specified by:
getUimaEEAdminContextin interfaceAnalysisEngineController
-
getUimaMessageListener
public UimaMessageListener getUimaMessageListener(java.lang.String delegateKey)
- Specified by:
getUimaMessageListenerin interfaceAnalysisEngineController
-
handleDelegateLifeCycleEvent
public void handleDelegateLifeCycleEvent(java.lang.String anEndpoint, int delegateCount)- Specified by:
handleDelegateLifeCycleEventin interfaceAnalysisEngineController
-
incrementDeserializationTime
public void incrementDeserializationTime(long cpuTime)
- Specified by:
incrementDeserializationTimein interfaceAnalysisEngineController
-
incrementSerializationTime
public void incrementSerializationTime(long cpuTime)
- Specified by:
incrementSerializationTimein interfaceAnalysisEngineController
-
initialize
public void initialize() throws AsynchAEException- Specified by:
initializein interfaceAnalysisEngineController- Throws:
AsynchAEException
-
initializeVMTransport
public void initializeVMTransport(int parentControllerReplyConsumerCount) throws java.lang.Exception- Specified by:
initializeVMTransportin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
isAwaitingCacheCallbackNotification
public boolean isAwaitingCacheCallbackNotification()
- Specified by:
isAwaitingCacheCallbackNotificationin interfaceAnalysisEngineController
-
isCasMultiplier
public boolean isCasMultiplier()
- Specified by:
isCasMultiplierin interfaceAnalysisEngineController
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein interfaceAnalysisEngineController
-
isStopped
public boolean isStopped()
Description copied from interface:AnalysisEngineControllerReturns true if the AnalysisEngineController has been (or is in the process of) shutdown.- Specified by:
isStoppedin interfaceAnalysisEngineController- Returns:
- - true if stopped
-
isTopLevelComponent
public boolean isTopLevelComponent()
- Specified by:
isTopLevelComponentin interfaceAnalysisEngineController
-
notifyListenersWithInitializationStatus
public void notifyListenersWithInitializationStatus(java.lang.Exception e)
- Specified by:
notifyListenersWithInitializationStatusin interfaceAnalysisEngineController
-
onInitialize
public void onInitialize()
- Specified by:
onInitializein interfaceAnalysisEngineController
-
process
public void process(org.apache.uima.cas.CAS cas, java.lang.String casId)- Specified by:
processin interfaceAnalysisEngineController
-
process
public void process(org.apache.uima.cas.CAS acas, java.lang.String anInputCasReferenceId, java.lang.String newCasReferenceId, java.lang.String newCASProducedBy)- Specified by:
processin interfaceAnalysisEngineController
-
process
public void process(org.apache.uima.cas.CAS acas, java.lang.String casReferenceId, Endpoint anEndpoint)- Specified by:
processin interfaceAnalysisEngineController
-
quiesceAndStop
public abstract void quiesceAndStop()
- Specified by:
quiesceAndStopin interfaceAnalysisEngineController
-
registerVmQueueWithJMX
public void registerVmQueueWithJMX(java.lang.Object o, java.lang.String name) throws java.lang.Exception- Specified by:
registerVmQueueWithJMXin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
releaseNextCas
public void releaseNextCas(java.lang.String casReferenceId)
- Specified by:
releaseNextCasin interfaceAnalysisEngineController
-
saveReplyTime
public void saveReplyTime(long snapshot, java.lang.String key)- Specified by:
saveReplyTimein interfaceAnalysisEngineController
-
saveTime
public void saveTime(long anArrivalTime, java.lang.String casReferenceId, java.lang.String anEndpointName)- Specified by:
saveTimein interfaceAnalysisEngineController
-
sendMetadata
public void sendMetadata(Endpoint anEndpoint) throws AsynchAEException
- Specified by:
sendMetadatain interfaceAnalysisEngineController- Throws:
AsynchAEException
-
setCasManager
public void setCasManager(AsynchAECasManager casManager)
- Specified by:
setCasManagerin interfaceAnalysisEngineController
-
setDeployDescriptor
public void setDeployDescriptor(java.lang.String deployDescriptor)
- Specified by:
setDeployDescriptorin interfaceAnalysisEngineController
-
setInputChannel
public void setInputChannel(InputChannel anInputChannel) throws java.lang.Exception
- Specified by:
setInputChannelin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
setOutputChannel
public void setOutputChannel(OutputChannel anOutputChannel) throws java.lang.Exception
- Specified by:
setOutputChannelin interfaceAnalysisEngineController- Throws:
java.lang.Exception
-
setStopped
public void setStopped()
Description copied from interface:AnalysisEngineControllerCalled to set the state of the AnalysisEngineController to STOPPED. This method does not stop input or output channels.- Specified by:
setStoppedin interfaceAnalysisEngineController
-
setUimaEEAdminContext
public void setUimaEEAdminContext(UimaEEAdminContext anAdminContext)
- Specified by:
setUimaEEAdminContextin interfaceAnalysisEngineController
-
stop
public void stop()
- Specified by:
stopin interfaceAnalysisEngineController
-
takeAction
public void takeAction(java.lang.String anAction, java.lang.String anEndpointName, ErrorContext anErrorContext)- Specified by:
takeActionin interfaceAnalysisEngineController
-
addControllerCallbackListener
public void addControllerCallbackListener(ControllerCallbackListener listener)
Description copied from interface:ControllerLifecycleRegister one or more listeners through which the controller can send notification of events.- Specified by:
addControllerCallbackListenerin interfaceControllerLifecycle- Parameters:
listener- - application listener object to register
-
removeControllerCallbackListener
public void removeControllerCallbackListener(ControllerCallbackListener listener)
Description copied from interface:ControllerLifecycleRemoves named application listener.- Specified by:
removeControllerCallbackListenerin interfaceControllerLifecycle- Parameters:
listener- - application listener to remove
-
terminate
public void terminate()
Description copied from interface:ControllerLifecycleCalled to initiate shutdown of the Asynchronous Service. An implementation can close an input and output channels and do any necessary cleanup before terminating.- Specified by:
terminatein interfaceControllerLifecycle
-
addEndpointToDoNotProcessList
public void addEndpointToDoNotProcessList(java.lang.String anEndpointName)
-
isEndpointOnDontProcessList
public boolean isEndpointOnDontProcessList(java.lang.String anEndpointName)
-
evictExpiredEntries
public void evictExpiredEntries()
-
changeState
public void changeState(BaseAnalysisEngineController.ServiceState state)
- Specified by:
changeStatein interfaceAnalysisEngineController
-
getState
public BaseAnalysisEngineController.ServiceState getState()
- Specified by:
getStatein interfaceAnalysisEngineController
-
-