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, uniqueIdentifier
ApplicationContext, 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, wakeUpSendThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStatusCallbackListener, collectionProcessingComplete, getCAS, getMetaData, getPerformanceReport, getSerializationStrategy, process, removeStatusCallbackListener, sendAndReceiveCAS, sendCAS, setCollectionReader
protected static Semaphore sharedConnectionSemaphore
protected InitialContext jndiContext
protected javax.jms.TextMessage createTextMessage() throws org.apache.uima.resource.ResourceInitializationException
createTextMessage
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.ResourceInitializationException
protected javax.jms.BytesMessage createBytesMessage() throws org.apache.uima.resource.ResourceInitializationException
createBytesMessage
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.ResourceInitializationException
protected void cleanup() throws Exception
cleanup
in class BaseUIMAAsynchronousEngineCommon_impl
Exception
public String getEndPointName() throws org.apache.uima.resource.ResourceProcessException
getEndPointName
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.ResourceProcessException
protected void setMetaRequestMessage(javax.jms.Message msg) throws Exception
setMetaRequestMessage
in class BaseUIMAAsynchronousEngineCommon_impl
Exception
protected void setCASMessage(String aCasReferenceId, org.apache.uima.cas.CAS aCAS, javax.jms.Message msg) throws org.apache.uima.resource.ResourceProcessException
setCASMessage
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.ResourceProcessException
protected void setCASMessage(String aCasReferenceId, String aSerializedCAS, javax.jms.Message msg) throws org.apache.uima.resource.ResourceProcessException
setCASMessage
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.ResourceProcessException
protected void setCASMessage(String aCasReferenceId, byte[] aSerializedCAS, javax.jms.Message msg) throws org.apache.uima.resource.ResourceProcessException
setCASMessage
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.ResourceProcessException
protected void setCommonProperties(String aCasReferenceId, javax.jms.Message msg, String aSerializationStrategy) throws org.apache.uima.resource.ResourceProcessException
org.apache.uima.resource.ResourceProcessException
public void stop()
UimaAsynchronousEngine
stop
in interface UimaAsynchronousEngine
public void setCPCMessage(javax.jms.Message msg) throws Exception
setCPCMessage
in class BaseUIMAAsynchronousEngineCommon_impl
Exception
protected void createSharedConnection(String aBrokerURI) throws Exception
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(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 BaseUIMAAsynchronousEngineCommon_impl
Exception
public void initialize(Map anApplicationContext) throws org.apache.uima.resource.ResourceInitializationException
anApplicationContext
map.initialize
in interface UimaAsynchronousEngine
initialize
in class BaseUIMAAsynchronousEngineCommon_impl
anApplicationContext
- - configuration containing UIMA EE Service Broker URI, service queue name, timeout
value, reply window size, and CAS Pool size.org.apache.uima.resource.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 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 org.apache.uima.resource.ResourceInitializationException
deploySpringContainer
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.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 BaseUIMAAsynchronousEngineCommon_impl
Exception
public void notifyOnInitializationFailure(Exception e)
notifyOnInitializationFailure
in interface ControllerCallbackListener
public void notifyOnInitializationSuccess()
notifyOnInitializationSuccess
in interface ControllerCallbackListener
public void notifyOnInitializationFailure(AnalysisEngineController aController, Exception e)
notifyOnInitializationFailure
in interface ControllerCallbackListener
public void notifyOnInitializationSuccess(AnalysisEngineController aController)
notifyOnInitializationSuccess
in interface ControllerCallbackListener
public void notifyOnTermination(String aServiceName)
notifyOnTermination
in interface ControllerCallbackListener
public void notifyOnTermination(String aServiceName, String aCasReferenceId, Exception cause)
protected javax.jms.MessageProducer getMessageProducer(javax.jms.Destination destination) throws Exception
getMessageProducer
in class BaseUIMAAsynchronousEngineCommon_impl
Exception
public void stopProducingCases()
stopProducingCases
in interface UimaAsynchronousEngine
public void stopProducingCases(String aCasReferenceId)
stopProducingCases
in interface UimaAsynchronousEngine
protected MessageSender getDispatcher()
getDispatcher
in class BaseUIMAAsynchronousEngineCommon_impl
public void notifyOnReconnecting(String aMessage)
notifyOnReconnecting
in interface ControllerCallbackListener
public void notifyOnReconnectionSuccess()
notifyOnReconnectionSuccess
in interface ControllerCallbackListener
Copyright © 2017. All rights reserved.