*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services
Class ServiceConfiguration
java.lang.Object
com.sas.services.ServiceConfiguration
- All Implemented Interfaces:
ServiceConfigurationInterface,Serializable
- Direct Known Subclasses:
DiscoveryServiceConfiguration,MetadataSourceConfiguration,ServiceDiscoveryConfiguration
@SASScope("ALL")
@BinaryCompatibilityOnly
public class ServiceConfiguration
extends Object
implements ServiceConfigurationInterface
Configuration data for a service.
A map is employed to store a service's various configurations.
- Since:
- 1.0
- See Also:
-
Field Summary
Fields inherited from interface com.sas.services.ServiceConfigurationInterface
CONFIGURATION_METADATA_SOURCE, CONFIGURATION_SERVICE_DISCOVERY -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default instance of a service configuration which is basically a map of 0..* ancillary configurations.ServiceConfiguration(Object initializationObject) Constructs an instance with the specified initialization object. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddServiceConfiguration(Object key, ServiceConfigurationInterface serviceConfiguration) Adds a service configuration keyed by the specified value.final EnvironmentGets the environment object.final ObjectGets an object that is to be used to initialize or reconfigure a service.getServiceConfiguration(Object key) Gets the ancillary service configuration associated with the specified key.final Iterator<ServiceConfigurationInterface> Gets an iterator of all of the ancillary service configurations.final voidremoveServiceConfiguration(Object key) Removes the ancillary service configuration associated with the specified key.final voidsetEnvironment(Environment environment) Sets the environment object.final voidsetInitializationObject(Object initializationObject) Sets an object that is to be used to initialize or reconfigure a service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ServiceConfiguration
public ServiceConfiguration()Constructs a default instance of a service configuration which is basically a map of 0..* ancillary configurations. -
ServiceConfiguration
public ServiceConfiguration(Object initializationObject) Constructs an instance with the specified initialization object. This initialization object will only be used by the service in the instantiating process. Its attribute is marked transient to prevent it from being marshaled to remote clients.- Parameters:
initializationObject- An object to be used to initialize.
-
-
Method Details
-
addServiceConfiguration
public final void addServiceConfiguration(Object key, ServiceConfigurationInterface serviceConfiguration) Adds a service configuration keyed by the specified value. Note that the service configuration must be serializable.- Specified by:
addServiceConfigurationin interfaceServiceConfigurationInterface- Parameters:
key- Key to be associated with this configuration.serviceConfiguration- A configuration to be associated with the service using the specified key.- Throws:
IllegalArgumentException- if a parameter is specified which isnullor not serializable.
-
removeServiceConfiguration
public final void removeServiceConfiguration(Object key) Removes the ancillary service configuration associated with the specified key.- Specified by:
removeServiceConfigurationin interfaceServiceConfigurationInterface- Parameters:
key- Ancillary service configuration lookup key.
-
getServiceConfiguration
Gets the ancillary service configuration associated with the specified key.- Specified by:
getServiceConfigurationin interfaceServiceConfigurationInterface- Parameters:
key- Ancillary service configuration lookup key.- Returns:
- Ancillary service configuration associated with the
specified lookup key or
nullif a configuration is not defined for the key.
-
getServiceConfigurations
Gets an iterator of all of the ancillary service configurations. The iterated type will beServiceConfigurationInterface.- Specified by:
getServiceConfigurationsin interfaceServiceConfigurationInterface- Returns:
- Iterator of ancillary configurations.
-
getInitializationObject
public final Object getInitializationObject()Gets an object that is to be used to initialize or reconfigure a service.- Specified by:
getInitializationObjectin interfaceServiceConfigurationInterface- Returns:
- Initialization object
-
setInitializationObject
public final void setInitializationObject(Object initializationObject) Sets an object that is to be used to initialize or reconfigure a service.- Specified by:
setInitializationObjectin interfaceServiceConfigurationInterface- Parameters:
initializationObject- Object containing data to initialize or reconfigure a service.
-
getEnvironment
Gets the environment object. The environment object encapsulates runtime services provided by the container.- Specified by:
getEnvironmentin interfaceServiceConfigurationInterface- Returns:
- the environment object. May be
null.
-
setEnvironment
Sets the environment object. The environment object encapsulates runtime services provided by the container.- Parameters:
environment- the environment object.
-