public class LocalSession extends AbstractSession
Implementation of a local JMS Session
| Modifier and Type | Field and Description |
|---|---|
protected FFMQEngine |
engine |
protected NotificationProxy |
notificationProxy |
acknowledgeMode, closed, connection, consumersMap, deliveryLock, externalAccessLock, id, idProvider, transacted| Constructor and Description |
|---|
LocalSession(IntegerID id,
LocalConnection connection,
FFMQEngine engine,
boolean transacted,
int acknowlegdeMode)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge()
Acknowledge the given message
|
void |
acknowledge(List<String> deliveredMessageIDs) |
void |
commit() |
void |
commit(boolean commitGets,
List<String> deliveredMessageIDs)
Commit pending put/get operations in this session
|
javax.jms.QueueBrowser |
createBrowser(IntegerID browserId,
javax.jms.Queue queueRef,
String messageSelector) |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queueRef,
String messageSelector) |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
String messageSelector,
boolean noLocal) |
javax.jms.MessageConsumer |
createConsumer(IntegerID consumerId,
javax.jms.Destination destination,
String messageSelector,
boolean noLocal)
Create a consumer with the given id
|
javax.jms.TopicSubscriber |
createDurableSubscriber(IntegerID consumerId,
javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
boolean noLocal) |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
boolean noLocal) |
javax.jms.MessageProducer |
createProducer(javax.jms.Destination destination) |
javax.jms.TemporaryQueue |
createTemporaryQueue() |
javax.jms.TemporaryTopic |
createTemporaryTopic() |
protected void |
deleteQueue(String queueName)
Delete a queue
|
void |
dispatch(AbstractMessage message)
Called from producers when sending a message
|
long |
getConsumedCount()
Get the number of messages actually consumed by this session
|
NotificationProxy |
getNotificationProxy() |
long |
getProducedCount()
Get the number of messages actually produced by this session
|
protected TransactionSet |
getTransactionSet() |
protected void |
onSessionClose() |
void |
recover() |
void |
recover(List<String> deliveredMessageIDs) |
void |
rollback() |
void |
rollback(boolean rollbackGets,
List<String> deliveredMessageIDs)
Rollback pending put/get operations in this session
|
void |
rollbackUndelivered(List<String> undeliveredMessageIDs)
Rollback undelivered get operations in this session
|
void |
setNotificationProxy(NotificationProxy notificationProxy) |
String |
toString() |
void |
unsubscribe(String subscriptionName) |
checkNotClosed, checkTemporaryDestinationScope, close, createBrowser, createBytesMessage, createConsumer, createConsumer, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createQueue, createStreamMessage, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getConnection, getConsumersCount, getEntitiesDescription, getId, getMessageListener, getProducersCount, getTransacted, lookupRegisteredBrowser, lookupRegisteredConsumer, onSessionClosed, registerBrowser, registerConsumer, registerProducer, run, setMessageListener, unregisterBrowser, unregisterConsumer, unregisterProducer, waitForDeliverySync, wakeUpConsumersprotected FFMQEngine engine
protected NotificationProxy notificationProxy
public LocalSession(IntegerID id, LocalConnection connection, FFMQEngine engine, boolean transacted, int acknowlegdeMode)
public final void setNotificationProxy(NotificationProxy notificationProxy)
notificationProxy - the notificationProxy to setpublic final NotificationProxy getNotificationProxy()
public final void dispatch(AbstractMessage message) throws javax.jms.JMSException
message - message to dispatchjavax.jms.JMSExceptionpublic final void commit()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final void commit(boolean commitGets,
List<String> deliveredMessageIDs)
throws javax.jms.JMSException
commitGets - deliveredMessageIDs - javax.jms.JMSExceptionpublic final void rollback()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final void rollback(boolean rollbackGets,
List<String> deliveredMessageIDs)
throws javax.jms.JMSException
rollbackGets - deliveredMessageIDs - javax.jms.JMSExceptionpublic final void rollbackUndelivered(List<String> undeliveredMessageIDs) throws javax.jms.JMSException
undeliveredMessageIDs - javax.jms.JMSExceptionprotected final TransactionSet getTransactionSet()
protected void onSessionClose()
onSessionClose in class AbstractSessionpublic javax.jms.QueueBrowser createBrowser(javax.jms.Queue queueRef,
String messageSelector)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.QueueBrowser createBrowser(IntegerID browserId, javax.jms.Queue queueRef, String messageSelector) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.MessageConsumer createConsumer(IntegerID consumerId, javax.jms.Destination destination, String messageSelector, boolean noLocal) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.TopicSubscriber createDurableSubscriber(IntegerID consumerId, javax.jms.Topic topic, String subscriptionName, String messageSelector, boolean noLocal) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.MessageProducer createProducer(javax.jms.Destination destination)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final void recover()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final void recover(List<String> deliveredMessageIDs) throws javax.jms.JMSException
javax.jms.JMSExceptionrollback(boolean, List)public void unsubscribe(String subscriptionName) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.TemporaryQueue createTemporaryQueue()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.TemporaryTopic createTemporaryTopic()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final void acknowledge()
throws javax.jms.JMSException
AbstractSessionacknowledge in class AbstractSessionjavax.jms.JMSExceptionpublic final void acknowledge(List<String> deliveredMessageIDs) throws javax.jms.JMSException
javax.jms.JMSExceptioncommit(boolean,List)protected final void deleteQueue(String queueName) throws javax.jms.JMSException
queueName - javax.jms.JMSExceptionpublic final long getProducedCount()
public final long getConsumedCount()
public String toString()
toString in class AbstractSessionCopyright © 2019. All rights reserved.