public class BaseUIMAAsynchronousEngine_impl extends org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl implements UimaAsynchronousEngine, javax.jms.MessageListener, org.apache.uima.aae.controller.ControllerCallbackListener, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
| Modifier and Type | Class and Description |
|---|---|
class |
BaseUIMAAsynchronousEngine_impl.ClientExceptionListener |
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.ClientRequest, org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.ClientState, org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection, org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.ThreadMonitor, org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.UimaASShutdownHook, org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.UimaAsTransportListener| Modifier and Type | Field and Description |
|---|---|
protected static Object |
connectionMux |
protected static Lock |
globalLock |
protected InitialContext |
jndiContext |
protected static Semaphore |
sharedConnectionSemaphore |
protected boolean |
stopped |
abort, asynchManager, brokerURI, clientCache, clientSideJmxStats, collectionReader, consumer, cpcReadySemaphore, cpcReplySemaphore, cpcSemaphore, cpcTimeout, CpCTimeout, exc, getMetaSemaphore, idGenerator, initialized, listeners, metadataTimeout, MetadataTimeout, outstandingCasRequests, pendingMessageQueue, PingTimeout, processTimeout, ProcessTimeout, producerInitialized, producerSemaphore, remoteService, remoteTypeSystem, resourceMetadata, running, sendAndReceiveCAS, serialFormat, serviceDelegate, SHADOW_CAS_POOL, sharedConnections, shutdownHookThread, springContainerRegistry, state, threadMonitorMap, timerPerCAS, totalCasRequestsSentBetweenCpCs, uniqueIdentifierApplicationContext, ApplicationName, CasPoolSize, CpcTimeout, DD2SpringXsltFilePath, Endpoint, ENDPOINT, GetMetaTimeout, password, ReplyWindow, SaxonClasspath, SERIALIZATION_STRATEGY, SerializationStrategy, ServerUri, ShadowCasPoolSize, SharedConnection, TargetSelectorProperty, Timeout, TimerPerCAS, UimaEeDebug, userName| Constructor and Description |
|---|
BaseUIMAAsynchronousEngine_impl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup()
Called at the end of collectionProcessingComplete - WAS closes receiving thread here
|
protected javax.jms.BytesMessage |
createBytesMessage() |
protected org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection |
createSharedConnection(String aBrokerURI) |
protected javax.jms.TextMessage |
createTextMessage() |
String |
deploy(String[] aDeploymentDescriptorList,
Map anApplicationContext)
Deploys a single UIMA AS container and all services defined in provided deployment descriptors.
|
String |
deploy(String aDeploymentDescriptor,
Map anApplicationContext)
First generates a Spring context from a given deploy descriptor and than deploys the context
into a Spring Container.
|
protected void |
deployEmbeddedBroker() |
protected String |
deploySpringContainer(String[] springContextFiles)
Deploys provided context files ( and beans) in a new Spring container.
|
protected void |
dispatchFreeCasRequest(String casReferenceId,
javax.jms.Message message) |
protected org.apache.uima.adapter.jms.client.MessageSender |
getDispatcher() |
String |
getEndPointName()
Return a name of the queue to which the JMS Producer is connected to.
|
protected javax.jms.MessageProducer |
getMessageProducer(javax.jms.Destination destination) |
protected javax.jms.Session |
getSession(javax.jms.Connection aConnection) |
protected javax.jms.Session |
getSession(String aBrokerURI) |
void |
initialize(Map anApplicationContext)
Initialize the uima ee client.
|
protected void |
initializeConsumer(String aBrokerURI)
Create a JMS Consumer on a temporary queue.
|
protected void |
initializeConsumer(String aBrokerURI,
javax.jms.Connection connection) |
protected void |
initializeProducer(String aBrokerURI,
String aQueueName) |
protected void |
initializeProducer(String aBrokerURI,
String aQueueName,
javax.jms.Connection aConnection) |
protected javax.jms.MessageProducer |
lookupProducerForEndpoint(org.apache.uima.aae.controller.Endpoint anEndpoint) |
static void |
main(String[] args) |
void |
notifyOnInitializationFailure(org.apache.uima.aae.controller.AnalysisEngineController aController,
Exception e) |
void |
notifyOnInitializationFailure(Exception e) |
void |
notifyOnInitializationSuccess() |
void |
notifyOnInitializationSuccess(org.apache.uima.aae.controller.AnalysisEngineController aController) |
void |
notifyOnReconnecting(String aMessage) |
void |
notifyOnReconnectionSuccess() |
void |
notifyOnTermination(String aServiceName,
String aCasReferenceId,
Exception cause) |
void |
notifyOnTermination(String aServiceName,
org.apache.uima.aae.UimaASApplicationEvent.EventTrigger cause) |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
protected void |
setCASMessage(String aCasReferenceId,
byte[] aSerializedCAS,
javax.jms.Message msg) |
protected void |
setCASMessage(String aCasReferenceId,
CAS aCAS,
javax.jms.Message msg)
Initialize JMS Message with properties relevant to Process CAS request.
|
protected void |
setCASMessage(String aCasReferenceId,
String aSerializedCAS,
javax.jms.Message msg) |
protected void |
setCommonProperties(String aCasReferenceId,
javax.jms.Message msg,
SerialFormat serialFormat) |
protected void |
setCPCMessage(javax.jms.Message msg) |
protected void |
setFreeCasMessage(javax.jms.Message msg,
String aCasReferenceId,
String selector) |
protected void |
setMetaRequestMessage(javax.jms.Message msg) |
void |
setReleaseCASMessage(javax.jms.TextMessage msg,
String aCasReferenceId) |
protected void |
setStopMessage(javax.jms.Message msg,
String aCasReferenceId) |
void |
stop()
Stops the asynchronous client.
|
void |
stopProducingCases()
Request Uima AS client to initiate sending Stop requests to a service for all outstanding CASes
awaiting reply.
|
void |
stopProducingCases(String aCasReferenceId)
Request Uima AS client to initiate sending Stop request to a service for a given CAS id If the
service is a Cas Multiplier, it will stop producing new CASes, will wait until all child CASes
finish and finally returns the input CAS.
|
void |
undeploy() |
void |
undeploy(String aSpringContainerId)
Undeploys specified UIMA AS container and all services running within it.
|
void |
undeploy(String aSpringContainerId,
int stop_level)
Undeploys Spring container with a given container Id.
|
protected org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection |
validateConnection(String aBrokerURI) |
protected void |
waitForServiceNotification() |
acquireCpcReadySemaphore, addStatusCallbackListener, cancelTimer, collectionProcessingComplete, connectionOpen, decrementOutstandingCasCounter, delayCasIfDelegateInTimedOutState, deserialize, deserialize, deserialize, deserializeCAS, deserializeCAS, deserializeCAS, deserializeCAS, deserializeCAS, deserializeCAS, doStop, getBrokerURI, getCache, getCAS, getMetaData, getPerformanceReport, getRemoteTypeSystem, getSerialFormat, handleCollectionProcessCompleteReply, handleException, handleException, handleException, handleMetadataReply, handleNonProcessException, handleProcessReply, handleServiceInfo, lookupConnection, notifyListeners, notifyListeners, notifyOnTimout, onBeforeMessageSend, onBeforeProcessCAS, onBeforeProcessMeta, onException, onMessage, onProducerInitialized, process, recoverSharedConnectionIfClosed, removeFromCache, removeStatusCallbackListener, reset, sendAndReceiveCAS, sendAndReceiveCAS, sendAndReceiveCAS, sendAndReceiveCAS, sendAndReceiveCAS, sendCAS, sendCAS, sendMetaRequest, serializeCAS, serializeCAS, setBrokeryURI, setCollectionReader, setRemoteTypeSystem, setSerialFormat, waitForCpcReply, waitForMetadataReply, wakeUpSendThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddStatusCallbackListener, collectionProcessingComplete, getCAS, getMetaData, getPerformanceReport, getSerialFormat, process, removeStatusCallbackListener, sendAndReceiveCAS, sendAndReceiveCAS, sendAndReceiveCAS, sendCAS, sendCAS, setCollectionReaderprotected static Semaphore sharedConnectionSemaphore
protected static Object connectionMux
protected InitialContext jndiContext
protected static Lock globalLock
protected volatile boolean stopped
protected javax.jms.TextMessage createTextMessage()
throws ResourceInitializationException
createTextMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implResourceInitializationExceptionprotected javax.jms.BytesMessage createBytesMessage()
throws ResourceInitializationException
createBytesMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implResourceInitializationExceptionprotected void cleanup()
throws Exception
cleanup in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionpublic String getEndPointName() throws ResourceProcessException
getEndPointName in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implResourceProcessExceptionprotected void setMetaRequestMessage(javax.jms.Message msg)
throws Exception
setMetaRequestMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionprotected void setCASMessage(String aCasReferenceId, CAS aCAS, javax.jms.Message msg) throws ResourceProcessException
setCASMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implResourceProcessExceptionprotected void setCASMessage(String aCasReferenceId, String aSerializedCAS, javax.jms.Message msg) throws ResourceProcessException
setCASMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implResourceProcessExceptionprotected void setCASMessage(String aCasReferenceId, byte[] aSerializedCAS, javax.jms.Message msg) throws ResourceProcessException
setCASMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implResourceProcessExceptionprotected void setCommonProperties(String aCasReferenceId, javax.jms.Message msg, SerialFormat serialFormat) throws ResourceProcessException
ResourceProcessExceptionpublic void stop()
UimaAsynchronousEnginestop in interface UimaAsynchronousEngineprotected void setCPCMessage(javax.jms.Message msg)
throws Exception
setCPCMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionprotected void setFreeCasMessage(javax.jms.Message msg,
String aCasReferenceId,
String selector)
throws Exception
setFreeCasMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionprotected void setStopMessage(javax.jms.Message msg,
String aCasReferenceId)
throws Exception
setStopMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionprotected org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection createSharedConnection(String aBrokerURI) throws Exception
Exceptionprotected org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection validateConnection(String aBrokerURI) throws Exception
validateConnection in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionprotected javax.jms.Session getSession(String aBrokerURI) throws Exception
Exceptionprotected javax.jms.Session getSession(javax.jms.Connection aConnection)
throws Exception
Exceptionprotected javax.jms.MessageProducer lookupProducerForEndpoint(org.apache.uima.aae.controller.Endpoint anEndpoint) throws Exception
Exceptionprotected void initializeProducer(String aBrokerURI, String aQueueName) throws Exception
Exceptionprotected void initializeProducer(String aBrokerURI, String aQueueName, javax.jms.Connection aConnection) throws Exception
Exceptionprotected void initializeConsumer(String aBrokerURI) throws Exception
aBrokerURI - Exceptionprotected void initializeConsumer(String aBrokerURI, javax.jms.Connection connection) throws Exception
initializeConsumer in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionpublic void initialize(Map anApplicationContext) throws ResourceInitializationException
anApplicationContext map.initialize in interface UimaAsynchronousEngineinitialize in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implanApplicationContext - - configuration containing UIMA EE Service Broker URI, service queue name, timeout
value, reply window size, and CAS Pool size.ResourceInitializationException - init errorpublic String deploy(String aDeploymentDescriptor, Map anApplicationContext) throws Exception
deploy in interface UimaAsynchronousEngineaDeploymentDescriptor - - deployment descriptor to generate Spring Context fromanApplicationContext - - a Map containing properties required by dd2springException - - if there was a problem deploying the container or UIMA AS services.public String deploy(String[] aDeploymentDescriptorList, Map anApplicationContext) throws Exception
UimaAsynchronousEnginedeploy in interface UimaAsynchronousEnginedeploy in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implaDeploymentDescriptorList - - a list of deployment descriptors to deploy in a container.anApplicationContext - - initialization parameters needed to configure the client and servicesException - - if there was a problem deploying the container or UIMA AS services.public void undeploy(String aSpringContainerId) throws Exception
UimaAsynchronousEngineundeploy in interface UimaAsynchronousEngineaSpringContainerId - - an id of the container to be destroyed.Exception - errorpublic void undeploy(String aSpringContainerId, int stop_level) throws Exception
undeploy in interface UimaAsynchronousEngineaSpringContainerId - - an id of the container to be destroyed.stop_level - stopException - errorprotected String deploySpringContainer(String[] springContextFiles) throws ResourceInitializationException
deploySpringContainer in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implResourceInitializationExceptionprotected void waitForServiceNotification()
throws Exception
Exceptionpublic static void main(String[] args)
public void setReleaseCASMessage(javax.jms.TextMessage msg,
String aCasReferenceId)
throws Exception
setReleaseCASMessage in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionpublic void notifyOnInitializationFailure(Exception e)
notifyOnInitializationFailure in interface org.apache.uima.aae.controller.ControllerCallbackListenerpublic void notifyOnInitializationSuccess()
notifyOnInitializationSuccess in interface org.apache.uima.aae.controller.ControllerCallbackListenerpublic void notifyOnInitializationFailure(org.apache.uima.aae.controller.AnalysisEngineController aController, Exception e)
notifyOnInitializationFailure in interface org.apache.uima.aae.controller.ControllerCallbackListenerpublic void notifyOnInitializationSuccess(org.apache.uima.aae.controller.AnalysisEngineController aController)
notifyOnInitializationSuccess in interface org.apache.uima.aae.controller.ControllerCallbackListenerpublic void notifyOnTermination(String aServiceName, org.apache.uima.aae.UimaASApplicationEvent.EventTrigger cause)
notifyOnTermination in interface org.apache.uima.aae.controller.ControllerCallbackListenerpublic void notifyOnTermination(String aServiceName, String aCasReferenceId, Exception cause)
protected javax.jms.MessageProducer getMessageProducer(javax.jms.Destination destination)
throws Exception
getMessageProducer in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionpublic void stopProducingCases()
stopProducingCases in interface UimaAsynchronousEnginepublic void stopProducingCases(String aCasReferenceId)
stopProducingCases in interface UimaAsynchronousEngineaCasReferenceId - cas idprotected void dispatchFreeCasRequest(String casReferenceId, javax.jms.Message message) throws Exception
dispatchFreeCasRequest in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implExceptionprotected org.apache.uima.adapter.jms.client.MessageSender getDispatcher()
getDispatcher in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_implpublic void notifyOnReconnecting(String aMessage)
notifyOnReconnecting in interface org.apache.uima.aae.controller.ControllerCallbackListenerpublic void notifyOnReconnectionSuccess()
notifyOnReconnectionSuccess in interface org.apache.uima.aae.controller.ControllerCallbackListenerpublic void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.