|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.deployment.DeployableService
public class DeployableService
A deployable service is an object that represents a foundation service that can
be deployed by the ServiceLoader
utility.
It represents a foundation service which is utltimately defined in terms of an
Open Metadata Architecture (OMA) metadata schema.
During the process of
querying a metadata source for a foundation service deployment the creation of a
DeployableService
represents a conversion from an OMA metadata
representation into an alternative representation that is more suited for
use in the foundation service deployment domain.
Constructor Summary | |
---|---|
protected |
DeployableService()
Constructs a default instance. |
protected |
DeployableService(java.lang.String id,
ServiceConfigurationInterface serviceConfiguration)
Constructs an instance using the specified OMA ID for the metadata ServiceComponent that represents the foundation service. |
|
DeployableService(java.lang.String id,
ServiceConfigurationInterface serviceConfiguration,
java.lang.String[] dependencies)
Constructs an instance using the specified OMA ID for the metadata ServiceComponent that represents the foundation service. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object deployableService)
Compares two DeployableService objects to
determine ordering based upon their stated service
dependencies. |
RemoteServiceInterface |
deploy()
Deploys a service by constructing a service factory and asking it to manufacture a service for a specified service configuration. |
RemoteServiceInterface |
deploy(DiscoveryServiceInterface discoveryService)
Deploys a service by constructing a service factory and asking it to manufacture a service for a specified service configuration. |
boolean |
equals(java.lang.Object other)
Determines whether or not the other object equals this object. |
java.util.Set |
getDependencies()
Gets an iterator of the services on which this service depends. |
java.lang.String |
getId()
Gets the service's metadata ID. |
ServiceConfigurationInterface |
getServiceConfiguration()
Gets the service configuration. |
java.lang.String |
getServiceFactory()
Gets the name of the class that will serve as the factory used to manufacture an instance of this service. |
int |
hashCode()
Gets a hash code for this service attribute. |
void |
setDependencies(java.util.Set dependencies)
Gets an iterator of the services on which this service depends. |
java.lang.String |
toString()
Gets a string representation of this instance. |
Constructor Detail |
---|
protected DeployableService()
protected DeployableService(java.lang.String id, ServiceConfigurationInterface serviceConfiguration) throws ServiceException
ServiceComponent
that represents the foundation service.
Additionally a service configuration is specified that contains data
that the service will use during initialization. Optional dependencies
upon other services may also be specified. These dependencies are used
to ensure that this service is not instaniated until all services on
which it depends have been instantiated.
id
- Service's IDserviceConfiguration
- Deployable service's initialization configuration
that will be provided to the service factory.
ServiceException
- if unable to construct an instance.public DeployableService(java.lang.String id, ServiceConfigurationInterface serviceConfiguration, java.lang.String[] dependencies) throws ServiceException
ServiceComponent
that represents the foundation service.
Additionally a service configuration is specified that contains data
that the service will use during initialization. Optional dependencies
upon other services may also be specified. These dependencies are used
to ensure that this service is not instaniated until all services on
which it depends have been instantiated.
id
- Deployable service's repository ID.serviceConfiguration
- Deployable service's initialization configuration
that will be provided to the service factory.dependencies
- A set of 0..* service repository IDs upon which this service
depends. This service can not be deployed until these other
services are deployed. A null
parameter value
indicates that there are no other dependencies.
ServiceException
- if unable to construct an instance.Method Detail |
---|
public final ServiceConfigurationInterface getServiceConfiguration()
public final java.util.Set getDependencies()
String
representing an ID
value associated with the service.
String
.public final void setDependencies(java.util.Set dependencies)
String
representing an ID
value associated with the service.
dependencies
- Set containing 0..* elements of type String
representing a service ID on which this service depends.public final java.lang.String getId()
ServiceComponent
's Id
attribute.
public java.lang.String toString()
toString
in class java.lang.Object
public RemoteServiceInterface deploy() throws ServiceException
deploy
in interface DeployInterface
ServiceException
- if unable to deploy the service.public RemoteServiceInterface deploy(DiscoveryServiceInterface discoveryService) throws ServiceException
discoveryService
- The discovery service to which the service should register
if it wants to be located by other services or null
if the deployed service should not be registered.
ServiceException
- if unable to deploy the service.public final java.lang.String getServiceFactory()
public final int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- Other object.
true
if the objects are equivalent.public final int compareTo(java.lang.Object deployableService)
DeployableService
objects to
determine ordering based upon their stated service
dependencies.
compareTo
in interface java.lang.Comparable
deployableService
- A DeployableService
whose service
dependencies are to be compared to this service's
dependencies.
1
if the deployable service should
be deployed before this service
-1
otherwise.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |