|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl
public class BaseUIMAAsynchronousEngine_impl
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl |
---|
BaseUIMAAsynchronousEngineCommon_impl.ClientRequest, BaseUIMAAsynchronousEngineCommon_impl.ClientState, BaseUIMAAsynchronousEngineCommon_impl.SharedConnection, BaseUIMAAsynchronousEngineCommon_impl.ThreadMonitor, BaseUIMAAsynchronousEngineCommon_impl.UimaASShutdownHook |
Field Summary | |
---|---|
protected javax.naming.InitialContext |
jndiContext
|
protected static java.util.concurrent.Semaphore |
sharedConnectionSemaphore
|
Fields inherited from interface org.apache.uima.aae.client.UimaAsynchronousEngine |
---|
ApplicationContext, ApplicationName, CasPoolSize, CpcTimeout, DD2SpringXsltFilePath, Endpoint, GetMetaTimeout, ReplyWindow, SaxonClasspath, SerializationStrategy, ServerUri, ShadowCasPoolSize, SharedConnection, Timeout, UimaEeDebug |
Constructor Summary | |
---|---|
BaseUIMAAsynchronousEngine_impl()
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.uima.aae.client.UimaAsynchronousEngine |
---|
addStatusCallbackListener, collectionProcessingComplete, getCAS, getMetaData, getPerformanceReport, getSerializationStrategy, process, removeStatusCallbackListener, sendAndReceiveCAS, sendCAS, setCollectionReader |
Methods inherited from interface javax.jms.MessageListener |
---|
onMessage |
Field Detail |
---|
protected static java.util.concurrent.Semaphore sharedConnectionSemaphore
protected javax.naming.InitialContext jndiContext
Constructor Detail |
---|
public BaseUIMAAsynchronousEngine_impl()
Method Detail |
---|
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 java.lang.Exception
cleanup
in class BaseUIMAAsynchronousEngineCommon_impl
java.lang.Exception
public java.lang.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 java.lang.Exception
setMetaRequestMessage
in class BaseUIMAAsynchronousEngineCommon_impl
java.lang.Exception
protected 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_impl
org.apache.uima.resource.ResourceProcessException
protected void setCASMessage(java.lang.String aCasReferenceId, java.lang.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(java.lang.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(java.lang.String aCasReferenceId, javax.jms.Message msg, java.lang.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 java.lang.Exception
setCPCMessage
in class BaseUIMAAsynchronousEngineCommon_impl
java.lang.Exception
protected void createSharedConnection(java.lang.String aBrokerURI) throws java.lang.Exception
java.lang.Exception
protected javax.jms.Session getSession(java.lang.String aBrokerURI) throws java.lang.Exception
java.lang.Exception
protected javax.jms.Session getSession(javax.jms.Connection aConnection) throws java.lang.Exception
java.lang.Exception
protected javax.jms.MessageProducer lookupProducerForEndpoint(Endpoint anEndpoint) throws java.lang.Exception
java.lang.Exception
protected void initializeProducer(java.lang.String aBrokerURI, java.lang.String aQueueName) throws java.lang.Exception
java.lang.Exception
protected void initializeProducer(java.lang.String aBrokerURI, java.lang.String aQueueName, javax.jms.Connection aConnection) throws java.lang.Exception
java.lang.Exception
protected void initializeConsumer(java.lang.String aBrokerURI) throws java.lang.Exception
aBrokerURI
-
java.lang.Exception
protected void initializeConsumer(java.lang.String aBrokerURI, javax.jms.Connection connection) throws java.lang.Exception
initializeConsumer
in class BaseUIMAAsynchronousEngineCommon_impl
java.lang.Exception
public void initialize(java.util.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 java.lang.String deploy(java.lang.String aDeploymentDescriptor, java.util.Map anApplicationContext) throws java.lang.Exception
deploy
in interface UimaAsynchronousEngine
aDeploymentDescriptor
- - deployment descriptor to generate Spring Context fromanApplicationContext
- - a Map containing properties required by dd2spring
java.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
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 services
java.lang.Exception
- - if there was a problem deploying the container or UIMA AS services.public void undeploy() throws java.lang.Exception
java.lang.Exception
public void undeploy(java.lang.String aSpringContainerId) throws java.lang.Exception
UimaAsynchronousEngine
undeploy
in interface UimaAsynchronousEngine
aSpringContainerId
- - an id of the container to be destroyed.
java.lang.Exception
public void undeploy(java.lang.String aSpringContainerId, int stop_level) throws java.lang.Exception
undeploy
in interface UimaAsynchronousEngine
aSpringContainerId
- - an id of the container to be destroyed.
java.lang.Exception
protected java.lang.String deploySpringContainer(java.lang.String[] springContextFiles) throws org.apache.uima.resource.ResourceInitializationException
deploySpringContainer
in class BaseUIMAAsynchronousEngineCommon_impl
org.apache.uima.resource.ResourceInitializationException
protected void waitForServiceNotification() throws java.lang.Exception
java.lang.Exception
protected void deployEmbeddedBroker() throws java.lang.Exception
java.lang.Exception
public 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_impl
java.lang.Exception
public void notifyOnInitializationFailure(java.lang.Exception e)
notifyOnInitializationFailure
in interface ControllerCallbackListener
public void notifyOnInitializationSuccess()
notifyOnInitializationSuccess
in interface ControllerCallbackListener
public void notifyOnInitializationFailure(AnalysisEngineController aController, java.lang.Exception e)
notifyOnInitializationFailure
in interface ControllerCallbackListener
public void notifyOnInitializationSuccess(AnalysisEngineController aController)
notifyOnInitializationSuccess
in interface ControllerCallbackListener
public void notifyOnTermination(java.lang.String aServiceName)
notifyOnTermination
in interface ControllerCallbackListener
public 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_impl
java.lang.Exception
public void stopProducingCases()
stopProducingCases
in interface UimaAsynchronousEngine
public void stopProducingCases(java.lang.String aCasReferenceId)
stopProducingCases
in interface UimaAsynchronousEngine
protected MessageSender getDispatcher()
getDispatcher
in class BaseUIMAAsynchronousEngineCommon_impl
public void notifyOnReconnecting(java.lang.String aMessage)
notifyOnReconnecting
in interface ControllerCallbackListener
public void notifyOnReconnectionSuccess()
notifyOnReconnectionSuccess
in interface ControllerCallbackListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |