org.jboss.services.binding
Interface ServicesStore

All Known Implementing Classes:
XMLServicesStore (src)

public interface ServicesStore

Interface for API to persist, read, and look up service configs


Method Summary
 void addService(java.lang.String serverName, ObjectName (src)  serviceName, ServiceConfig (src)  serviceConfig)
          Add a ServiceConfig to the store.
 ServiceConfig (src) getService(java.lang.String serverName, ObjectName (src)  serviceName)
          Obtain a ServiceConfig object for the given server instance and target service JMX ObjectName.
 void load(java.net.URL storeURL)
          Load the contents of a store.
 void removeService(java.lang.String serverName, ObjectName (src)  serviceName)
          Remove a service configuration from the store.
 void store(java.net.URL storeURL)
          Save the current store contents
 

Method Detail

load

public void load(java.net.URL storeURL)
          throws java.lang.Exception
Load the contents of a store.

Parameters:
storeURL - the URL representing the location of the store
Throws:
java.lang.Exception - thrown on any failure to load the store

store

public void store(java.net.URL storeURL)
           throws java.lang.Exception
Save the current store contents

Parameters:
storeURL - the URL representing the location of the store
Throws:
java.lang.Exception - thrown on any failure to save the store

getService

public ServiceConfig (src)  getService(java.lang.String serverName,
                                ObjectName (src)  serviceName)
Obtain a ServiceConfig object for the given server instance and target service JMX ObjectName. This is called by the JBoss service configuration layer to obtain service attribute binding overrides.

Parameters:
serverName - the name identifying the JBoss server instance in which the service is running.
serviceName - the JMX ObjectName of the service
Returns:
The ServiceConfig if one exists for the pair, null otherwise.

addService

public void addService(java.lang.String serverName,
                       ObjectName (src)  serviceName,
                       ServiceConfig (src)  serviceConfig)
                throws DuplicateServiceException (src) 
Add a ServiceConfig to the store. This is an optional method not used by the JBoss service configuration layer.

Parameters:
serverName - the name identifying the JBoss server instance in which the service is running.
serviceName - the JMX ObjectName of the service
serviceConfig - the configuration to add
Throws:
DuplicateServiceException (src) - thrown if a configuration for the pair already exists.

removeService

public void removeService(java.lang.String serverName,
                          ObjectName (src)  serviceName)
Remove a service configuration from the store. This is an optonal method not used by the JBoss service configuration layer.

Parameters:
serverName - the name identifying the JBoss server instance in which the service is running.
serviceName - the JMX ObjectName of the service