Class RemoteMessageConsumer
- java.lang.Object
-
- net.timewalker.ffmq4.common.session.AbstractMessageHandler
-
- net.timewalker.ffmq4.common.session.AbstractMessageConsumer
-
- net.timewalker.ffmq4.remote.session.RemoteMessageConsumer
-
- All Implemented Interfaces:
javax.jms.MessageConsumer
- Direct Known Subclasses:
RemoteQueueReceiver,RemoteTopicSubscriber
public class RemoteMessageConsumer extends AbstractMessageConsumer
RemoteMessageConsumer
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandonePrefetchingprotected PacketTransportEndpointtransportEndpoint-
Fields inherited from class net.timewalker.ffmq4.common.session.AbstractMessageConsumer
autoAcknowledge, messageListener, messageSelector, noLocal
-
Fields inherited from class net.timewalker.ffmq4.common.session.AbstractMessageHandler
closed, connection, destination, externalAccessLock, id, session
-
-
Constructor Summary
Constructors Constructor Description RemoteMessageConsumer(IntegerID consumerId, RemoteSession session, javax.jms.Destination destination, String messageSelector, boolean noLocal)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddToPrefetchQueue(AbstractMessage prefetchedMessage, boolean donePrefetching)protected voidonConsumerClose()protected AbstractMessagereceiveFromDestination(long timeout, boolean duplicateRequired)Receive a message from a destinationprotected voidremoteInit()Initialize the remote endpoint for this consumervoidsetMessageListener(javax.jms.MessageListener messageListener)protected booleanshouldLogListenersFailures()protected voidwakeUp()Wake up the consumer (SYNCHRONOUS)-
Methods inherited from class net.timewalker.ffmq4.common.session.AbstractMessageConsumer
close, getMessageListener, getMessageSelector, onConsumerClosed, receive, receive, receiveNoWait, wakeUpMessageListener
-
Methods inherited from class net.timewalker.ffmq4.common.session.AbstractMessageHandler
checkNotClosed, getEntitiesDescription, getId, getSession, toString
-
-
-
-
Field Detail
-
transportEndpoint
protected PacketTransportEndpoint transportEndpoint
-
donePrefetching
protected boolean donePrefetching
-
-
Constructor Detail
-
RemoteMessageConsumer
public RemoteMessageConsumer(IntegerID consumerId, RemoteSession session, javax.jms.Destination destination, String messageSelector, boolean noLocal) throws javax.jms.JMSException
Constructor- Throws:
javax.jms.JMSException
-
-
Method Detail
-
remoteInit
protected void remoteInit() throws javax.jms.JMSExceptionInitialize the remote endpoint for this consumer- Throws:
javax.jms.JMSException
-
shouldLogListenersFailures
protected final boolean shouldLogListenersFailures()
- Specified by:
shouldLogListenersFailuresin classAbstractMessageConsumer
-
setMessageListener
public final void setMessageListener(javax.jms.MessageListener messageListener) throws javax.jms.JMSException- Specified by:
setMessageListenerin interfacejavax.jms.MessageConsumer- Overrides:
setMessageListenerin classAbstractMessageConsumer- Throws:
javax.jms.JMSException
-
onConsumerClose
protected final void onConsumerClose()
- Overrides:
onConsumerClosein classAbstractMessageConsumer
-
addToPrefetchQueue
public final boolean addToPrefetchQueue(AbstractMessage prefetchedMessage, boolean donePrefetching)
-
receiveFromDestination
protected final AbstractMessage receiveFromDestination(long timeout, boolean duplicateRequired) throws javax.jms.JMSException
Description copied from class:AbstractMessageConsumerReceive a message from a destination- Specified by:
receiveFromDestinationin classAbstractMessageConsumer- Throws:
javax.jms.JMSException
-
wakeUp
protected final void wakeUp()
Description copied from class:AbstractMessageConsumerWake up the consumer (SYNCHRONOUS)- Specified by:
wakeUpin classAbstractMessageConsumer
-
-