Class TopicBroker

java.lang.Object
com.swiftmq.swiftlet.queue.AbstractQueue
com.swiftmq.impl.topic.standard.TopicBroker

public class TopicBroker extends com.swiftmq.swiftlet.queue.AbstractQueue
  • Field Summary

    Fields inherited from class com.swiftmq.swiftlet.queue.AbstractQueue

    ACTIVESTANDBY, AS_MESSAGE, cleanUpInterval, consumerMode, EXCLUSIVE, flowController, maxMessages, NON_PERSISTENT, persistenceMode, PERSISTENT, receiverCount, SHARED, temporary
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addStaticSubscription(String routerName, boolean keepOnUnsubscribe)
     
    protected void
    addTopic(String topic, String[] tokenizedName)
     
    void
    commit(Object transactionId)
    Commit the transaction with the given transaction id
    void
    commit(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId)
     
    void
    commit(Object transactionId, com.swiftmq.tools.concurrent.AsyncCompletionCallback callback)
     
    Creates a new pull transaction and returns a unique transaction id
    Creates a new push transaction and returns a unique transaction id
    protected List
    getMatchedTopics(String[] tokenizedPredicate)
     
    protected String
     
    protected String
    getTopicName(String[] tokenizedPredicate)
     
    protected String[]
     
    boolean
    hasReceiver(com.swiftmq.jms.MessageImpl message)
     
    boolean
    Returns if the queue is running or not
    void
     
    void
    prepare(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId)
     
    protected void
     
    void
    putMessage(Object transactionId, com.swiftmq.jms.MessageImpl msg)
     
    void
     
    protected void
     
    protected void
    removeTopic(String topic, String[] tokenizedName)
     
    void
    rollback(Object transactionId, boolean setRedelivered)
    Rolls back the transaction with the given transaction id.
    void
    rollback(Object transactionId, boolean setRedelivered, com.swiftmq.tools.concurrent.AsyncCompletionCallback callback)
     
    void
    rollback(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId, boolean setRedelivered)
     
    void
    setCompositeStoreTransaction(Object txId, com.swiftmq.swiftlet.store.CompositeStoreTransaction ct)
     
    void
     
    void
    Start the queue.
    void
    Stops the queue.
    protected void
    subscribe(TopicSubscription topicSubscription)
     
     
    void
    unlockQueue(Object txId, boolean markAsyncActive)
     
    protected void
    unsubscribe(TopicSubscription topicSubscription)
     

    Methods inherited from class com.swiftmq.swiftlet.queue.AbstractQueue

    acknowledgeMessage, acknowledgeMessage, acknowledgeMessages, addWireTapSubscriber, buildPreparedTransaction, cleanUpExpiredMessages, createView, decReceiverCount, deleteContent, deleteView, flushAccounting, getAndResetAverageLatency, getCacheSize, getCacheSizeKB, getCleanUpInterval, getCompositeStoreTransaction, getConsumedTotal, getConsumerMode, getConsumingRate, getCurrentCacheSizeKB, getCurrentCacheSizeMessages, getExpiredMessage, getFlowController, getIndexEntry, getLocalName, getMaxMessages, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessageByIndex, getMonitorAlertThreshold, getNumberQueueMessages, getPersistenceMode, getProducedTotal, getProducingRate, getQueueIndex, getQueueIndex, getQueueName, getQueueReceiverListener, getReceiverCount, incReceiverCount, isAccounting, isTemporary, moveToTransaction, moveToTransaction, moveToTransactionReturnSize, moveToTransactionReturnSize, receiverClosed, registerMessageProcessor, removeMessageByIndex, removeMessages, removeWireTapSubscriber, resetCounters, selectBaseQueue, setCleanUpInterval, setConsumerMode, setFlowController, setLocalName, setMaxMessages, setPersistenceMode, setQueueName, setQueueReceiverListener, setTemporary, startAccounting, stopAccounting, timeoutMessageProcessor, unmarkAsyncActive, unregisterMessageProcessor

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 com.swiftmq.swiftlet.queue.QueueException
      Start the queue. Will be called from the queue manager. After startup all persistent messages stored in the queue must be available.
      Overrides:
      startQueue in class com.swiftmq.swiftlet.queue.AbstractQueue
      Throws:
      com.swiftmq.swiftlet.queue.QueueException - on error
    • stopQueue

      public void stopQueue() throws com.swiftmq.swiftlet.queue.QueueException
      Stops the queue. Will be called from the queue manager
      Overrides:
      stopQueue in class com.swiftmq.swiftlet.queue.AbstractQueue
      Throws:
      com.swiftmq.swiftlet.queue.QueueException - on error
    • lockQueue

      public void lockQueue(Object txId)
      Overrides:
      lockQueue in class com.swiftmq.swiftlet.queue.AbstractQueue
    • unlockQueue

      public void unlockQueue(Object txId, boolean markAsyncActive)
      Overrides:
      unlockQueue in class com.swiftmq.swiftlet.queue.AbstractQueue
    • setCompositeStoreTransaction

      public void setCompositeStoreTransaction(Object txId, com.swiftmq.swiftlet.store.CompositeStoreTransaction ct)
      Overrides:
      setCompositeStoreTransaction in class com.swiftmq.swiftlet.queue.AbstractQueue
    • hasReceiver

      public boolean hasReceiver(com.swiftmq.jms.MessageImpl message)
      Specified by:
      hasReceiver in class com.swiftmq.swiftlet.queue.AbstractQueue
    • isRunning

      public boolean isRunning()
      Returns if the queue is running or not
      Overrides:
      isRunning in class com.swiftmq.swiftlet.queue.AbstractQueue
      Returns:
      true/false
    • createPushTransaction

      public Object createPushTransaction() throws com.swiftmq.swiftlet.queue.QueueException
      Creates a new push transaction and returns a unique transaction id
      Specified by:
      createPushTransaction in class com.swiftmq.swiftlet.queue.AbstractQueue
      Returns:
      transaction id
      Throws:
      com.swiftmq.swiftlet.queue.QueueException - on error
    • createPullTransaction

      public Object createPullTransaction() throws com.swiftmq.swiftlet.queue.QueueException
      Creates a new pull transaction and returns a unique transaction id
      Specified by:
      createPullTransaction in class com.swiftmq.swiftlet.queue.AbstractQueue
      Returns:
      transaction id
      Throws:
      com.swiftmq.swiftlet.queue.QueueException - on error
    • prepare

      public void prepare(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId) throws com.swiftmq.swiftlet.queue.QueueException
      Specified by:
      prepare in class com.swiftmq.swiftlet.queue.AbstractQueue
      Throws:
      com.swiftmq.swiftlet.queue.QueueException
    • commit

      public void commit(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId) throws com.swiftmq.swiftlet.queue.QueueException
      Specified by:
      commit in class com.swiftmq.swiftlet.queue.AbstractQueue
      Throws:
      com.swiftmq.swiftlet.queue.QueueException
    • commit

      public void commit(Object transactionId) throws com.swiftmq.swiftlet.queue.QueueException
      Commit the transaction with the given transaction id
      Specified by:
      commit in class com.swiftmq.swiftlet.queue.AbstractQueue
      Parameters:
      transactionId - transaction id
      Throws:
      com.swiftmq.swiftlet.queue.QueueException - on error
    • commit

      public void commit(Object transactionId, com.swiftmq.tools.concurrent.AsyncCompletionCallback callback)
      Specified by:
      commit in class com.swiftmq.swiftlet.queue.AbstractQueue
    • rollback

      public void rollback(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId, boolean setRedelivered) throws com.swiftmq.swiftlet.queue.QueueException
      Specified by:
      rollback in class com.swiftmq.swiftlet.queue.AbstractQueue
      Throws:
      com.swiftmq.swiftlet.queue.QueueException
    • rollback

      public void rollback(Object transactionId, boolean setRedelivered) throws com.swiftmq.swiftlet.queue.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
      Specified by:
      rollback in class com.swiftmq.swiftlet.queue.AbstractQueue
      Parameters:
      transactionId - transaction id
      setRedelivered - specifies JMS redelivery setting
      Throws:
      com.swiftmq.swiftlet.queue.QueueException - on error
    • rollback

      public void rollback(Object transactionId, boolean setRedelivered, com.swiftmq.tools.concurrent.AsyncCompletionCallback callback)
      Specified by:
      rollback in class com.swiftmq.swiftlet.queue.AbstractQueue
    • removeRemoteSubscriptions

      public void removeRemoteSubscriptions(String destination)
    • putMessage

      public void putMessage(Object transactionId, com.swiftmq.jms.MessageImpl msg) throws com.swiftmq.swiftlet.queue.QueueException
      Specified by:
      putMessage in class com.swiftmq.swiftlet.queue.AbstractQueue
      Throws:
      com.swiftmq.swiftlet.queue.QueueException
    • toString

      public String toString()
      Overrides:
      toString in class Object