Package com.sas.services
Interface ServiceConfigurationInterface
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DiscoveryServiceConfiguration,MetadataSourceConfiguration,ServiceConfiguration,ServiceDiscoveryConfiguration
public interface ServiceConfigurationInterface
extends Serializable
The base service configuration interface optionally specifying an
object containing data necessary to initialize or reconfigure a service and
other service configurations.
Ancillary configurations might include a discovery configuration, a deployment
configuration, etc.. These "other" service configurations provide a
mechanism to separate unrelated configuration data while still providing
the service with a mechanism to look it up if necessary.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectThe lookup key associated with the metadata source configuration.static final ObjectThe lookup key associated with a service's discovery configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddServiceConfiguration(Object key, ServiceConfigurationInterface serviceConfiguration) Adds a service configuration which can be later obtained using the specified lookup key.Gets the environment object.ObjectGets an object that is to be used to configure a service.getServiceConfiguration(Object key) Gets the service configuration associated with the specified lookup key ornullif a configuration is not available.Iterator<ServiceConfigurationInterface> Gets an iterator ofServiceConfigurationInterfaceelements.voidremoveServiceConfiguration(Object key) Removes the service configuration associated with the specified key.voidsetInitializationObject(Object initializationObject) Sets an object that is to be used to configure a service.
-
Field Details
-
CONFIGURATION_SERVICE_DISCOVERY
static final Object CONFIGURATION_SERVICE_DISCOVERYThe lookup key associated with a service's discovery configuration. -
CONFIGURATION_METADATA_SOURCE
static final Object CONFIGURATION_METADATA_SOURCEThe lookup key associated with the metadata source configuration.
-
-
Method Details
-
addServiceConfiguration
Adds a service configuration which can be later obtained using the specified lookup key.- Parameters:
key- Lookup key.serviceConfiguration- Service configuration.
-
removeServiceConfiguration
void removeServiceConfiguration(Object key) Removes the service configuration associated with the specified key.- Parameters:
key- Key associated with the service configuration to be removed.
-
getServiceConfiguration
Gets the service configuration associated with the specified lookup key ornullif a configuration is not available.- Parameters:
key- Lookup key used to obtain a configuration.- Returns:
- Service configuration associated with the lookup key or
nullif one isn't available.
-
getServiceConfigurations
Iterator<ServiceConfigurationInterface> getServiceConfigurations()Gets an iterator ofServiceConfigurationInterfaceelements.- Returns:
- Iterator of service configurations.
-
getInitializationObject
Object getInitializationObject()Gets an object that is to be used to configure a service.- Returns:
- Initialization object or
nullif an initialization object is not associated with this configuration.
-
setInitializationObject
void setInitializationObject(Object initializationObject) Sets an object that is to be used to configure a service.- Parameters:
initializationObject- Object containing data to initialize or reconfigure this service.
-
getEnvironment
Environment getEnvironment()Gets the environment object. The environment object encapsulates runtime services provided by the container.- Returns:
- the environment object. May be
null.
-