|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.services.discovery.ServiceDiscoveryConfiguration
public class ServiceDiscoveryConfiguration
Service discovery configuration. This configuration is used to specify information related to how a service is described in the context of the Discovery service. Each service that can be discovered is assigned a unique ID which allows another service to re-acquire a previously discovered service. Additionally, a service may specify attributes that are used to distinguish it from other services satisfying the same service types.
Refer to
ServiceDiscoveryConfigurationInterface
for details on the interface this class implements including an example
that illustrates how to access a service's service discovery configuration.
Note that a service will only have a service discovery configuration if it was deployed in the context of a Discovery service. Some services may be used outside of the context of a discovery service, in which case they will not have a service discovery configuration.
ServiceAttributeInterface,
Serialized Form| Field Summary |
|---|
| Fields inherited from interface com.sas.services.ServiceConfigurationInterface |
|---|
CONFIGURATION_METADATA_SOURCE, CONFIGURATION_SERVICE_DISCOVERY |
| Constructor Summary | |
|---|---|
ServiceDiscoveryConfiguration()
Constructs a default instance. |
|
ServiceDiscoveryConfiguration(boolean isRegistrationEnabled,
java.lang.Class[] serviceTypes,
ServiceAttributeInterface[] serviceAttributes,
java.lang.String repositoryId)
Constructs an instance using the specified registration policy. |
|
| Method Summary | |
|---|---|
boolean |
addRMIBinding(RMIBinding rmiBinding)
Adds an RMI binding. |
boolean |
addServiceAttribute(ServiceAttributeInterface serviceAttribute)
Adds a service lookup attribute. |
void |
addServiceAttributes(java.util.List<ServiceAttributeInterface> serviceAttributesList)
Adds attributes of a service that may be used to distinguish among several services that satisfy the same service types. |
void |
addServiceAttributes(ServiceAttributeInterface[] serviceAttributes)
Adds attributes of a service that may be used to distinguish among several services that satisfy the same service types. |
void |
destroy()
Destroys this configuration by removing any RMI bindings that are associated with an RMI registry. |
java.lang.String |
getDiscoveryId()
Gets an ID which may be used to locate a service using FindServiceInterface.findServiceUsingId(String). |
java.lang.String |
getJVMId()
Gets an identifier used to represent the JVM in which the service was deployed. |
java.lang.String |
getRepositoryId()
Gets the repository ID. |
ServiceAttributeInterface[] |
getServiceAttributes()
Gets attributes of a service that may be used to refine a service lookup based upon attributes. |
ServiceComponentAttribute |
getServiceComponentAttribute()
Get the ServiceComponent attribute. |
ServiceDeploymentAttribute |
getServiceDeploymentAttribute()
Get the SoftwareComponent attribute. |
java.lang.String |
getServiceFactory()
Gets the service factory. |
java.lang.String |
getServiceGroup()
Gets the service's group. |
java.lang.Class[] |
getServiceTypes()
Gets the service types by which a service wants to be advertised to clients of the Discovery service. |
boolean |
isDelegateRegistrationEnabled()
Determines whether or not a service may be registered with discovery delegates. |
boolean |
removeServiceAttribute(ServiceAttributeInterface serviceAttribute)
Removes a service lookup attribute. |
void |
setDelegateRegistrationEnabled(boolean isRegistrationEnabled)
Specifies whether or not the service should be registered with discovery delegates. |
void |
setRepositoryId(java.lang.String repositoryId)
Sets the service's repository ID. |
void |
setServiceAttributes(ServiceAttributeInterface[] serviceAttributes)
Sets attributes of a service that may be used to distinguish among several services that satisfy the same service types. |
void |
setServiceComponentAttribute(ServiceComponentAttribute serviceComponentAttribute)
Sets the ServiceComponent attribute. |
void |
setServiceDeploymentAttribute(ServiceDeploymentAttribute serviceDeploymentAttribute)
Set the SoftwareComponent attribute. |
void |
setServiceFactory(java.lang.String serviceFactory)
Sets the service factory. |
void |
setServiceGroup(java.lang.String serviceGroup)
Set the ServiceGroup attribute. |
void |
setServiceTypes(java.lang.Class[] serviceTypes)
Sets the service types a service is, extends, or implements. |
java.lang.String |
toString()
Gets a string representation of this instance. |
void |
unbindFromRMIRegistry()
Unbinds all RMI name bindings from the RMI registry. |
| Methods inherited from class com.sas.services.ServiceConfiguration |
|---|
addServiceConfiguration, getEnvironment, getInitializationObject, getServiceConfiguration, getServiceConfigurations, removeServiceConfiguration, setEnvironment, setInitializationObject |
| Constructor Detail |
|---|
public ServiceDiscoveryConfiguration()
throws ServiceException
ServiceException - if unable to initialize.
public ServiceDiscoveryConfiguration(boolean isRegistrationEnabled,
java.lang.Class[] serviceTypes,
ServiceAttributeInterface[] serviceAttributes,
java.lang.String repositoryId)
throws ServiceException
isRegistrationEnabled - Whether to expose service
to other clients outside of this JVM.serviceTypes - Types of services supported.serviceAttributes - Optional attributes that describe the service.repositoryId - Repository ID for the service.
ServiceException - if unable to initialize.| Method Detail |
|---|
public final java.lang.String getDiscoveryId()
FindServiceInterface.findServiceUsingId(String).
getDiscoveryId in interface ServiceDiscoveryConfigurationInterfacenull if undefined.public final java.lang.String getRepositoryId()
getRepositoryId in interface ServiceDiscoveryConfigurationInterfacepublic final void setRepositoryId(java.lang.String repositoryId)
repositoryId - Repository ID.public final boolean isDelegateRegistrationEnabled()
isDelegateRegistrationEnabled in interface ServiceDiscoveryConfigurationInterfacetrue if the service should be registered with
discovery delegates or false if it isn't.public final void setDelegateRegistrationEnabled(boolean isRegistrationEnabled)
setDelegateRegistrationEnabled in interface ServiceDiscoveryConfigurationInterfaceisRegistrationEnabled - true if delegate registration is to be
enabled or false if it is to be disabled.public final java.lang.Class[] getServiceTypes()
getServiceTypes in interface ServiceDiscoveryConfigurationInterfacepublic final void setServiceTypes(java.lang.Class[] serviceTypes)
setServiceTypes in interface ServiceDiscoveryConfigurationInterfaceserviceTypes - The service types that define a service. Typically
this is expressed in terms of the Java interface(s)
that the service implements, but may also include
classes that the service is or extends.public final ServiceAttributeInterface[] getServiceAttributes()
getServiceAttributes in interface ServiceDiscoveryConfigurationInterfacenull if no attributes are
associated with this service.public final void setServiceAttributes(ServiceAttributeInterface[] serviceAttributes)
setServiceAttributes in interface ServiceDiscoveryConfigurationInterfaceserviceAttributes - Attributes that may be used to describe
characteristics of a service in order to distinguish it from other
services that satisfy the same service types.public final void addServiceAttributes(ServiceAttributeInterface[] serviceAttributes)
serviceAttributes - Attributes that may be used to describe
characteristics of a service in order to distinguish it from other
services that satisfy the same service types.public final void addServiceAttributes(java.util.List<ServiceAttributeInterface> serviceAttributesList)
addServiceAttributes in interface ServiceDiscoveryConfigurationInterfaceserviceAttributesList - Attributes that may be used to describe
characteristics of a service in order to distinguish it from other
services that satisfy the same service types.public final boolean addServiceAttribute(ServiceAttributeInterface serviceAttribute)
addServiceAttribute in interface ServiceDiscoveryConfigurationInterfaceserviceAttribute - Service lookup attribute.
true if the service lookup attribute was added or
false if it wasn't.public final boolean removeServiceAttribute(ServiceAttributeInterface serviceAttribute)
removeServiceAttribute in interface ServiceDiscoveryConfigurationInterfaceserviceAttribute - Service lookup attribute to be removed.
true if the service lookup attribute was removed
or false if it wasn't.public void setServiceComponentAttribute(ServiceComponentAttribute serviceComponentAttribute)
setServiceComponentAttribute in interface ServiceDiscoveryConfigurationInterfaceserviceComponentAttribute - The ServiceComponent attribute.public final ServiceComponentAttribute getServiceComponentAttribute()
getServiceComponentAttribute in interface ServiceDiscoveryConfigurationInterfacenull if
no ServiceComponent attribute is associated with this service.public final void setServiceGroup(java.lang.String serviceGroup)
setServiceGroup in interface ServiceDiscoveryConfigurationInterfaceserviceGroup - The ServiceGroup attribute.public final java.lang.String getServiceGroup()
getServiceGroup in interface ServiceDiscoveryConfigurationInterfacepublic final java.lang.String getJVMId()
getJVMId in interface ServiceDiscoveryConfigurationInterfacenull if serialized from a 9.1.3 code base
since JVMAttribute was introduced at 9.2.public void setServiceDeploymentAttribute(ServiceDeploymentAttribute serviceDeploymentAttribute)
setServiceDeploymentAttribute in interface ServiceDiscoveryConfigurationInterfaceserviceDeploymentAttribute - The SoftwareComponent attribute.public final ServiceDeploymentAttribute getServiceDeploymentAttribute()
getServiceDeploymentAttribute in interface ServiceDiscoveryConfigurationInterfacenull if
no SoftwareComponent attribute is associated with this service.public final java.lang.String getServiceFactory()
getServiceFactory in interface ServiceDiscoveryConfigurationInterface
public final void setServiceFactory(java.lang.String serviceFactory)
throws InitializationException
setServiceFactory in interface ServiceDiscoveryConfigurationInterfaceserviceFactory - Service factory
InitializationException - if an invalid factory is specified.public final boolean addRMIBinding(RMIBinding rmiBinding)
rmiBinding - RMI binding
true if the set did not already contain
this object.public final void unbindFromRMIRegistry()
unbindFromRMIRegistry in interface ServiceDiscoveryConfigurationInterfacepublic final void destroy()
destroy in interface ServiceDiscoveryConfigurationInterfacepublic final java.lang.String toString()
toString in class java.lang.Object
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||