org.gcube.informationsystem.cache
Class SrvRegistry

java.lang.Object
  extended by org.gcube.informationsystem.cache.SrvRegistry

public class SrvRegistry
extends java.lang.Object

Author:
paul

Constructor Summary
SrvRegistry(GCUBEScope scope)
          Constructor
 
Method Summary
 boolean addService(Srv srv)
          Add the given service
 boolean addService(java.lang.String srvClass, java.lang.String srvName)
          Add the given service
 boolean delService(Srv srv)
          Delete given service
 boolean delService(java.lang.String srvClass, java.lang.String srvName)
          Delete given service
protected  ConsistencyManagerIF getConsistencyManagerImpl()
           
 org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(Srv srv)
          Get EPRs for the given service
 org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(Srv srv, java.lang.String srvType)
          Get EPRs for the given service
 org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(java.lang.String srvClass, java.lang.String srvName)
          Get EPRs for the given service
 org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(java.lang.String srvClass, java.lang.String srvName, java.lang.String srvType)
          Get EPRs for the given service
protected  GCUBEScope getScope()
           
 Srv getService(Srv srv)
          Get all service information for the given service
 Srv getService(java.lang.String srvClass, java.lang.String srvName)
          Get all service information for the given service
 java.util.Set<Srv> getSrvs()
          Get services
protected  void setConsistencyManagerImpl(ConsistencyManagerIF cmi)
           
protected  void setScope(GCUBEScope scope)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SrvRegistry

public SrvRegistry(GCUBEScope scope)
Constructor

Parameters:
scope - scope
Method Detail

getService

public Srv getService(Srv srv)
Get all service information for the given service

Parameters:
srv - service
Returns:
all service information for the given service

getService

public Srv getService(java.lang.String srvClass,
                      java.lang.String srvName)
Get all service information for the given service

Parameters:
srvClass - service class
srvName - service name
Returns:
all service information for the given service

addService

public boolean addService(Srv srv)
Add the given service

Parameters:
srv - service to be added
Returns:
true if the service did not already exist

addService

public boolean addService(java.lang.String srvClass,
                          java.lang.String srvName)
Add the given service

Parameters:
srvClass - class of the service to be added
srvName - name of the service to be added
Returns:
true if the service did not already exist

delService

public boolean delService(Srv srv)
Delete given service

Parameters:
srv - service
Returns:
true if the given service was successfully deleted (a.k.a. it existed before)

delService

public boolean delService(java.lang.String srvClass,
                          java.lang.String srvName)
Delete given service

Parameters:
srvClass - service class
srvName - service name
Returns:
true if the given service was successfully deleted (a.k.a. it existed before)

getSrvs

public java.util.Set<Srv> getSrvs()
Get services

Returns:
set of Srv instances

getEPRsFor

public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(Srv srv)
                                                                  throws java.lang.Exception
Get EPRs for the given service

Parameters:
srv - service
Returns:
EPRs for the given service
Throws:
java.lang.Exception - in case of error

getEPRsFor

public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(java.lang.String srvClass,
                                                                         java.lang.String srvName)
                                                                  throws java.lang.Exception
Get EPRs for the given service

Parameters:
srvClass - service class
srvName - service name
Returns:
EPRs for the given service
Throws:
java.lang.Exception - in case of error

getEPRsFor

public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(Srv srv,
                                                                         java.lang.String srvType)
                                                                  throws java.lang.Exception
Get EPRs for the given service

Parameters:
srv - service
srvType - service type
Returns:
EPRs for the given service
Throws:
java.lang.Exception - in case of error

getEPRsFor

public org.apache.axis.message.addressing.EndpointReference[] getEPRsFor(java.lang.String srvClass,
                                                                         java.lang.String srvName,
                                                                         java.lang.String srvType)
                                                                  throws java.lang.Exception
Get EPRs for the given service

Parameters:
srvClass - service class
srvName - service name
srvType - service type
Returns:
EPRs for the given service
Throws:
java.lang.Exception - in case of error

getConsistencyManagerImpl

protected ConsistencyManagerIF getConsistencyManagerImpl()

setConsistencyManagerImpl

protected void setConsistencyManagerImpl(ConsistencyManagerIF cmi)

setScope

protected void setScope(GCUBEScope scope)
Parameters:
scope - the scope to set

getScope

protected GCUBEScope getScope()
Returns:
the scope