public class UimaDefaultMessageListenerContainer
extends org.springframework.jms.listener.DefaultMessageListenerContainer
implements javax.jms.ExceptionListener
Modifier and Type | Field and Description |
---|---|
static boolean |
terminating |
CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, CACHE_SESSION, DEFAULT_RECOVERY_INTERVAL, DEFAULT_THREAD_NAME_PREFIX
DEFAULT_RECEIVE_TIMEOUT
Constructor and Description |
---|
UimaDefaultMessageListenerContainer() |
UimaDefaultMessageListenerContainer(boolean freeCasQueueListener) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
afterPropertiesSet(boolean propagate)
Called by Spring and some Uima AS components when all properties have been set.
|
void |
closeConnection()
Closes shares connection to a broker
|
void |
delegateStop() |
void |
destroy() |
void |
destroy(boolean stopImmediate)
Spins a shutdown thread and stops Sprint and ActiveMQ threads.
|
void |
doDestroy()
Delegate shutdown to the super class
|
String |
getBrokerUrl() |
String |
getDestinationName() |
org.apache.uima.aae.controller.Endpoint |
getEndpoint() |
String |
getEndpointName() |
javax.jms.Destination |
getListenerEndpoint() |
org.springframework.core.task.TaskExecutor |
getTaskExecutor() |
protected void |
handleListenerException(Throwable t) |
protected void |
handleListenerSetupFailure(Throwable t,
boolean alreadyHandled)
This method is called by Spring when a listener fails
|
void |
initializeContainer() |
boolean |
isFreeCasQueueListener() |
void |
onException(javax.jms.JMSException arg0) |
protected void |
recoverAfterListenerSetupFailure() |
protected void |
refreshConnectionUntilSuccessful()
Overriden Spring's method that tries to recover from lost connection.
|
void |
setConcurrentConsumers(int concurrentConsumers)
Intercept Spring call to increment number of consumer threads.
|
void |
setConnectionFactory(javax.jms.ConnectionFactory aConnectionFactory) |
void |
setController(org.apache.uima.aae.controller.AnalysisEngineController aController) |
void |
setDestination(javax.jms.Destination aDestination) |
void |
setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver resolver) |
void |
setMessageListener(Object messageListener)
Intercept Spring call to inject application Pojo listener.
|
void |
setMessageSelector(String messageSelector) |
protected void |
setModifiedTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor) |
void |
setTargetEndpoint(org.apache.uima.aae.controller.Endpoint anEndpoint) |
void |
setTaskExecutor(org.springframework.core.task.TaskExecutor aTaskExecutor)
Called by Spring to inject TaskExecutor
|
void |
setTerminating() |
void |
shutdownTaskExecutor(ThreadPoolExecutor tpe,
boolean stopImmediate) |
void |
stop() |
applyBackOffTime, createDefaultTaskExecutor, doInitialize, doRescheduleTask, doShutdown, establishSharedConnection, getActiveConsumerCount, getCacheLevel, getConcurrentConsumers, getIdleConsumerLimit, getIdleTaskExecutionLimit, getMaxConcurrentConsumers, getMaxMessagesPerTask, getScheduledConsumerCount, initialize, isRecovering, isRegisteredWithDestination, messageReceived, noMessageReceived, refreshDestination, scheduleNewInvokerIfAppropriate, setBackOff, setCacheLevel, setCacheLevelName, setConcurrency, setIdleConsumerLimit, setIdleTaskExecutionLimit, setMaxConcurrentConsumers, setMaxMessagesPerTask, setRecoveryInterval, setTaskExecutor, sharedConnectionEnabled, start, startSharedConnection, stop, stopSharedConnection
createListenerConsumer, doReceiveAndExecute, getConnection, getSession, getTransactionManager, isSessionLocallyTransacted, receiveAndExecute, receiveMessage, setReceiveTimeout, setSessionTransacted, setTransactionManager, setTransactionName, setTransactionTimeout, shouldCommitAfterNoMessageReceived
checkMessageListener, commitIfNecessary, createConsumer, doExecuteListener, doInvokeListener, doInvokeListener, executeListener, getDefaultSubscriptionName, getDestination, getDestinationDescription, getDurableSubscriptionName, getErrorHandler, getExceptionListener, getMessageConverter, getMessageListener, getMessageSelector, getSubscriptionName, invokeErrorHandler, invokeExceptionListener, invokeListener, isAcceptMessagesWhileStopping, isExposeListenerSession, isPubSubNoLocal, isSubscriptionDurable, isSubscriptionShared, rollbackIfNecessary, rollbackOnExceptionIfNecessary, setAcceptMessagesWhileStopping, setDestinationName, setDurableSubscriptionName, setErrorHandler, setExceptionListener, setExposeListenerSession, setMessageConverter, setPubSubNoLocal, setSubscriptionDurable, setSubscriptionName, setSubscriptionShared, setupMessageListener, validateConfiguration
createSharedConnection, doStart, doStop, getBeanName, getClientId, getPausedTaskCount, getPhase, getSharedConnection, isActive, isAutoStartup, isRunning, logRejectedTask, prepareSharedConnection, refreshSharedConnection, rescheduleTaskIfNecessary, resumePausedTasks, runningAllowed, setAutoStartup, setBeanName, setClientId, setPhase, shutdown
getDestinationResolver, isPubSubDomain, resolveDestinationName, setPubSubDomain
convertJmsAccessException, createConnection, createSession, getConnectionFactory, getSessionAcknowledgeMode, isClientAcknowledge, isSessionTransacted, setSessionAcknowledgeMode, setSessionAcknowledgeModeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public UimaDefaultMessageListenerContainer()
public UimaDefaultMessageListenerContainer(boolean freeCasQueueListener)
protected void refreshConnectionUntilSuccessful()
refreshConnectionUntilSuccessful
in class org.springframework.jms.listener.DefaultMessageListenerContainer
protected void recoverAfterListenerSetupFailure()
recoverAfterListenerSetupFailure
in class org.springframework.jms.listener.DefaultMessageListenerContainer
public void setTerminating()
public void setController(org.apache.uima.aae.controller.AnalysisEngineController aController)
protected void handleListenerSetupFailure(Throwable t, boolean alreadyHandled)
handleListenerSetupFailure
in class org.springframework.jms.listener.DefaultMessageListenerContainer
public org.apache.uima.aae.controller.Endpoint getEndpoint()
protected void handleListenerException(Throwable t)
handleListenerException
in class org.springframework.jms.listener.AbstractMessageListenerContainer
public void initializeContainer()
public void setConcurrentConsumers(int concurrentConsumers)
setConcurrentConsumers
in class org.springframework.jms.listener.DefaultMessageListenerContainer
public void setMessageListener(Object messageListener)
setMessageListener
in class org.springframework.jms.listener.AbstractMessageListenerContainer
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.jms.listener.AbstractJmsListeningContainer
public void afterPropertiesSet(boolean propagate)
public String getDestinationName()
getDestinationName
in class org.springframework.jms.listener.AbstractMessageListenerContainer
public String getEndpointName()
public String getBrokerUrl()
public void setConnectionFactory(javax.jms.ConnectionFactory aConnectionFactory)
setConnectionFactory
in class org.springframework.jms.support.JmsAccessor
public void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver resolver)
setDestinationResolver
in class org.springframework.jms.support.destination.JmsDestinationAccessor
public void closeConnection() throws Exception
Exception
public void setDestination(javax.jms.Destination aDestination)
setDestination
in class org.springframework.jms.listener.AbstractMessageListenerContainer
public javax.jms.Destination getListenerEndpoint()
public void onException(javax.jms.JMSException arg0)
onException
in interface javax.jms.ExceptionListener
public void setTargetEndpoint(org.apache.uima.aae.controller.Endpoint anEndpoint)
public boolean isFreeCasQueueListener()
protected void setModifiedTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
public void doDestroy()
public void setMessageSelector(String messageSelector)
setMessageSelector
in class org.springframework.jms.listener.AbstractMessageListenerContainer
public void shutdownTaskExecutor(ThreadPoolExecutor tpe, boolean stopImmediate) throws InterruptedException
InterruptedException
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
destroy
in class org.springframework.jms.listener.AbstractJmsListeningContainer
public void destroy(boolean stopImmediate)
public void setTaskExecutor(org.springframework.core.task.TaskExecutor aTaskExecutor)
public org.springframework.core.task.TaskExecutor getTaskExecutor()
public void delegateStop()
public void stop() throws org.springframework.jms.JmsException
stop
in interface org.springframework.context.Lifecycle
stop
in class org.springframework.jms.listener.AbstractJmsListeningContainer
org.springframework.jms.JmsException
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.