Package com.swiftmq.impl.topic.standard
Class TopicBroker
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue
com.swiftmq.impl.topic.standard.TopicBroker
- All Implemented Interfaces:
Iterable,Collection,Queue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddStaticSubscription(String routerName, boolean keepOnUnsubscribe) protected voidvoidCommit the transaction with the given transaction idvoidvoidCreates a new pull transaction and returns a unique transaction idCreates a new push transaction and returns a unique transaction idprotected ListgetMatchedTopics(String[] tokenizedPredicate) protected Stringprotected StringgetTopicName(String[] tokenizedPredicate) protected String[]booleanhasReceiver(MessageImpl message) booleanReturns if the queue is running or notvoidvoidprotected voidprocessTopicInfo(TopicInfo topicInfo) voidputMessage(Object transactionId, MessageImpl msg) voidremoveRemoteSubscriptions(String destination) protected voidremoveStaticSubscription(String routerName) protected voidremoveTopic(String topic, String[] tokenizedName) voidRolls back the transaction with the given transaction id.voidvoidvoidsetCompositeStoreTransaction(Object txId, CompositeStoreTransaction ct) voidsetSlowSubscriberCondition(SlowSubscriberCondition slowSubscriberCondition) voidStart the queue.voidStops the queue.protected voidsubscribe(TopicSubscription topicSubscription) toString()voidunlockQueue(Object txId, boolean markAsyncActive) protected voidunsubscribe(TopicSubscription topicSubscription) Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Constructor Details
-
TopicBroker
-
-
Method Details
-
getRootTopic
-
setSlowSubscriberCondition
-
addTopic
-
removeTopic
-
getTopicNames
-
getTopicName
-
getMatchedTopics
-
subscribe
-
unsubscribe
-
addStaticSubscription
-
removeStaticSubscription
-
processTopicInfo
-
startQueue
public void startQueue() throws QueueExceptionStart the queue. Will be called from the queue manager. After startup all persistent messages stored in the queue must be available.- Throws:
QueueException- on error
-
stopQueue
public void stopQueue() throws QueueExceptionStops the queue. Will be called from the queue manager- Throws:
QueueException- on error
-
lockQueue
-
unlockQueue
-
setCompositeStoreTransaction
-
hasReceiver
public boolean hasReceiver(MessageImpl message) -
isRunning
public boolean isRunning()Returns if the queue is running or not- Returns:
- true/false
-
createPushTransaction
Creates a new push transaction and returns a unique transaction id- Returns:
- transaction id
- Throws:
QueueException- on error
-
createPullTransaction
Creates a new pull transaction and returns a unique transaction id- Returns:
- transaction id
- Throws:
QueueException- on error
-
prepare
- Throws:
QueueException
-
commit
- Throws:
QueueException
-
commit
Commit the transaction with the given transaction id- Parameters:
transactionId- transaction id- Throws:
QueueException- on error
-
commit
-
rollback
public void rollback(Object localTransactionId, XidImpl globalTransactionId, boolean setRedelivered) throws QueueException - Throws:
QueueException
-
rollback
Rolls back the transaction with the given transaction id. If the flagsetRedeliveredis set then the JMS properties for redelivery and delivery count of messages pulled within this transaction are updated- Parameters:
transactionId- transaction idsetRedelivered- specifies JMS redelivery setting- Throws:
QueueException- on error
-
rollback
public void rollback(Object transactionId, boolean setRedelivered, AsyncCompletionCallback callback) -
removeRemoteSubscriptions
-
putMessage
- Throws:
QueueException
-
toString
- Overrides:
toStringin classAbstractCollection
-