org.gcube.datatransfer.common.messaging
Class ConnectionsManager

java.lang.Object
  extended by org.gcube.datatransfer.common.messaging.ConnectionsManager

public class ConnectionsManager
extends Object

Author:
Andrea Manzi(CERN)

Constructor Summary
ConnectionsManager()
           
 
Method Summary
static void addScope(org.gcube.common.core.scope.GCUBEScope scope)
          Add the Scope to the monitoredMap
static boolean checkStartScope(org.gcube.common.core.scope.GCUBEScope scope)
          Check if the given scope belongs to start scopes
static org.gcube.common.messaging.endpoints.ScheduledRetriever getBrokerRetriever(org.gcube.common.core.scope.GCUBEScope scope)
           
static javax.jms.QueueConnection getQueueConnection(org.gcube.common.core.scope.GCUBEScope scope)
          Get the QueueConnection list for the given scope
static javax.jms.TopicConnection getTopicConnection(org.gcube.common.core.scope.GCUBEScope scope)
          Get the TopicConnection for the given scope
 void init(long waitingTime, long refreshTime)
           
static void reloadConnection(org.gcube.common.core.scope.GCUBEScope scope)
          Reload the scope connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionsManager

public ConnectionsManager()
Method Detail

init

public void init(long waitingTime,
                 long refreshTime)

getTopicConnection

public static javax.jms.TopicConnection getTopicConnection(org.gcube.common.core.scope.GCUBEScope scope)
Get the TopicConnection for the given scope

Returns:
the topic Connection for the given scope

getQueueConnection

public static javax.jms.QueueConnection getQueueConnection(org.gcube.common.core.scope.GCUBEScope scope)
Get the QueueConnection list for the given scope

Returns:
the queue Connection list for the given scope

addScope

public static void addScope(org.gcube.common.core.scope.GCUBEScope scope)
                     throws org.gcube.common.messaging.endpoints.BrokerNotConfiguredInScopeException,
                            Exception
Add the Scope to the monitoredMap

Throws:
org.gcube.common.messaging.endpoints.BrokerNotConfiguredInScopeException
Exception

getBrokerRetriever

public static org.gcube.common.messaging.endpoints.ScheduledRetriever getBrokerRetriever(org.gcube.common.core.scope.GCUBEScope scope)
                                                                                  throws org.gcube.common.messaging.endpoints.BrokerNotConfiguredInScopeException,
                                                                                         Exception
Returns:
Throws:
Exception
org.gcube.common.messaging.endpoints.BrokerNotConfiguredInScopeException

reloadConnection

public static void reloadConnection(org.gcube.common.core.scope.GCUBEScope scope)
Reload the scope connection

Parameters:
scope - the scope to reload

checkStartScope

public static boolean checkStartScope(org.gcube.common.core.scope.GCUBEScope scope)
Check if the given scope belongs to start scopes

Parameters:
scope - the scope to check
Returns:
true/false


Copyright © 2013. All Rights Reserved.