public class UimaDefaultMessageListenerContainer
extends org.springframework.jms.listener.DefaultMessageListenerContainer
implements javax.jms.ExceptionListener
| Modifier and Type | Field and Description |
|---|---|
static String |
CM_PROCESS_SELECTOR_SUFFIX |
static String |
GETMETA_SELECTOR_SUFFIX |
static int |
HIGH_PRIORITY |
static String |
PROCESS_SELECTOR_SUFFIX |
static boolean |
terminating |
CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, CACHE_SESSION, DEFAULT_RECOVERY_INTERVAL, DEFAULT_THREAD_NAME_PREFIXDEFAULT_RECEIVE_TIMEOUTlifecycleMonitor, sharedConnectionMonitor| 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
|
protected void |
doInvokeListener(org.springframework.jms.listener.SessionAwareMessageListener l,
javax.jms.Session s,
javax.jms.Message m)
Callback called by Spring when it receives a messages.
|
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() |
boolean |
isGetMetaListener() |
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)
Called by Spring
|
protected void |
setModifiedTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor) |
void |
setTargetedListener() |
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, stopSharedConnectioncreateListenerConsumer, doReceiveAndExecute, getConnection, getReceiveTimeout, getSession, getTransactionManager, isSessionLocallyTransacted, receiveAndExecute, receiveMessage, setReceiveTimeout, setSessionTransacted, setTransactionManager, setTransactionName, setTransactionTimeout, shouldCommitAfterNoMessageReceivedcheckMessageListener, commitIfNecessary, createConsumer, doExecuteListener, doInvokeListener, executeListener, getDefaultSubscriptionName, getDestination, getDestinationDescription, getDurableSubscriptionName, getErrorHandler, getExceptionListener, getMessageConverter, getMessageListener, getMessageSelector, getSubscriptionName, invokeErrorHandler, invokeExceptionListener, invokeListener, isAcceptMessagesWhileStopping, isExposeListenerSession, isPubSubNoLocal, isReplyPubSubDomain, isSubscriptionDurable, isSubscriptionShared, rollbackIfNecessary, rollbackOnExceptionIfNecessary, setAcceptMessagesWhileStopping, setDestinationName, setDurableSubscriptionName, setErrorHandler, setExceptionListener, setExposeListenerSession, setMessageConverter, setPubSubNoLocal, setReplyPubSubDomain, setSubscriptionDurable, setSubscriptionName, setSubscriptionShared, setupMessageListener, validateConfigurationcreateSharedConnection, doStart, doStop, getBeanName, getClientId, getPausedTaskCount, getPhase, getSharedConnection, isActive, isAutoStartup, isRunning, logRejectedTask, prepareSharedConnection, refreshSharedConnection, rescheduleTaskIfNecessary, resumePausedTasks, runningAllowed, setAutoStartup, setBeanName, setClientId, setPhase, shutdowngetDestinationResolver, isPubSubDomain, receiveFromConsumer, resolveDestinationName, setPubSubDomainconvertJmsAccessException, createConnection, createSession, getConnectionFactory, getSessionAcknowledgeMode, isClientAcknowledge, isSessionTransacted, setSessionAcknowledgeMode, setSessionAcknowledgeModeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final String PROCESS_SELECTOR_SUFFIX
public static final String CM_PROCESS_SELECTOR_SUFFIX
public static final String GETMETA_SELECTOR_SUFFIX
public static final int HIGH_PRIORITY
public static volatile boolean terminating
public UimaDefaultMessageListenerContainer()
public UimaDefaultMessageListenerContainer(boolean freeCasQueueListener)
public void setTargetedListener()
protected void refreshConnectionUntilSuccessful()
refreshConnectionUntilSuccessful in class org.springframework.jms.listener.DefaultMessageListenerContainerprotected void recoverAfterListenerSetupFailure()
recoverAfterListenerSetupFailure in class org.springframework.jms.listener.DefaultMessageListenerContainerpublic 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.DefaultMessageListenerContainerpublic org.apache.uima.aae.controller.Endpoint getEndpoint()
protected void handleListenerException(Throwable t)
handleListenerException in class org.springframework.jms.listener.AbstractMessageListenerContainerpublic boolean isGetMetaListener()
public void initializeContainer()
public void setConcurrentConsumers(int concurrentConsumers)
setConcurrentConsumers in class org.springframework.jms.listener.DefaultMessageListenerContainerpublic void setMessageListener(Object messageListener)
setMessageListener in class org.springframework.jms.listener.AbstractMessageListenerContainerpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.jms.listener.AbstractJmsListeningContainerpublic void afterPropertiesSet(boolean propagate)
public String getDestinationName()
getDestinationName in class org.springframework.jms.listener.AbstractMessageListenerContainerpublic String getEndpointName()
public String getBrokerUrl()
public void setConnectionFactory(javax.jms.ConnectionFactory aConnectionFactory)
setConnectionFactory in class org.springframework.jms.support.JmsAccessorpublic void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver resolver)
setDestinationResolver in class org.springframework.jms.support.destination.JmsDestinationAccessorpublic void closeConnection()
throws Exception
Exceptionpublic void setDestination(javax.jms.Destination aDestination)
setDestination in class org.springframework.jms.listener.AbstractMessageListenerContainerpublic javax.jms.Destination getListenerEndpoint()
public void onException(javax.jms.JMSException arg0)
onException in interface javax.jms.ExceptionListenerpublic 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.AbstractMessageListenerContainerprotected void doInvokeListener(org.springframework.jms.listener.SessionAwareMessageListener l,
javax.jms.Session s,
javax.jms.Message m)
doInvokeListener in class org.springframework.jms.listener.AbstractMessageListenerContainerpublic void shutdownTaskExecutor(ThreadPoolExecutor tpe, boolean stopImmediate) throws InterruptedException
InterruptedExceptionpublic void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeandestroy in class org.springframework.jms.listener.AbstractJmsListeningContainerpublic 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.Lifecyclestop in class org.springframework.jms.listener.AbstractJmsListeningContainerorg.springframework.jms.JmsExceptionCopyright © 2006–2018 The Apache Software Foundation. All rights reserved.