*** This class provides Binary Compatibility only, not Source Compatibility ***

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:
  • 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:
      addServiceConfiguration in interface ServiceConfigurationInterface
      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 is null or not serializable.
    • removeServiceConfiguration

      public final void removeServiceConfiguration(Object key)
      Removes the ancillary service configuration associated with the specified key.
      Specified by:
      removeServiceConfiguration in interface ServiceConfigurationInterface
      Parameters:
      key - Ancillary service configuration lookup key.
    • getServiceConfiguration

      public final ServiceConfigurationInterface getServiceConfiguration(Object key)
      Gets the ancillary service configuration associated with the specified key.
      Specified by:
      getServiceConfiguration in interface ServiceConfigurationInterface
      Parameters:
      key - Ancillary service configuration lookup key.
      Returns:
      Ancillary service configuration associated with the specified lookup key or null if a configuration is not defined for the key.
    • getServiceConfigurations

      public final Iterator<ServiceConfigurationInterface> getServiceConfigurations()
      Gets an iterator of all of the ancillary service configurations. The iterated type will be ServiceConfigurationInterface.
      Specified by:
      getServiceConfigurations in interface ServiceConfigurationInterface
      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:
      getInitializationObject in interface ServiceConfigurationInterface
      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:
      setInitializationObject in interface ServiceConfigurationInterface
      Parameters:
      initializationObject - Object containing data to initialize or reconfigure a service.
    • getEnvironment

      public final Environment getEnvironment()
      Gets the environment object. The environment object encapsulates runtime services provided by the container.
      Specified by:
      getEnvironment in interface ServiceConfigurationInterface
      Returns:
      the environment object. May be null.
    • setEnvironment

      public final void setEnvironment(Environment environment)
      Sets the environment object. The environment object encapsulates runtime services provided by the container.
      Parameters:
      environment - the environment object.