***  This API provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.deployment
Class ServiceLoader

java.lang.Object
  |
  +--com.sas.services.deployment.ServiceLoader

public class ServiceLoader
extends Object

Service deployment utility that loads services based upon an Open Metadata Architecture (OMA) compliant schema. This loader may be used to deploy services or to look up remote discovery services to which previously deployed services may be registered.

In the case of service deployment, if a discovery service is specified then deployed services will be registered with the discovery service to facilitate future lookup based upon their service types and optionally service attributes.

Once services are deployed they can be discovered using the DiscoveryService.

Since:
1.0

Method Summary
static void deployServices(MetadataSourceInterface metadataSource)
          Gets a set of deployable services from the specified metadata source and registers instantiated services with the local discovery service.
static void deployServices(MetadataSourceInterface metadataSource, DiscoveryServiceInterface discoveryService)
          Gets a set of deployable services from the specified metadata source.
static void lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSource)
          Gets a set of DeployableService elements representing remote discovery services that may be available if previously deployed by foundation bootstrap process and binds them to the local discovery service.
static void lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSource, DiscoveryServiceInterface discoveryService)
          Gets a set of DeployableService elements representing remote discovery services that may be available if previously deployed by foundation bootstrap process.
static void lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSourceLookup, DiscoveryServiceInterface discoveryService, LookupPolicyInterface lookupPolicy)
          Gets a set of DeployableService elements representing remote discovery services that may be available if previously deployed by foundation bootstrap process.
static MetadataSourceInterface newMetadataSource(Properties properties)
          Deprecated. Use MetadataSourceFactory.newMetadataSource(Properties) instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookupRemoteDiscoveryServices

public static final void lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSource,
                                                       DiscoveryServiceInterface discoveryService)
                                                throws ServiceException,
                                                       ServiceLookupFailedException
Gets a set of DeployableService elements representing remote discovery services that may be available if previously deployed by foundation bootstrap process.

  1. Query OMR for all ServiceComponent elements associated with the specified SoftwareComponent that are RMI registries.
  2. Query OMR to obtain NamedService name bindings associated with each RMI registry.
  3. Determine ServiceComponent elements bound to the RMI registry that satisfy service type com.sas.services.discovery.FindServiceInterface
Parameters:
metadataSource - A source for the metadata such as an initialized instance of an OMRMetadataSource or URLMetadataSource. Note that if an OMR metadata source is specified that its connection will be closed by this method unless the metadata source's preference to be closed has been toggled off.
discoveryService - A discovery service to which deployed services will be registered.
Throws:
ServiceException - if unable to lookup remote discovery services.
ServiceLookupFailedException - if 1..* remote discovery service lookups fail.

lookupRemoteDiscoveryServices

public static final void lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSource)
                                                throws ServiceException,
                                                       ServiceLookupFailedException
Gets a set of DeployableService elements representing remote discovery services that may be available if previously deployed by foundation bootstrap process and binds them to the local discovery service.

  1. Query OMR for all ServiceComponent elements associated with the specified SoftwareComponent that are RMI registries.
  2. Query OMR to obtain NamedService name bindings associated with each RMI registry.
  3. Determine ServiceComponent elements bound to the RMI registry that satisfy service type com.sas.services.discovery.FindServiceInterface
Parameters:
metadataSource - A source for the metadata such as an initialized instance of an OMRMetadataSource or URLMetadataSource. Note that if an OMR metadata source is specified that its connection will be closed by this method unless the metadata source's preference to be closed has been toggled off.
Throws:
ServiceException - if unable to lookup remote discovery services.
ServiceLookupFailedException - if 1..* remote discovery service lookups fail.

lookupRemoteDiscoveryServices

public static final void lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSourceLookup,
                                                       DiscoveryServiceInterface discoveryService,
                                                       LookupPolicyInterface lookupPolicy)
                                                throws ServiceException,
                                                       ServiceLookupFailedException
Gets a set of DeployableService elements representing remote discovery services that may be available if previously deployed by foundation bootstrap process.

  1. Query OMR for all ServiceComponent elements associated with the specified SoftwareComponent that are RMI registries.
  2. Query OMR to obtain NamedService name bindings associated with each RMI registry.
  3. Determine ServiceComponent elements bound to the RMI registry that satisfy service type com.sas.services.discovery.FindServiceInterface
Parameters:
metadataSourceLookup - A source for the metadata such as an initialized instance of an OMRMetadataSource or URLMetadataSource. Note that if an OMR metadata source is specified that its connection will be closed by this method unless the metadata source's preference to be closed has been toggled off.
discoveryService - A discovery service to which deployed services will be registered.
lookupPolicy - null if the lookup should not be re-attempted in the event that it fails or an implementation of a lookup policy that will be used to specify whether or not subsequent attempts occur. Lookup policy implementations include LookupPolicyAttempts and LookupPolicyTimeout.
Throws:
ServiceException - if unable to lookup remote discovery services.
ServiceLookupFailedException - if 1..* remote discovery service lookups fail.

newMetadataSource

public static final MetadataSourceInterface newMetadataSource(Properties properties)
                                                       throws InitializationException
Deprecated. Use MetadataSourceFactory.newMetadataSource(Properties) instead.

Creates a metadata source based upon the specified properties. Properties can be specified in a file containing the metadata source information describing an OMR or URL metadata source.

The syntax of these files is described in the package documentation.

The following links provide sample properties files.

Parameters:
properties - Properties describing how to access the metadata source.
Returns:
Metadata source
Throws:
InitializationException - if unable to create a new metadata source.
See Also:
MetadataSourceFactory

deployServices

public static final void deployServices(MetadataSourceInterface metadataSource)
                                 throws ServiceException
Gets a set of deployable services from the specified metadata source and registers instantiated services with the local discovery service.
Parameters:
metadataSource - Metadata source from which services will be queried.
Throws:
ServiceException - if unable to deploy the services.

deployServices

public static final void deployServices(MetadataSourceInterface metadataSource,
                                        DiscoveryServiceInterface discoveryService)
                                 throws ServiceException
Gets a set of deployable services from the specified metadata source.
Parameters:
metadataSource - Metadata source from which services will be queried. Note that if an OMR metadata source is specified that its connection will be closed by this method unless the metadata source's preference to be closed has been toggled off.
discoveryService - The discovery service to which loaded services will be registered. As services are deployed they will be registered with this discovery service.
Throws:
ServiceException - if unable to deploy the services.

***  This API provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:53