public class BaseUIMAAsynchronousEngine_impl extends BaseUIMAAsynchronousEngineCommon_impl implements UimaAsynchronousEngine, javax.jms.MessageListener, ControllerCallbackListener
BaseUIMAAsynchronousEngineCommon_impl.ClientRequest, BaseUIMAAsynchronousEngineCommon_impl.ClientState, BaseUIMAAsynchronousEngineCommon_impl.SharedConnection, BaseUIMAAsynchronousEngineCommon_impl.ThreadMonitor, BaseUIMAAsynchronousEngineCommon_impl.UimaASShutdownHook| Modifier and Type | Field and Description |
|---|---|
protected javax.naming.InitialContext |
jndiContext |
protected static java.util.concurrent.Semaphore |
sharedConnectionSemaphore |
abort, asynchManager, clientCache, clientSideJmxStats, collectionReader, consumer, cpcReadySemaphore, cpcReplySemaphore, cpcSemaphore, cpcTimeout, CpCTimeout, exc, getMetaSemaphore, idGenerator, initialized, listeners, metadataTimeout, MetadataTimeout, outstandingCasRequests, pendingMessageQueue, PingTimeout, processTimeout, ProcessTimeout, producerInitialized, producerSemaphore, remoteService, resourceMetadata, running, sendAndReceiveCAS, serializationStrategy, serviceDelegate, SHADOW_CAS_POOL, sharedConnection, shutdownHookThread, springContainerRegistry, state, threadMonitorMap, totalCasRequestsSentBetweenCpCs, uniqueIdentifierApplicationContext, ApplicationName, CasPoolSize, CpcTimeout, DD2SpringXsltFilePath, Endpoint, GetMetaTimeout, ReplyWindow, SaxonClasspath, SerializationStrategy, ServerUri, ShadowCasPoolSize, SharedConnection, Timeout, UimaEeDebug| 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 void |
createSharedConnection(java.lang.String aBrokerURI) |
protected javax.jms.TextMessage |
createTextMessage() |
java.lang.String |
deploy(java.lang.String[] aDeploymentDescriptorList,
java.util.Map anApplicationContext)
Deploys a single UIMA AS container and all services defined in provided deployment descriptors.
|
java.lang.String |
deploy(java.lang.String aDeploymentDescriptor,
java.util.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 java.lang.String |
deploySpringContainer(java.lang.String[] springContextFiles)
Deploys provided context files ( and beans) in a new Spring container.
|
protected MessageSender |
getDispatcher() |
java.lang.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(java.lang.String aBrokerURI) |
void |
initialize(java.util.Map anApplicationContext)
Initialize the uima ee client.
|
protected void |
initializeConsumer(java.lang.String aBrokerURI)
Create a JMS Consumer on a temporary queue.
|
protected void |
initializeConsumer(java.lang.String aBrokerURI,
javax.jms.Connection connection) |
protected void |
initializeProducer(java.lang.String aBrokerURI,
java.lang.String aQueueName) |
protected void |
initializeProducer(java.lang.String aBrokerURI,
java.lang.String aQueueName,
javax.jms.Connection aConnection) |
protected javax.jms.MessageProducer |
lookupProducerForEndpoint(Endpoint anEndpoint) |
static void |
main(java.lang.String[] args) |
void |
notifyOnInitializationFailure(AnalysisEngineController aController,
java.lang.Exception e) |
void |
notifyOnInitializationFailure(java.lang.Exception e) |
void |
notifyOnInitializationSuccess() |
void |
notifyOnInitializationSuccess(AnalysisEngineController aController) |
void |
notifyOnReconnecting(java.lang.String aMessage) |
void |
notifyOnReconnectionSuccess() |
void |
notifyOnTermination(java.lang.String aServiceName) |
void |
notifyOnTermination(java.lang.String aServiceName,
java.lang.String aCasReferenceId,
java.lang.Exception cause) |
protected void |
setCASMessage(java.lang.String aCasReferenceId,
byte[] aSerializedCAS,
javax.jms.Message msg) |
protected void |
setCASMessage(java.lang.String aCasReferenceId,
org.apache.uima.cas.CAS aCAS,
javax.jms.Message msg)
Initialize JMS Message with properties relevant to Process CAS request.
|
protected void |
setCASMessage(java.lang.String aCasReferenceId,
java.lang.String aSerializedCAS,
javax.jms.Message msg) |
protected void |
setCommonProperties(java.lang.String aCasReferenceId,
javax.jms.Message msg,
java.lang.String aSerializationStrategy) |
void |
setCPCMessage(javax.jms.Message msg) |
protected void |
setMetaRequestMessage(javax.jms.Message msg) |
void |
setReleaseCASMessage(javax.jms.TextMessage msg,
java.lang.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(java.lang.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(java.lang.String aSpringContainerId)
Undeploys specified UIMA AS container and all services running within it.
|
void |
undeploy(java.lang.String aSpringContainerId,
int stop_level)
Undeploys Spring container with a given container Id.
|
protected void |
waitForServiceNotification() |
acquireCpcReadySemaphore, addStatusCallbackListener, cancelTimer, collectionProcessingComplete, connectionOpen, decrementOutstandingCasCounter, delayCasIfDelegateInTimedOutState, deserialize, deserialize, deserialize, deserializeCAS, deserializeCAS, deserializeCAS, deserializeCAS, deserializeCAS, deserializeCAS, doStop, getCache, getCAS, getMetaData, getPerformanceReport, getSerializationStrategy, handleCollectionProcessCompleteReply, handleException, handleException, handleException, handleMetadataReply, handleNonProcessException, handleProcessReply, handleServiceInfo, notifyListeners, notifyOnTimout, onBeforeMessageSend, onException, onMessage, onProducerInitialized, process, recoverSharedConnectionIfClosed, removeFromCache, removeStatusCallbackListener, reset, sendAndReceiveCAS, sendAndReceiveCAS, sendCAS, sendMetaRequest, serializeCAS, serializeCAS, setCollectionReader, setSerializationStrategy, waitForCpcReply, waitForMetadataReply, wakeUpSendThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddStatusCallbackListener, collectionProcessingComplete, getCAS, getMetaData, getPerformanceReport, getSerializationStrategy, process, removeStatusCallbackListener, sendAndReceiveCAS, sendCAS, setCollectionReaderprotected static java.util.concurrent.Semaphore sharedConnectionSemaphore
protected javax.naming.InitialContext jndiContext
protected javax.jms.TextMessage createTextMessage()
throws org.apache.uima.resource.ResourceInitializationException
createTextMessage in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceInitializationExceptionprotected javax.jms.BytesMessage createBytesMessage()
throws org.apache.uima.resource.ResourceInitializationException
createBytesMessage in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceInitializationExceptionprotected void cleanup()
throws java.lang.Exception
cleanup in class BaseUIMAAsynchronousEngineCommon_impljava.lang.Exceptionpublic java.lang.String getEndPointName()
throws org.apache.uima.resource.ResourceProcessException
getEndPointName in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceProcessExceptionprotected void setMetaRequestMessage(javax.jms.Message msg)
throws java.lang.Exception
setMetaRequestMessage in class BaseUIMAAsynchronousEngineCommon_impljava.lang.Exceptionprotected void setCASMessage(java.lang.String aCasReferenceId,
org.apache.uima.cas.CAS aCAS,
javax.jms.Message msg)
throws org.apache.uima.resource.ResourceProcessException
setCASMessage in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceProcessExceptionprotected void setCASMessage(java.lang.String aCasReferenceId,
java.lang.String aSerializedCAS,
javax.jms.Message msg)
throws org.apache.uima.resource.ResourceProcessException
setCASMessage in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceProcessExceptionprotected void setCASMessage(java.lang.String aCasReferenceId,
byte[] aSerializedCAS,
javax.jms.Message msg)
throws org.apache.uima.resource.ResourceProcessException
setCASMessage in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceProcessExceptionprotected void setCommonProperties(java.lang.String aCasReferenceId,
javax.jms.Message msg,
java.lang.String aSerializationStrategy)
throws org.apache.uima.resource.ResourceProcessException
org.apache.uima.resource.ResourceProcessExceptionpublic void stop()
UimaAsynchronousEnginestop in interface UimaAsynchronousEnginepublic void setCPCMessage(javax.jms.Message msg)
throws java.lang.Exception
setCPCMessage in class BaseUIMAAsynchronousEngineCommon_impljava.lang.Exceptionprotected void createSharedConnection(java.lang.String aBrokerURI)
throws java.lang.Exception
java.lang.Exceptionprotected javax.jms.Session getSession(java.lang.String aBrokerURI)
throws java.lang.Exception
java.lang.Exceptionprotected javax.jms.Session getSession(javax.jms.Connection aConnection)
throws java.lang.Exception
java.lang.Exceptionprotected javax.jms.MessageProducer lookupProducerForEndpoint(Endpoint anEndpoint) throws java.lang.Exception
java.lang.Exceptionprotected void initializeProducer(java.lang.String aBrokerURI,
java.lang.String aQueueName)
throws java.lang.Exception
java.lang.Exceptionprotected void initializeProducer(java.lang.String aBrokerURI,
java.lang.String aQueueName,
javax.jms.Connection aConnection)
throws java.lang.Exception
java.lang.Exceptionprotected void initializeConsumer(java.lang.String aBrokerURI)
throws java.lang.Exception
aBrokerURI - java.lang.Exceptionprotected void initializeConsumer(java.lang.String aBrokerURI,
javax.jms.Connection connection)
throws java.lang.Exception
initializeConsumer in class BaseUIMAAsynchronousEngineCommon_impljava.lang.Exceptionpublic void initialize(java.util.Map anApplicationContext)
throws org.apache.uima.resource.ResourceInitializationException
anApplicationContext map.initialize in interface UimaAsynchronousEngineinitialize in class BaseUIMAAsynchronousEngineCommon_implanApplicationContext - - configuration containing UIMA EE Service Broker URI, service queue name, timeout
value, reply window size, and CAS Pool size.org.apache.uima.resource.ResourceInitializationExceptionpublic java.lang.String deploy(java.lang.String aDeploymentDescriptor,
java.util.Map anApplicationContext)
throws java.lang.Exception
deploy in interface UimaAsynchronousEngineaDeploymentDescriptor - - deployment descriptor to generate Spring Context fromanApplicationContext - - a Map containing properties required by dd2springjava.lang.Exception - - if there was a problem deploying the container or UIMA AS services.public java.lang.String deploy(java.lang.String[] aDeploymentDescriptorList,
java.util.Map anApplicationContext)
throws java.lang.Exception
UimaAsynchronousEnginedeploy in interface UimaAsynchronousEnginedeploy in class BaseUIMAAsynchronousEngineCommon_implaDeploymentDescriptorList - - a list of deployment descriptors to deploy in a container.anApplicationContext - - initialization parameters needed to configure the client and servicesjava.lang.Exception - - if there was a problem deploying the container or UIMA AS services.public void undeploy()
throws java.lang.Exception
java.lang.Exceptionpublic void undeploy(java.lang.String aSpringContainerId)
throws java.lang.Exception
UimaAsynchronousEngineundeploy in interface UimaAsynchronousEngineaSpringContainerId - - an id of the container to be destroyed.java.lang.Exceptionpublic void undeploy(java.lang.String aSpringContainerId,
int stop_level)
throws java.lang.Exception
undeploy in interface UimaAsynchronousEngineaSpringContainerId - - an id of the container to be destroyed.java.lang.Exceptionprotected java.lang.String deploySpringContainer(java.lang.String[] springContextFiles)
throws org.apache.uima.resource.ResourceInitializationException
deploySpringContainer in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceInitializationExceptionprotected void waitForServiceNotification()
throws java.lang.Exception
java.lang.Exceptionprotected void deployEmbeddedBroker()
throws java.lang.Exception
java.lang.Exceptionpublic static void main(java.lang.String[] args)
public void setReleaseCASMessage(javax.jms.TextMessage msg,
java.lang.String aCasReferenceId)
throws java.lang.Exception
setReleaseCASMessage in class BaseUIMAAsynchronousEngineCommon_impljava.lang.Exceptionpublic void notifyOnInitializationFailure(java.lang.Exception e)
notifyOnInitializationFailure in interface ControllerCallbackListenerpublic void notifyOnInitializationSuccess()
notifyOnInitializationSuccess in interface ControllerCallbackListenerpublic void notifyOnInitializationFailure(AnalysisEngineController aController, java.lang.Exception e)
notifyOnInitializationFailure in interface ControllerCallbackListenerpublic void notifyOnInitializationSuccess(AnalysisEngineController aController)
notifyOnInitializationSuccess in interface ControllerCallbackListenerpublic void notifyOnTermination(java.lang.String aServiceName)
notifyOnTermination in interface ControllerCallbackListenerpublic void notifyOnTermination(java.lang.String aServiceName,
java.lang.String aCasReferenceId,
java.lang.Exception cause)
protected javax.jms.MessageProducer getMessageProducer(javax.jms.Destination destination)
throws java.lang.Exception
getMessageProducer in class BaseUIMAAsynchronousEngineCommon_impljava.lang.Exceptionpublic void stopProducingCases()
stopProducingCases in interface UimaAsynchronousEnginepublic void stopProducingCases(java.lang.String aCasReferenceId)
stopProducingCases in interface UimaAsynchronousEngineprotected MessageSender getDispatcher()
getDispatcher in class BaseUIMAAsynchronousEngineCommon_implpublic void notifyOnReconnecting(java.lang.String aMessage)
notifyOnReconnecting in interface ControllerCallbackListenerpublic void notifyOnReconnectionSuccess()
notifyOnReconnectionSuccess in interface ControllerCallbackListenerCopyright © 2012. All Rights Reserved.