org.apache.uima.aae.controller
Class AnalysisEngineControllerAdapter

java.lang.Object
  extended by 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
AnalysisEngineControllerAdapter()
           
 
Method Summary
 void addAbortedCasReferenceId(java.lang.String casReferenceId)
           
 void addControllerCallbackListener(ControllerCallbackListener listener)
          Register one or more listeners through which the controller can send notification of events.
 void addEndpointToDoNotProcessList(java.lang.String anEndpointName)
           
 void addInputChannel(InputChannel anInputChannel)
           
 void addServiceInfo(ServiceInfo serviceInfo)
           
 void addTimeSnapshot(long snapshot, java.lang.String key)
           
 void beginProcess(int msgType)
           
 void cacheClientEndpoint(Endpoint anEndpoint)
           
 void changeState(BaseAnalysisEngineController.ServiceState state)
           
 void collectionProcessComplete(Endpoint anEndpoint)
           
 void dropCAS(org.apache.uima.cas.CAS acas)
           
 void dropCAS(java.lang.String casReferenceId, boolean dropCacheEntry)
           
 void dropStats(java.lang.String casReferenceId, java.lang.String anEndpointName)
           
 void endProcess(int msgType)
           
 void evictExpiredEntries()
           
 void forceTimeoutOnPendingCases(java.lang.String key)
           
 long getAnalysisTime()
           
 AsynchAECasManager getCasManagerWrapper()
           
 ServicePerformance getCasStatistics(java.lang.String casReferenceId)
           
 org.apache.uima.UimaContext getChildUimaContext(java.lang.String delegateEndpointName)
           
 Endpoint getClientEndpoint()
           
 java.lang.String getComponentName()
           
 ControllerLatch getControllerLatch()
           
 long getCpuTime()
           
 java.util.Map<java.lang.String,java.lang.String> getDeadClientMap()
           
 ErrorHandlerChain getErrorHandlerChain()
           
 EventSubscriber getEventListener()
           
 long getIdleTime()
           
 long getIdleTimeBetweenProcessCalls(int msgType)
           
 int getIndex()
           
 InProcessCache getInProcessCache()
           
 InputChannel getInputChannel()
           
 InputChannel getInputChannel(java.lang.String queueName)
           
 java.lang.String getJmxContext()
           
 java.lang.String getJMXDomain()
           
 LocalCache getLocalCache()
           
 JmxManagement getManagementInterface()
           
 Monitor getMonitor()
           
 java.lang.String getName()
           
 OutputChannel getOutputChannel()
           
 AnalysisEngineController getParentController()
           
 InputChannel getReplyInputChannel(java.lang.String delegateKey)
           
 long getReplyTime()
           
 java.lang.String getServiceEndpointName()
           
 ServiceErrors getServiceErrors()
           
 ServiceInfo getServiceInfo()
           
 ServicePerformance getServicePerformance()
           
 BaseAnalysisEngineController.ServiceState getState()
           
 java.util.Map getStats()
           
 long getTime(java.lang.String casReferenceId, java.lang.String anEndpointName)
           
 long getTimeSnapshot(java.lang.String key)
           
 UimaTransport getTransport(java.lang.String key)
           
 UimaTransport getTransport(UimaAsContext context, java.lang.String key)
           
 UimaEEAdminContext getUimaEEAdminContext()
           
 UimaMessageListener getUimaMessageListener(java.lang.String delegateKey)
           
 void handleDelegateLifeCycleEvent(java.lang.String anEndpoint, int delegateCount)
           
 void incrementDeserializationTime(long cpuTime)
           
 void incrementSerializationTime(long cpuTime)
           
 void initialize()
           
 void initializeVMTransport(int parentControllerReplyConsumerCount)
           
 boolean isAwaitingCacheCallbackNotification()
           
 boolean isCasMultiplier()
           
 boolean isEndpointOnDontProcessList(java.lang.String anEndpointName)
           
 boolean isPrimitive()
           
 boolean isStopped()
          Returns true if the AnalysisEngineController has been (or is in the process of) shutdown.
 boolean isTopLevelComponent()
           
 void notifyListenersWithInitializationStatus(java.lang.Exception e)
           
 void onInitialize()
           
 void process(org.apache.uima.cas.CAS cas, java.lang.String casId)
           
 void process(org.apache.uima.cas.CAS acas, java.lang.String casReferenceId, Endpoint anEndpoint)
           
 void process(org.apache.uima.cas.CAS acas, java.lang.String anInputCasReferenceId, java.lang.String newCasReferenceId, java.lang.String newCASProducedBy)
           
abstract  void quiesceAndStop()
           
 void registerVmQueueWithJMX(java.lang.Object o, java.lang.String name)
           
 void releaseNextCas(java.lang.String casReferenceId)
           
 void removeControllerCallbackListener(ControllerCallbackListener listener)
          Removes named application listener.
 void saveReplyTime(long snapshot, java.lang.String key)
           
 void saveTime(long anArrivalTime, java.lang.String casReferenceId, java.lang.String anEndpointName)
           
 void sendMetadata(Endpoint anEndpoint)
           
 void setCasManager(AsynchAECasManager casManager)
           
 void setDeployDescriptor(java.lang.String deployDescriptor)
           
 void setInputChannel(InputChannel anInputChannel)
           
 void setOutputChannel(OutputChannel anOutputChannel)
           
 void setStopped()
          Called to set the state of the AnalysisEngineController to STOPPED.
 void setUimaEEAdminContext(UimaEEAdminContext anAdminContext)
           
 void stop()
           
 void takeAction(java.lang.String anAction, java.lang.String anEndpointName, ErrorContext anErrorContext)
           
 void terminate()
          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
 

Constructor Detail

AnalysisEngineControllerAdapter

public AnalysisEngineControllerAdapter()
Method Detail

addAbortedCasReferenceId

public void addAbortedCasReferenceId(java.lang.String casReferenceId)
Specified by:
addAbortedCasReferenceId in interface AnalysisEngineController

addInputChannel

public void addInputChannel(InputChannel anInputChannel)
                     throws java.lang.Exception
Specified by:
addInputChannel in interface AnalysisEngineController
Throws:
java.lang.Exception

addServiceInfo

public void addServiceInfo(ServiceInfo serviceInfo)
Specified by:
addServiceInfo in interface AnalysisEngineController

addTimeSnapshot

public void addTimeSnapshot(long snapshot,
                            java.lang.String key)

beginProcess

public void beginProcess(int msgType)
Specified by:
beginProcess in interface AnalysisEngineController

cacheClientEndpoint

public void cacheClientEndpoint(Endpoint anEndpoint)
Specified by:
cacheClientEndpoint in interface AnalysisEngineController

collectionProcessComplete

public void collectionProcessComplete(Endpoint anEndpoint)
                               throws AsynchAEException
Specified by:
collectionProcessComplete in interface AnalysisEngineController
Throws:
AsynchAEException

dropCAS

public void dropCAS(java.lang.String casReferenceId,
                    boolean dropCacheEntry)
Specified by:
dropCAS in interface AnalysisEngineController

dropCAS

public void dropCAS(org.apache.uima.cas.CAS acas)
Specified by:
dropCAS in interface AnalysisEngineController

dropStats

public void dropStats(java.lang.String casReferenceId,
                      java.lang.String anEndpointName)
Specified by:
dropStats in interface AnalysisEngineController

endProcess

public void endProcess(int msgType)
Specified by:
endProcess in interface AnalysisEngineController

forceTimeoutOnPendingCases

public void forceTimeoutOnPendingCases(java.lang.String key)
Specified by:
forceTimeoutOnPendingCases in interface AnalysisEngineController

getAnalysisTime

public long getAnalysisTime()
Specified by:
getAnalysisTime in interface AnalysisEngineController

getCasManagerWrapper

public AsynchAECasManager getCasManagerWrapper()
Specified by:
getCasManagerWrapper in interface AnalysisEngineController

getCasStatistics

public ServicePerformance getCasStatistics(java.lang.String casReferenceId)
Specified by:
getCasStatistics in interface AnalysisEngineController

getChildUimaContext

public org.apache.uima.UimaContext getChildUimaContext(java.lang.String delegateEndpointName)
                                                throws java.lang.Exception
Specified by:
getChildUimaContext in interface AnalysisEngineController
Throws:
java.lang.Exception

getClientEndpoint

public Endpoint getClientEndpoint()
Specified by:
getClientEndpoint in interface AnalysisEngineController

getComponentName

public java.lang.String getComponentName()
Specified by:
getComponentName in interface AnalysisEngineController

getDeadClientMap

public java.util.Map<java.lang.String,java.lang.String> getDeadClientMap()
Specified by:
getDeadClientMap in interface AnalysisEngineController

getControllerLatch

public ControllerLatch getControllerLatch()
Specified by:
getControllerLatch in interface AnalysisEngineController

getCpuTime

public long getCpuTime()
Specified by:
getCpuTime in interface AnalysisEngineController

getErrorHandlerChain

public ErrorHandlerChain getErrorHandlerChain()
Specified by:
getErrorHandlerChain in interface AnalysisEngineController

getEventListener

public EventSubscriber getEventListener()
Specified by:
getEventListener in interface AnalysisEngineController

getIdleTime

public long getIdleTime()
Specified by:
getIdleTime in interface AnalysisEngineController

getIdleTimeBetweenProcessCalls

public long getIdleTimeBetweenProcessCalls(int msgType)
Specified by:
getIdleTimeBetweenProcessCalls in interface AnalysisEngineController

getInProcessCache

public InProcessCache getInProcessCache()
Specified by:
getInProcessCache in interface AnalysisEngineController

getIndex

public int getIndex()
Specified by:
getIndex in interface AnalysisEngineController

getInputChannel

public InputChannel getInputChannel()
Specified by:
getInputChannel in interface AnalysisEngineController

getInputChannel

public InputChannel getInputChannel(java.lang.String queueName)
Specified by:
getInputChannel in interface AnalysisEngineController

getJMXDomain

public java.lang.String getJMXDomain()
Specified by:
getJMXDomain in interface AnalysisEngineController

getJmxContext

public java.lang.String getJmxContext()
Specified by:
getJmxContext in interface AnalysisEngineController

getLocalCache

public LocalCache getLocalCache()
Specified by:
getLocalCache in interface AnalysisEngineController

getManagementInterface

public JmxManagement getManagementInterface()
Specified by:
getManagementInterface in interface AnalysisEngineController

getMonitor

public Monitor getMonitor()
Specified by:
getMonitor in interface AnalysisEngineController

getName

public java.lang.String getName()
Specified by:
getName in interface AnalysisEngineController

getOutputChannel

public OutputChannel getOutputChannel()
Specified by:
getOutputChannel in interface AnalysisEngineController

getParentController

public AnalysisEngineController getParentController()
Specified by:
getParentController in interface AnalysisEngineController

getReplyInputChannel

public InputChannel getReplyInputChannel(java.lang.String delegateKey)
Specified by:
getReplyInputChannel in interface AnalysisEngineController

getReplyTime

public long getReplyTime()
Specified by:
getReplyTime in interface AnalysisEngineController

getServiceEndpointName

public java.lang.String getServiceEndpointName()
Specified by:
getServiceEndpointName in interface AnalysisEngineController

getServiceErrors

public ServiceErrors getServiceErrors()
Specified by:
getServiceErrors in interface AnalysisEngineController

getServiceInfo

public ServiceInfo getServiceInfo()
Specified by:
getServiceInfo in interface AnalysisEngineController

getServicePerformance

public ServicePerformance getServicePerformance()
Specified by:
getServicePerformance in interface AnalysisEngineController

getStats

public java.util.Map getStats()
Specified by:
getStats in interface AnalysisEngineController

getTime

public long getTime(java.lang.String casReferenceId,
                    java.lang.String anEndpointName)
Specified by:
getTime in interface AnalysisEngineController

getTimeSnapshot

public long getTimeSnapshot(java.lang.String key)

getTransport

public UimaTransport getTransport(UimaAsContext context,
                                  java.lang.String key)
                           throws java.lang.Exception
Specified by:
getTransport in interface AnalysisEngineController
Throws:
java.lang.Exception

getTransport

public UimaTransport getTransport(java.lang.String key)
                           throws java.lang.Exception
Specified by:
getTransport in interface AnalysisEngineController
Throws:
java.lang.Exception

getUimaEEAdminContext

public UimaEEAdminContext getUimaEEAdminContext()
Specified by:
getUimaEEAdminContext in interface AnalysisEngineController

getUimaMessageListener

public UimaMessageListener getUimaMessageListener(java.lang.String delegateKey)
Specified by:
getUimaMessageListener in interface AnalysisEngineController

handleDelegateLifeCycleEvent

public void handleDelegateLifeCycleEvent(java.lang.String anEndpoint,
                                         int delegateCount)
Specified by:
handleDelegateLifeCycleEvent in interface AnalysisEngineController

incrementDeserializationTime

public void incrementDeserializationTime(long cpuTime)
Specified by:
incrementDeserializationTime in interface AnalysisEngineController

incrementSerializationTime

public void incrementSerializationTime(long cpuTime)
Specified by:
incrementSerializationTime in interface AnalysisEngineController

initialize

public void initialize()
                throws AsynchAEException
Specified by:
initialize in interface AnalysisEngineController
Throws:
AsynchAEException

initializeVMTransport

public void initializeVMTransport(int parentControllerReplyConsumerCount)
                           throws java.lang.Exception
Specified by:
initializeVMTransport in interface AnalysisEngineController
Throws:
java.lang.Exception

isAwaitingCacheCallbackNotification

public boolean isAwaitingCacheCallbackNotification()
Specified by:
isAwaitingCacheCallbackNotification in interface AnalysisEngineController

isCasMultiplier

public boolean isCasMultiplier()
Specified by:
isCasMultiplier in interface AnalysisEngineController

isPrimitive

public boolean isPrimitive()
Specified by:
isPrimitive in interface AnalysisEngineController

isStopped

public boolean isStopped()
Description copied from interface: AnalysisEngineController
Returns true if the AnalysisEngineController has been (or is in the process of) shutdown.

Specified by:
isStopped in interface AnalysisEngineController
Returns:
- true if stopped

isTopLevelComponent

public boolean isTopLevelComponent()
Specified by:
isTopLevelComponent in interface AnalysisEngineController

notifyListenersWithInitializationStatus

public void notifyListenersWithInitializationStatus(java.lang.Exception e)
Specified by:
notifyListenersWithInitializationStatus in interface AnalysisEngineController

onInitialize

public void onInitialize()
Specified by:
onInitialize in interface AnalysisEngineController

process

public void process(org.apache.uima.cas.CAS cas,
                    java.lang.String casId)
Specified by:
process in interface AnalysisEngineController

process

public void process(org.apache.uima.cas.CAS acas,
                    java.lang.String anInputCasReferenceId,
                    java.lang.String newCasReferenceId,
                    java.lang.String newCASProducedBy)
Specified by:
process in interface AnalysisEngineController

process

public void process(org.apache.uima.cas.CAS acas,
                    java.lang.String casReferenceId,
                    Endpoint anEndpoint)
Specified by:
process in interface AnalysisEngineController

quiesceAndStop

public abstract void quiesceAndStop()
Specified by:
quiesceAndStop in interface AnalysisEngineController

registerVmQueueWithJMX

public void registerVmQueueWithJMX(java.lang.Object o,
                                   java.lang.String name)
                            throws java.lang.Exception
Specified by:
registerVmQueueWithJMX in interface AnalysisEngineController
Throws:
java.lang.Exception

releaseNextCas

public void releaseNextCas(java.lang.String casReferenceId)
Specified by:
releaseNextCas in interface AnalysisEngineController

saveReplyTime

public void saveReplyTime(long snapshot,
                          java.lang.String key)
Specified by:
saveReplyTime in interface AnalysisEngineController

saveTime

public void saveTime(long anArrivalTime,
                     java.lang.String casReferenceId,
                     java.lang.String anEndpointName)
Specified by:
saveTime in interface AnalysisEngineController

sendMetadata

public void sendMetadata(Endpoint anEndpoint)
                  throws AsynchAEException
Specified by:
sendMetadata in interface AnalysisEngineController
Throws:
AsynchAEException

setCasManager

public void setCasManager(AsynchAECasManager casManager)
Specified by:
setCasManager in interface AnalysisEngineController

setDeployDescriptor

public void setDeployDescriptor(java.lang.String deployDescriptor)
Specified by:
setDeployDescriptor in interface AnalysisEngineController

setInputChannel

public void setInputChannel(InputChannel anInputChannel)
                     throws java.lang.Exception
Specified by:
setInputChannel in interface AnalysisEngineController
Throws:
java.lang.Exception

setOutputChannel

public void setOutputChannel(OutputChannel anOutputChannel)
                      throws java.lang.Exception
Specified by:
setOutputChannel in interface AnalysisEngineController
Throws:
java.lang.Exception

setStopped

public void setStopped()
Description copied from interface: AnalysisEngineController
Called to set the state of the AnalysisEngineController to STOPPED. This method does not stop input or output channels.

Specified by:
setStopped in interface AnalysisEngineController

setUimaEEAdminContext

public void setUimaEEAdminContext(UimaEEAdminContext anAdminContext)
Specified by:
setUimaEEAdminContext in interface AnalysisEngineController

stop

public void stop()
Specified by:
stop in interface AnalysisEngineController

takeAction

public void takeAction(java.lang.String anAction,
                       java.lang.String anEndpointName,
                       ErrorContext anErrorContext)
Specified by:
takeAction in interface AnalysisEngineController

addControllerCallbackListener

public void addControllerCallbackListener(ControllerCallbackListener listener)
Description copied from interface: ControllerLifecycle
Register one or more listeners through which the controller can send notification of events.

Specified by:
addControllerCallbackListener in interface ControllerLifecycle
Parameters:
listener - - application listener object to register

removeControllerCallbackListener

public void removeControllerCallbackListener(ControllerCallbackListener listener)
Description copied from interface: ControllerLifecycle
Removes named application listener.

Specified by:
removeControllerCallbackListener in interface ControllerLifecycle
Parameters:
listener - - application listener to remove

terminate

public void terminate()
Description copied from interface: ControllerLifecycle
Called 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:
terminate in interface ControllerLifecycle

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:
changeState in interface AnalysisEngineController

getState

public BaseAnalysisEngineController.ServiceState getState()
Specified by:
getState in interface AnalysisEngineController


Copyright © 2011. All Rights Reserved.