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 InitialContext |
jndiContext |
protected static 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(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 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(Endpoint anEndpoint) |
static void |
main(String[] args) |
void |
notifyOnInitializationFailure(AnalysisEngineController aController,
Exception e) |
void |
notifyOnInitializationFailure(Exception e) |
void |
notifyOnInitializationSuccess() |
void |
notifyOnInitializationSuccess(AnalysisEngineController aController) |
void |
notifyOnReconnecting(String aMessage) |
void |
notifyOnReconnectionSuccess() |
void |
notifyOnTermination(String aServiceName) |
void |
notifyOnTermination(String aServiceName,
String aCasReferenceId,
Exception cause) |
protected void |
setCASMessage(String aCasReferenceId,
byte[] aSerializedCAS,
javax.jms.Message msg) |
protected void |
setCASMessage(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(String aCasReferenceId,
String aSerializedCAS,
javax.jms.Message msg) |
protected void |
setCommonProperties(String aCasReferenceId,
javax.jms.Message msg,
String aSerializationStrategy) |
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 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 Semaphore sharedConnectionSemaphore
protected 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 Exception
cleanup in class BaseUIMAAsynchronousEngineCommon_implExceptionpublic String getEndPointName() throws org.apache.uima.resource.ResourceProcessException
getEndPointName in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceProcessExceptionprotected void setMetaRequestMessage(javax.jms.Message msg)
throws Exception
setMetaRequestMessage in class BaseUIMAAsynchronousEngineCommon_implExceptionprotected void setCASMessage(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(String aCasReferenceId, String aSerializedCAS, javax.jms.Message msg) throws org.apache.uima.resource.ResourceProcessException
setCASMessage in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceProcessExceptionprotected void setCASMessage(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(String aCasReferenceId, javax.jms.Message msg, 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 Exception
setCPCMessage in class BaseUIMAAsynchronousEngineCommon_implExceptionprotected void createSharedConnection(String aBrokerURI) throws Exception
Exceptionprotected javax.jms.Session getSession(String aBrokerURI) throws Exception
Exceptionprotected javax.jms.Session getSession(javax.jms.Connection aConnection)
throws Exception
Exceptionprotected javax.jms.MessageProducer lookupProducerForEndpoint(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 BaseUIMAAsynchronousEngineCommon_implExceptionpublic void initialize(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 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 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.Exceptionpublic void undeploy(String aSpringContainerId, int stop_level) throws Exception
undeploy in interface UimaAsynchronousEngineaSpringContainerId - - an id of the container to be destroyed.Exceptionprotected String deploySpringContainer(String[] springContextFiles) throws org.apache.uima.resource.ResourceInitializationException
deploySpringContainer in class BaseUIMAAsynchronousEngineCommon_implorg.apache.uima.resource.ResourceInitializationExceptionprotected void waitForServiceNotification()
throws Exception
Exceptionpublic static void main(String[] args)
public void setReleaseCASMessage(javax.jms.TextMessage msg,
String aCasReferenceId)
throws Exception
setReleaseCASMessage in class BaseUIMAAsynchronousEngineCommon_implExceptionpublic void notifyOnInitializationFailure(Exception e)
notifyOnInitializationFailure in interface ControllerCallbackListenerpublic void notifyOnInitializationSuccess()
notifyOnInitializationSuccess in interface ControllerCallbackListenerpublic void notifyOnInitializationFailure(AnalysisEngineController aController, Exception e)
notifyOnInitializationFailure in interface ControllerCallbackListenerpublic void notifyOnInitializationSuccess(AnalysisEngineController aController)
notifyOnInitializationSuccess in interface ControllerCallbackListenerpublic void notifyOnTermination(String aServiceName)
notifyOnTermination in interface ControllerCallbackListenerpublic void notifyOnTermination(String aServiceName, String aCasReferenceId, Exception cause)
protected javax.jms.MessageProducer getMessageProducer(javax.jms.Destination destination)
throws Exception
getMessageProducer in class BaseUIMAAsynchronousEngineCommon_implExceptionpublic void stopProducingCases()
stopProducingCases in interface UimaAsynchronousEnginepublic void stopProducingCases(String aCasReferenceId)
stopProducingCases in interface UimaAsynchronousEngineprotected MessageSender getDispatcher()
getDispatcher in class BaseUIMAAsynchronousEngineCommon_implpublic void notifyOnReconnecting(String aMessage)
notifyOnReconnecting in interface ControllerCallbackListenerpublic void notifyOnReconnectionSuccess()
notifyOnReconnectionSuccess in interface ControllerCallbackListenerCopyright © 2016. All rights reserved.