org.gcube.messaging.common.consumer
Class CustomSubscription

java.lang.Object
  extended by java.lang.Thread
      extended by org.gcube.messaging.common.consumer.BrokerSubscription
          extended by org.gcube.messaging.common.consumer.CustomSubscription
All Implemented Interfaces:
java.lang.Runnable

public class CustomSubscription
extends BrokerSubscription

Author:
Andrea Manzi(CERN)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.messaging.common.consumer.BrokerSubscription
BrokerSubscription.TopicCouple
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CustomSubscription()
          Default subscription
 
Method Summary
 void setScope(GCUBEScope scope)
          set the scope
 void setupCustomDurableSubscriber(java.lang.String topicName, java.lang.String brokerEpr, MessageListener listener, java.lang.String... selector)
          Start a Subscriber for the specified topic using the given broker
 
Methods inherited from class org.gcube.messaging.common.consumer.BrokerSubscription
getConnections, getCouple, getListener, getMessageSelectors, onException, run, setConnections, setCouple, setListener, setMessageSelectors, setupDurableSubscribers, setupQueueSubscription, subscribe
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomSubscription

public CustomSubscription()
Default subscription

Method Detail

setupCustomDurableSubscriber

public void setupCustomDurableSubscriber(java.lang.String topicName,
                                         java.lang.String brokerEpr,
                                         MessageListener listener,
                                         java.lang.String... selector)
                                  throws java.lang.Exception
Start a Subscriber for the specified topic using the given broker

Parameters:
topicName - the topic Name
brokerEpr - the brokerEpr
listener - the Listener
selector - the message selector
Throws:
java.lang.Exception

setScope

public void setScope(GCUBEScope scope)
Description copied from class: BrokerSubscription
set the scope

Specified by:
setScope in class BrokerSubscription
Parameters:
scope - the scope to set