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
Modifier and Type | Field and Description |
---|---|
protected static Object |
connectionMux |
protected static Lock |
globalLock |
protected InitialContext |
jndiContext |
protected static Semaphore |
sharedConnectionSemaphore |
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, uniqueIdentifier
ApplicationContext, ApplicationName, CasPoolSize, CpcTimeout, DD2SpringXsltFilePath, Endpoint, ENDPOINT, GetMetaTimeout, password, ReplyWindow, SaxonClasspath, SERIALIZATION_STRATEGY, SerializationStrategy, ServerUri, ShadowCasPoolSize, SharedConnection, 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 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) |
void |
setCPCMessage(javax.jms.Message msg) |
protected void |
setMetaRequestMessage(javax.jms.Message msg) |
void |
setReleaseCASMessage(javax.jms.TextMessage 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, sendCAS, sendMetaRequest, serializeCAS, serializeCAS, setBrokeryURI, setCollectionReader, setRemoteTypeSystem, setSerialFormat, waitForCpcReply, waitForMetadataReply, wakeUpSendThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStatusCallbackListener, collectionProcessingComplete, getCAS, getMetaData, getPerformanceReport, getSerialFormat, process, removeStatusCallbackListener, sendAndReceiveCAS, sendAndReceiveCAS, sendCAS, setCollectionReader
protected static Semaphore sharedConnectionSemaphore
protected static Object connectionMux
protected InitialContext jndiContext
protected static Lock globalLock
protected javax.jms.TextMessage createTextMessage() throws ResourceInitializationException
createTextMessage
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
ResourceInitializationException
protected javax.jms.BytesMessage createBytesMessage() throws ResourceInitializationException
createBytesMessage
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
ResourceInitializationException
protected void cleanup() throws Exception
cleanup
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
Exception
public String getEndPointName() throws ResourceProcessException
getEndPointName
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
ResourceProcessException
protected void setMetaRequestMessage(javax.jms.Message msg) throws Exception
setMetaRequestMessage
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
Exception
protected void setCASMessage(String aCasReferenceId, CAS aCAS, javax.jms.Message msg) throws ResourceProcessException
setCASMessage
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
ResourceProcessException
protected void setCASMessage(String aCasReferenceId, String aSerializedCAS, javax.jms.Message msg) throws ResourceProcessException
setCASMessage
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
ResourceProcessException
protected void setCASMessage(String aCasReferenceId, byte[] aSerializedCAS, javax.jms.Message msg) throws ResourceProcessException
setCASMessage
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
ResourceProcessException
protected void setCommonProperties(String aCasReferenceId, javax.jms.Message msg, SerialFormat serialFormat) throws ResourceProcessException
ResourceProcessException
public void stop()
UimaAsynchronousEngine
stop
in interface UimaAsynchronousEngine
public void setCPCMessage(javax.jms.Message msg) throws Exception
setCPCMessage
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
Exception
protected org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection createSharedConnection(String aBrokerURI) throws Exception
Exception
protected org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection validateConnection(String aBrokerURI) throws Exception
validateConnection
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
Exception
protected javax.jms.Session getSession(String aBrokerURI) throws Exception
Exception
protected javax.jms.Session getSession(javax.jms.Connection aConnection) throws Exception
Exception
protected javax.jms.MessageProducer lookupProducerForEndpoint(org.apache.uima.aae.controller.Endpoint anEndpoint) throws Exception
Exception
protected void initializeProducer(String aBrokerURI, String aQueueName) throws Exception
Exception
protected void initializeProducer(String aBrokerURI, String aQueueName, javax.jms.Connection aConnection) throws Exception
Exception
protected void initializeConsumer(String aBrokerURI) throws Exception
aBrokerURI
- Exception
protected void initializeConsumer(String aBrokerURI, javax.jms.Connection connection) throws Exception
initializeConsumer
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
Exception
public void initialize(Map anApplicationContext) throws ResourceInitializationException
anApplicationContext
map.initialize
in interface UimaAsynchronousEngine
initialize
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
anApplicationContext
- - configuration containing UIMA EE Service Broker URI, service queue name, timeout
value, reply window size, and CAS Pool size.ResourceInitializationException
public String deploy(String aDeploymentDescriptor, Map anApplicationContext) throws Exception
deploy
in interface UimaAsynchronousEngine
aDeploymentDescriptor
- - 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
UimaAsynchronousEngine
deploy
in interface UimaAsynchronousEngine
deploy
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
aDeploymentDescriptorList
- - 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
UimaAsynchronousEngine
undeploy
in interface UimaAsynchronousEngine
aSpringContainerId
- - an id of the container to be destroyed.Exception
public void undeploy(String aSpringContainerId, int stop_level) throws Exception
undeploy
in interface UimaAsynchronousEngine
aSpringContainerId
- - an id of the container to be destroyed.Exception
protected String deploySpringContainer(String[] springContextFiles) throws ResourceInitializationException
deploySpringContainer
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
ResourceInitializationException
protected void waitForServiceNotification() throws Exception
Exception
public 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_impl
Exception
public void notifyOnInitializationFailure(Exception e)
notifyOnInitializationFailure
in interface org.apache.uima.aae.controller.ControllerCallbackListener
public void notifyOnInitializationSuccess()
notifyOnInitializationSuccess
in interface org.apache.uima.aae.controller.ControllerCallbackListener
public void notifyOnInitializationFailure(org.apache.uima.aae.controller.AnalysisEngineController aController, Exception e)
notifyOnInitializationFailure
in interface org.apache.uima.aae.controller.ControllerCallbackListener
public void notifyOnInitializationSuccess(org.apache.uima.aae.controller.AnalysisEngineController aController)
notifyOnInitializationSuccess
in interface org.apache.uima.aae.controller.ControllerCallbackListener
public void notifyOnTermination(String aServiceName, org.apache.uima.aae.UimaASApplicationEvent.EventTrigger cause)
notifyOnTermination
in interface org.apache.uima.aae.controller.ControllerCallbackListener
public 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_impl
Exception
public void stopProducingCases()
stopProducingCases
in interface UimaAsynchronousEngine
public void stopProducingCases(String aCasReferenceId)
stopProducingCases
in interface UimaAsynchronousEngine
protected org.apache.uima.adapter.jms.client.MessageSender getDispatcher()
getDispatcher
in class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
public void notifyOnReconnecting(String aMessage)
notifyOnReconnecting
in interface org.apache.uima.aae.controller.ControllerCallbackListener
public void notifyOnReconnectionSuccess()
notifyOnReconnectionSuccess
in interface org.apache.uima.aae.controller.ControllerCallbackListener
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.