com.sas.services
Interface ServiceFactoryInterface

All Known Implementing Classes:
AbstractServiceFactory

public interface ServiceFactoryInterface

An interface used to acquire an implementation of a service based upon a desired service configuration. Each service must provide its own factory implmentation.

A naming convention of "XxxServiceFactory.java" is suggested where "Xxx" represents the service type. For example, a factory used to get an instance of a LoggingServiceInterface would be named "LoggingServiceFactory".

An abstract implementation of a service factory AbstractServiceFactory is available to be subclassed.

Since:
1.0

Method Summary
 String[] getDependentServiceInterfaces()
          Gets an array of strings representing the Java interfaces of service(s) which must be available at the time this factory's getService(ServiceConfigurationInterface) method is invoked.
 RemoteServiceInterface getService(ServiceConfigurationInterface serviceConfiguration)
          Gets a service that has been initialized with the specified service configuration.
 ServiceComponentConfigInterface getServiceComponentConfiguration()
          Gets the service component's configuration.
 

Method Detail

getService

public RemoteServiceInterface getService(ServiceConfigurationInterface serviceConfiguration)
                                  throws ServiceException
Gets a service that has been initialized with the specified service configuration. RemoteServiceInterface is the base interface implemented by all services.
Parameters:
serviceConfiguration - Service configuration.
Returns:
service implementation
Throws:
ServiceException - if unable to obtain a service based upon the specified configuration.

getDependentServiceInterfaces

public String[] getDependentServiceInterfaces()
Gets an array of strings representing the Java interfaces of service(s) which must be available at the time this factory's getService(ServiceConfigurationInterface) method is invoked.
Returns:
0..* Java interfaces implemented by services that must be available at the time the service factory is asked to get a service. For example, if the user service depends upon a logging service, then the user service would return "com.sas.services.logging.LoggingServiceInterface". If there are no dependencies upon any other services then a zero length array should be returned.

getServiceComponentConfiguration

public ServiceComponentConfigInterface getServiceComponentConfiguration()
Gets the service component's configuration.
Returns:
Service component's configuration or null if a service configuration is not available for this service.




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:52