|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceDiscoveryConfigurationInterface
Interface describing a service discovery configuration consisting of
Each discoverable service will be associated with a unique ID. This ID may be used by a client to re-acquire a previously discovered service from the Discovery service.
While services are primarily looked up based upon the service types they
implement, service attributes may optionally be associated to provide
additional filtering criteria. Optional service attributes are specified
as part of a service's
com.sas.services.discovery.ServiceDiscoveryConfiguration
. If a
service has a service discovery configuration it will be accessible as
follows:
String serviceDiscoveryId = null; final ServiceConfigurationInterface serviceConfig = service.getServiceConfiguration(); if (serviceConfig != null) { final ServiceDiscoveryConfigurationInterface serviceDiscoveryConfig = serviceConfig.getServiceConfiguration( ServiceConfigurationInterface.CONFIGURATION_SERVICE_DISCOVERY); if ((serviceDiscoveryConfig != null) && (serviceDiscoveryConfig instanceof ServiceDiscoveryConfigurationInterface)) { serviceDiscoveryId = ((ServiceDiscoveryConfigurationInterface) serviceDiscoveryConfig).getDiscoveryId(); } }
Method Summary | |
---|---|
boolean |
addServiceAttribute(ServiceAttributeInterface serviceAttribute)
Adds a service lookup attribute. |
void |
addServiceAttributes(java.util.List serviceAttributes)
Adds service lookup attributes. |
void |
destroy()
Destroys this configuration. |
java.lang.String |
getDiscoveryId()
Gets an ID associated with a service that's registered with the discovery service. |
java.lang.String |
getJVMId()
Gets an identifier used to represent the JVM in which the service was deployed. |
java.lang.String |
getRepositoryId()
Gets the ID associated with the repository instance of a metadata ServiceComponent element. |
ServiceAttributeInterface[] |
getServiceAttributes()
Gets optional attributes that may be provided to specify additional lookup criteria about a service. |
ServiceComponentAttribute |
getServiceComponentAttribute()
Get the ServiceComponent attribute. |
ServiceDeploymentAttribute |
getServiceDeploymentAttribute()
Get the attribute that represents the service's deployment. |
java.lang.String |
getServiceFactory()
Gets the fully qualified name of the Java class that serves as the services factory. |
java.lang.String |
getServiceGroup()
Gets the name of the service's deployment group. |
java.lang.Class[] |
getServiceTypes()
Gets the service types supported by the service. |
boolean |
isDelegateRegistrationEnabled()
Determines whether or not the service should be registered with discovery delegates. |
boolean |
removeServiceAttribute(ServiceAttributeInterface serviceAttribute)
Removes a service lookup attribute. |
void |
setDelegateRegistrationEnabled(boolean isDelegateRegistrationEnabled)
Sets the service discovery registration policy. |
void |
setServiceAttributes(ServiceAttributeInterface[] serviceAttributes)
Sets optional attributes that may be provided to specify additional lookup criteria about a service. |
void |
setServiceComponentAttribute(ServiceComponentAttribute serviceComponentAttribute)
Set the ServiceComponent attribute. |
void |
setServiceDeploymentAttribute(ServiceDeploymentAttribute serviceDeploymentAttribute)
Sets the attribute that represents the service deployment that contains the service. |
void |
setServiceFactory(java.lang.String serviceFactory)
Sets the fully qualified name of the Java class that serves as the services factory. |
void |
setServiceGroup(java.lang.String serviceGroup)
Set the name of the service's deployment group. |
void |
setServiceTypes(java.lang.Class[] serviceTypes)
Sets service types that a service is, extends, or implements. |
void |
unbindFromRMIRegistry()
Unbinds any RMI name bindings from the RMI registry. |
Method Detail |
---|
java.lang.String getDiscoveryId()
java.lang.String getRepositoryId()
ServiceComponent
element.
boolean isDelegateRegistrationEnabled()
true
if registration is enabled or
false
if it isn't.void setDelegateRegistrationEnabled(boolean isDelegateRegistrationEnabled)
isDelegateRegistrationEnabled
- true
if the service
is to be registered with discovery delegates or false
if it isn't.java.lang.Class[] getServiceTypes()
void setServiceTypes(java.lang.Class[] serviceTypes) throws ServiceException
serviceTypes
- Service types supported by the service.
ServiceException
- if no service types are specified.ServiceAttributeInterface[] getServiceAttributes()
null
if no attributes
are associated with this service.void setServiceAttributes(ServiceAttributeInterface[] serviceAttributes)
serviceAttributes
- Service attributes or null
if no
attributes are associated with this service.boolean addServiceAttribute(ServiceAttributeInterface serviceAttribute)
serviceAttribute
- Service lookup attribute.
true
if the service lookup attribute was added or
false
if it wasn't.void addServiceAttributes(java.util.List serviceAttributes)
serviceAttributes
- List of ServiceAttributeInterface
.boolean removeServiceAttribute(ServiceAttributeInterface serviceAttribute)
serviceAttribute
- Service lookup attribute to be removed.
true
if the service lookup attribute was removed
or false
if it wasn't.java.lang.String getServiceFactory()
ServiceFactoryInterface
.
ServiceFactoryInterface
.void setServiceFactory(java.lang.String serviceFactory) throws InitializationException
ServiceFactoryInterface
.
serviceFactory
- Fully qualified Java name of a class that serves as a service's
factory. This class must implement
ServiceFactoryInterface
.
InitializationException
- if an invalid service factory is
specified.void setServiceComponentAttribute(ServiceComponentAttribute serviceComponentAttribute)
serviceComponentAttribute
- The ServiceComponent attribute.ServiceComponentAttribute getServiceComponentAttribute()
null
if
no ServiceComponent attribute is associated with this service.void setServiceGroup(java.lang.String serviceGroup)
serviceGroup
- The service's deployment group. This
corresponds to the name of the Tree
that represents
service's group.java.lang.String getServiceGroup()
Tree
.java.lang.String getJVMId()
void setServiceDeploymentAttribute(ServiceDeploymentAttribute serviceDeploymentAttribute)
serviceDeploymentAttribute
- The attribute that represents the service deployment,
SoftwareComponent
, that contains the service.ServiceDeploymentAttribute getServiceDeploymentAttribute()
SoftwareComponent
.
null
if
no service deployment attribute is associated with this service.void unbindFromRMIRegistry()
void destroy()
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |