Class TopicBroker

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue
com.swiftmq.impl.topic.standard.TopicBroker
All Implemented Interfaces:
Iterable, Collection, Queue

public class TopicBroker extends AbstractQueue
  • Constructor Details

  • Method Details

    • getRootTopic

      protected String getRootTopic()
    • setSlowSubscriberCondition

      public void setSlowSubscriberCondition(SlowSubscriberCondition slowSubscriberCondition)
    • addTopic

      protected void addTopic(String topic, String[] tokenizedName)
    • removeTopic

      protected void removeTopic(String topic, String[] tokenizedName)
    • getTopicNames

      protected String[] getTopicNames()
    • getTopicName

      protected String getTopicName(String[] tokenizedPredicate)
    • getMatchedTopics

      protected List getMatchedTopics(String[] tokenizedPredicate)
    • subscribe

      protected void subscribe(TopicSubscription topicSubscription)
    • unsubscribe

      protected void unsubscribe(TopicSubscription topicSubscription)
    • addStaticSubscription

      protected void addStaticSubscription(String routerName, boolean keepOnUnsubscribe)
    • removeStaticSubscription

      protected void removeStaticSubscription(String routerName)
    • processTopicInfo

      protected void processTopicInfo(TopicInfo topicInfo)
    • startQueue

      public void startQueue() throws QueueException
      Start 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 QueueException
      Stops the queue. Will be called from the queue manager
      Throws:
      QueueException - on error
    • lockQueue

      public void lockQueue(Object txId)
    • unlockQueue

      public void unlockQueue(Object txId, boolean markAsyncActive)
    • setCompositeStoreTransaction

      public void setCompositeStoreTransaction(Object txId, CompositeStoreTransaction ct)
    • hasReceiver

      public boolean hasReceiver(MessageImpl message)
    • isRunning

      public boolean isRunning()
      Returns if the queue is running or not
      Returns:
      true/false
    • createPushTransaction

      public Object createPushTransaction() throws QueueException
      Creates a new push transaction and returns a unique transaction id
      Returns:
      transaction id
      Throws:
      QueueException - on error
    • createPullTransaction

      public Object createPullTransaction() throws QueueException
      Creates a new pull transaction and returns a unique transaction id
      Returns:
      transaction id
      Throws:
      QueueException - on error
    • prepare

      public void prepare(Object localTransactionId, XidImpl globalTransactionId) throws QueueException
      Throws:
      QueueException
    • commit

      public void commit(Object localTransactionId, XidImpl globalTransactionId) throws QueueException
      Throws:
      QueueException
    • commit

      public void commit(Object transactionId) throws QueueException
      Commit the transaction with the given transaction id
      Parameters:
      transactionId - transaction id
      Throws:
      QueueException - on error
    • commit

      public void commit(Object transactionId, AsyncCompletionCallback callback)
    • rollback

      public void rollback(Object localTransactionId, XidImpl globalTransactionId, boolean setRedelivered) throws QueueException
      Throws:
      QueueException
    • rollback

      public void rollback(Object transactionId, boolean setRedelivered) throws QueueException
      Rolls back the transaction with the given transaction id. If the flag setRedelivered is set then the JMS properties for redelivery and delivery count of messages pulled within this transaction are updated
      Parameters:
      transactionId - transaction id
      setRedelivered - specifies JMS redelivery setting
      Throws:
      QueueException - on error
    • rollback

      public void rollback(Object transactionId, boolean setRedelivered, AsyncCompletionCallback callback)
    • removeRemoteSubscriptions

      public void removeRemoteSubscriptions(String destination)
    • putMessage

      public void putMessage(Object transactionId, MessageImpl msg) throws QueueException
      Throws:
      QueueException
    • toString

      public String toString()
      Overrides:
      toString in class AbstractCollection