|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.services.AbstractServiceFactory
An abstract service factory class which provides a concrete
implementation of getDependentServiceInterfaces()
that specifies no service dependencies.
This method should be overridden if a service
manufactured by the factory depends upon other services being
available.
| Constructor Summary | |
protected |
AbstractServiceFactory()
Constructs a default instance. |
protected |
AbstractServiceFactory(ServiceComponentConfigInterface serviceComponentConfiguration)
Constructs an instance specifying the service component's configuration that governs the configuration metadata that may be used to initialize or re-configure the service component. |
| 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. |
abstract RemoteServiceInterface |
getService(ServiceConfigurationInterface serviceConfiguration)
Gets a service initialized with the specified service configuration. |
ServiceComponentConfigInterface |
getServiceComponentConfiguration()
Gets the service component's configuration. |
protected void |
mergeServiceConfiguration(ServiceComponent serviceComponent,
Node serviceConfigurationToAdd)
Merges the service configuration. |
void |
updateServiceConfiguration(ServiceComponent serviceComponent,
Node serviceConfigurationToAdd)
Updates the service's configuration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected AbstractServiceFactory()
Use this constructor if the service manufactured by the service factory does not permit is configuration to be updated in an additive manner and does not return a singleton service.
Use AbstractServiceFactory(ServiceComponentConfigInterface serviceComponentConfiguration)
to construct an instance specifying whether or not the
service's configuration may be updated in an additive manner.
protected AbstractServiceFactory(ServiceComponentConfigInterface serviceComponentConfiguration)
Use AbstractServiceFactory()
to construct an instance of a factory which manufactures
a service whose configuration may not be updated in an additive manner.
serviceComponentConfiguration - The service component's configuration.| Method Detail |
public abstract RemoteServiceInterface getService(ServiceConfigurationInterface serviceConfiguration)
throws ServiceException
getService in interface ServiceFactoryInterfaceserviceConfiguration - Configuration to be used to initialize the service.ServiceException - if unable to obtain the service.public String[] getDependentServiceInterfaces()
getService(ServiceConfigurationInterface)
method is invoked. This abstract factory does not specify
any service dependencies so a zero length array is returned.
Override this default method implementation if there are
1..* service dependencies.getDependentServiceInterfaces in interface ServiceFactoryInterface
public void updateServiceConfiguration(ServiceComponent serviceComponent,
Node serviceConfigurationToAdd)
throws ServiceException
serviceComponent - The service component whose configuration is to be updated
by adding the accompanying configuration.serviceConfigurationToAdd - The configuration to be added to the service's current
configuration.ServiceException - if unable to update the service's
configuration.IllegalArgumentException - if a null
service component or configuration is specified.
protected void mergeServiceConfiguration(ServiceComponent serviceComponent,
Node serviceConfigurationToAdd)
throws ServiceException
serviceComponent - The service whose configuration is to be updated by merging the specified
configuration.serviceConfigurationToAdd - The service configuration which is to be merged into the service's
current configuration. Note that this configuration must not conflict
with the current configuration or a ServiceException will be thrown
to indicate that the merge request was rejected.ServiceException - public final ServiceComponentConfigInterface getServiceComponentConfiguration()
getServiceComponentConfiguration in interface ServiceFactoryInterfacenull if a
configuration is not defined.
|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||