Sonic ESB API

com.sonicsw.esb.mgmtapi.config
Interface IServiceConfigAPI


public interface IServiceConfigAPI

A collection of methods to manipulate Service related configurations in a Domain. The basic entities are:

  1. Service Type - defines the class implementing the service, init and runtime parameters etc.
  2. Service configuration - defines a parameterized instance of a service type. It provides values for init and runtime parameters, entry, exit, fault and rme endpoints etc.
  3. A deployed service configuration is a named entry in an ESB container, connecting a service configuration with one or more containers in which the configuration should be deployed.

Service types and Service configurations are named uniquely across a domain.

A deploy service configuration is not an entity that can be manipulated directly, it just establishes the connection between the service configuration and the container. The same configuration can be deployed in multiple containers, e.g. to allow scaling-out of popular services.

Service types can not be created by the API, they can only be imported from artifacts created by the development tools.


Method Summary
 IServiceConfig createServiceConfig(java.lang.String name, java.lang.String serviceTypeName)
          Create a new XQ Service configuration.
 void deleteServiceConfig(java.lang.String name)
          Delete the service named configuration
 void deleteServiceType(java.lang.String serviceTypeName)
          Delete the named service type.
 java.lang.String exportService(java.lang.String name)
          Export the specified Service configuration.
 java.lang.String exportServiceType(java.lang.String name)
          Export the specified Service type.
 IServiceConfig getServiceConfig(java.lang.String name)
          Retrieve the configuration details for a given XQ service configuration.
 IServiceTypeConfig getServiceType(java.lang.String name)
          Given a service type name, retrieve an object representing its configuration
 IServiceConfig importService(java.lang.String configurationContent, boolean overwrite)
          Import the specified XQ service configuration into the DS
 void importServiceProperties(java.lang.String serviceName, java.lang.String serviceProperties)
          Import service properties into the DS.
 IServiceTypeConfig importServiceType(java.lang.String serviceTypeContent, boolean overwrite)
          import a new service type from an XML source.
 java.lang.String[] listContainersWithService(java.lang.String serviceName)
          Find all (XQ) containers with a particular service configuration deployed
 java.lang.String[] listContainersWithServiceType(java.lang.String serviceTypeName)
          Find all (XQ) containers with a service configuration deployed of the named service type.
 java.lang.String[] listServiceConfigOfType(java.lang.String serviceTypeName)
          Find all the service configurations in the domain of the given service type, and return an array of their names.
 java.lang.String[] listServiceConfigs()
          return the names of all configured services.
 java.lang.String[] listServiceTypes()
          list all service types defined in the given domain
 void saveService(IServiceConfig service)
          Persist changes made to the service into the DS.
 void saveServiceType(IServiceTypeConfig service)
          Persist changes made to the service type into the DS.
 

Method Detail

getServiceConfig

IServiceConfig getServiceConfig(java.lang.String name)
Retrieve the configuration details for a given XQ service configuration.

Parameters:
name - - the service configuration's name
Returns:
an object representing the configured service instance or null if it does not exist

createServiceConfig

IServiceConfig createServiceConfig(java.lang.String name,
                                   java.lang.String serviceTypeName)
Create a new XQ Service configuration.

Parameters:
name - - the new service confgiuration's name
serviceTypeName - - the service type for this service configuration.
Returns:
the newly created service configuration

deleteServiceConfig

void deleteServiceConfig(java.lang.String name)
Delete the service named configuration

Parameters:
name - - the configuration name to be deleted. No validation is performed - if instances of this service configuration are deployed in containers, bad things will happen.

importService

IServiceConfig importService(java.lang.String configurationContent,
                             boolean overwrite)
Import the specified XQ service configuration into the DS

Parameters:
configurationContent - - the XML representation of an XQ service configuration. use utility classes to retrieve for external storage.

exportService

java.lang.String exportService(java.lang.String name)
Export the specified Service configuration. This includes endpoints and init parameters.

Parameters:
name - - the service configuration's name to be exported.
Returns:
the XML representation of an XQ service configuration.

saveService

void saveService(IServiceConfig service)
Persist changes made to the service into the DS. This will update all service related information including: init parameter values, service type, enpoint information etc.

Parameters:
service - the service to be saved

listServiceConfigs

java.lang.String[] listServiceConfigs()
return the names of all configured services.

Returns:
an array containing the names of all service configuration instances.

getServiceType

IServiceTypeConfig getServiceType(java.lang.String name)
Given a service type name, retrieve an object representing its configuration

Parameters:
name - - the service type name
Returns:
a configuration object representing the service type.

deleteServiceType

void deleteServiceType(java.lang.String serviceTypeName)
Delete the named service type.

Parameters:
serviceTypeName -

importServiceType

IServiceTypeConfig importServiceType(java.lang.String serviceTypeContent,
                                     boolean overwrite)
import a new service type from an XML source.

Parameters:
serviceTypeContent - - a string containing the DS XML representation of a service type
overwrite - - true to overwrite existing configuration with the same service type name
Returns:
an object representing the service type configuration just imported

importServiceProperties

void importServiceProperties(java.lang.String serviceName,
                             java.lang.String serviceProperties)
Import service properties into the DS. Properties provide metadata for the service's parameters.

Parameters:
serviceName - - the service with which the properties are associated with
serviceProperties - - the content of the service's properties file

exportServiceType

java.lang.String exportServiceType(java.lang.String name)
Export the specified Service type.

Parameters:
name - - the service type's name to be exported.
Returns:
the XML representation of an XQ service type.

saveServiceType

void saveServiceType(IServiceTypeConfig service)
Persist changes made to the service type into the DS. This will update all service type related information including: classpath information.

Parameters:
service -

listServiceTypes

java.lang.String[] listServiceTypes()
list all service types defined in the given domain

Returns:
an array of strings for all known service types.

listServiceConfigOfType

java.lang.String[] listServiceConfigOfType(java.lang.String serviceTypeName)
Find all the service configurations in the domain of the given service type, and return an array of their names. Note that service configuration names are unique per domain.

Parameters:
serviceTypeName - - the desired service type name.
Returns:
an array of all the service configurations' names of the given service type.

listContainersWithService

java.lang.String[] listContainersWithService(java.lang.String serviceName)
Find all (XQ) containers with a particular service configuration deployed

Parameters:
serviceName - - the service configuration name
Returns:
an array of strings containing the names of XQ containers with the named service configuration deployed.

listContainersWithServiceType

java.lang.String[] listContainersWithServiceType(java.lang.String serviceTypeName)
Find all (XQ) containers with a service configuration deployed of the named service type.

Parameters:
serviceTypeName - - the service type name
Returns:
an array of strings containing the names of XQ containers with the a service deployed of the named service type

Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.