public class LocalMessageConsumer extends AbstractMessageConsumer
Implementation of a local JMS MessageConsumer
| Modifier and Type | Field and Description |
|---|---|
protected FFMQEngine |
engine |
protected MessageSelector |
parsedSelector |
autoAcknowledge, messageListener, messageSelector, noLocalclosed, connection, destination, externalAccessLock, id, session| Constructor and Description |
|---|
LocalMessageConsumer(FFMQEngine engine,
LocalSession session,
javax.jms.Destination destination,
String messageSelector,
boolean noLocal,
IntegerID consumerId,
String subscriberId)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
LocalQueue |
getLocalQueue()
Get the local queue associated to this consumer
|
boolean |
getNoLocal() |
MessageSelector |
getParsedSelector()
Get the parsed message selector for this consumer
|
int |
getPrefetchSize() |
MessageSelector |
getReceiveSelector()
Get the parsed message selector for this consumer to be used
when receiving a message from the local queue
|
protected Settings |
getSettings() |
String |
getSubscriberId() |
protected void |
initDestination() |
boolean |
isDurable()
Test if the consumer is durable
|
protected void |
onConsumerClose() |
protected void |
onConsumerClosed() |
void |
prefetchMore() |
AbstractMessage |
receiveFromDestination(long timeout,
boolean duplicateRequired)
Receive a message from a destination
|
void |
restorePrefetchCapacity(int amount) |
void |
setMessageListener(javax.jms.MessageListener messageListener) |
protected boolean |
shouldLogListenersFailures() |
void |
wakeUp()
Wake up the consumer (SYNCHRONOUS)
|
close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, wakeUpMessageListenercheckNotClosed, getEntitiesDescription, getId, getSession, toStringprotected FFMQEngine engine
protected MessageSelector parsedSelector
public LocalMessageConsumer(FFMQEngine engine, LocalSession session, javax.jms.Destination destination, String messageSelector, boolean noLocal, IntegerID consumerId, String subscriberId) throws javax.jms.JMSException
javax.jms.JMSExceptionprotected final boolean shouldLogListenersFailures()
shouldLogListenersFailures in class AbstractMessageConsumerpublic final int getPrefetchSize()
protected final Settings getSettings()
protected final void initDestination()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final void setMessageListener(javax.jms.MessageListener messageListener)
throws javax.jms.JMSException
setMessageListener in interface javax.jms.MessageConsumersetMessageListener in class AbstractMessageConsumerjavax.jms.JMSExceptionpublic boolean isDurable()
public final MessageSelector getParsedSelector()
public final MessageSelector getReceiveSelector()
protected final void onConsumerClose()
onConsumerClose in class AbstractMessageConsumerprotected final void onConsumerClosed()
onConsumerClosed in class AbstractMessageConsumerpublic final AbstractMessage receiveFromDestination(long timeout, boolean duplicateRequired) throws javax.jms.JMSException
AbstractMessageConsumerreceiveFromDestination in class AbstractMessageConsumerjavax.jms.JMSExceptionpublic final void wakeUp()
throws javax.jms.JMSException
AbstractMessageConsumerwakeUp in class AbstractMessageConsumerjavax.jms.JMSExceptionpublic final void prefetchMore()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final void restorePrefetchCapacity(int amount)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final boolean getNoLocal()
public final LocalQueue getLocalQueue()
public final String getSubscriberId()
Copyright © 2019. All rights reserved.