|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.deployment.ServiceLoader
public class ServiceLoader
Service deployment utility that loads services based upon an Open Metadata Architecture (OMA) 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
.
Method Summary | |
---|---|
static java.util.List |
deployServices(MetadataSourceInterface metadataSource)
Gets a set of services from the specified metadata source and registers instantiated services with the local discovery service . |
static java.util.List |
deployServices(MetadataSourceInterface metadataSource,
DiscoveryServiceInterface discoveryService)
Gets a set of deployable services from the specified metadata source. |
static java.util.List |
deployServices(MetadataSourceInterface metadataSource,
Environment environment,
DiscoveryServiceInterface discoveryService)
Gets a set of services from the specified metadata source. |
static java.util.List |
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 java.util.List |
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 java.util.List |
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. |
Method Detail |
---|
public static final java.util.List lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSource, DiscoveryServiceInterface discoveryService) throws ServiceException, ServiceLookupFailedException
DeployableService
elements representing
remote discovery services that may be available if previously
deployed by foundation bootstrap process.
ServiceComponent
elements associated
with the specified SoftwareComponent
that are
RMI registries.NamedService
name bindings associated
with each RMI registry.ServiceComponent
elements bound to the
RMI registry that satisfy service type
com.sas.services.discovery.FindServiceInterface
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.
FindServiceInterface
that can be used to locate other services.
ServiceException
- if unable to lookup remote discovery services.
ServiceLookupFailedException
- if 1..* remote discovery service
lookups fail.public static final java.util.List lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSource) throws ServiceException, ServiceLookupFailedException
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.
ServiceComponent
elements associated
with the specified SoftwareComponent
that are
RMI registries.NamedService
name bindings associated
with each RMI registry.ServiceComponent
elements bound to the
RMI registry that satisfy service type
com.sas.services.discovery.FindServiceInterface
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.
FindServiceInterface
that can be used to locate other services.
ServiceException
- if unable to lookup remote discovery services.
ServiceLookupFailedException
- if 1..* remote discovery service
lookups fail.public static final java.util.List lookupRemoteDiscoveryServices(MetadataSourceInterface metadataSourceLookup, DiscoveryServiceInterface discoveryService, LookupPolicyInterface lookupPolicy) throws ServiceException, ServiceLookupFailedException
DeployableService
elements representing
remote discovery services that may be available if previously
deployed by foundation bootstrap process.
ServiceComponent
elements associated
with the specified SoftwareComponent
that are
RMI registries.NamedService
name bindings associated
with each RMI registry.ServiceComponent
elements bound to the
RMI registry that satisfy service type
com.sas.services.discovery.FindServiceInterface
The caller is responsible for destroying the deployed services by calling the destroy()
method on
{DiscoveryService.defaultInstance()
when the application
is terminated.
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
.
FindServiceInterface
that can be used to locate other services.
ServiceException
- if unable to lookup remote discovery services.
ServiceLookupFailedException
- if 1..* remote discovery service
lookups fail.public static final java.util.List deployServices(MetadataSourceInterface metadataSource) throws ServiceDeploymentException, ServiceException
local discovery service
.
The caller is responsible for destroying the deployed services by calling the destroy()
method on
{DiscoveryService.defaultInstance()
when the application
is terminated.
metadataSource
- Metadata source from which services will be queried.
RemoteServiceInterface
objects representing
foundation services which were successfully deployed.
ServiceDeploymentException
- if unable to deploy services. This
exception will cite the cause of the failure and provide a list of
services which were successfully deployed. This exception is a subclass
of ServiceException.
ServiceException
- if unable to deploy the services.public static final java.util.List deployServices(MetadataSourceInterface metadataSource, DiscoveryServiceInterface discoveryService) throws ServiceDeploymentException, ServiceException
The caller is responsible for destroying the deployed services by calling the
destroy()
method on the discovery service when the application
is terminated.
metadataSource
- Metadata source from which services will be queried.discoveryService
- The discovery service to which loaded services
will be registered. As services are deployed
they will be registered with this
discovery service.
RemoteServiceInterface
objects representing
foundation services which were successfully deployed.
ServiceDeploymentException
- if unable to deploy services. This
exception will cite the cause of the failure and provide a list of
services which were successfully deployed. This exception is a subclass
of ServiceException.
ServiceException
- if unable to deploy the services.public static final java.util.List deployServices(MetadataSourceInterface metadataSource, Environment environment, DiscoveryServiceInterface discoveryService) throws ServiceDeploymentException, ServiceException
The caller is responsible for destroying the deployed services by calling the
destroy()
method on the discovery service when the application
is terminated.
metadataSource
- Metadata source from which services will be queried.environment
- The Environment object encapsulates resources provided by
the container. It is made available to the services as
they are deployed.discoveryService
- The discovery service to which loaded services
will be registered. As services are deployed
they will be registered with this
discovery service.
RemoteServiceInterface
objects representing
foundation services which were successfully deployed.
ServiceDeploymentException
- if unable to deploy services. This
exception will cite the cause of the failure and provide a list of
services which were successfully deployed. This exception is a subclass
of ServiceException.
ServiceException
- if unable to deploy the services.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |