|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.services.AbstractServiceFactory
public abstract class AbstractServiceFactory
Abstract foundation service factory.
A concrete subclass must implement
getService(ServiceConfigurationInterface, DiscoveryServiceInterface)
that will be used to obtain an instance of a service given the specified service
configuration.
| Constructor Summary | |
|---|---|
protected |
AbstractServiceFactory(ServiceProfile serviceProfile)
Constructs a default instance. |
| Method Summary | |
|---|---|
RemoteServiceInterface |
getService(ServiceConfigurationInterface serviceConfiguration)
Gets a service from the factory and registers it with the local discovery service. |
abstract RemoteServiceInterface |
getService(ServiceConfigurationInterface serviceConfiguration,
DiscoveryServiceInterface discoveryService)
Gets a service initialized with the specified service configuration. |
ServiceProfile |
getServiceProfile()
Gets a profile of a service which can be created by this service factory. |
boolean |
isSingletonFactory()
Determines whether or not the service factory allows only one instance of a service per application. |
| Constructor Detail |
|---|
protected AbstractServiceFactory(ServiceProfile serviceProfile)
Use this constructor if the service manufactured by the service factory does not permit is configuration to be updated in an additive manner.
serviceProfile - The service's profile.| Method Detail |
|---|
public final boolean isSingletonFactory()
isSingletonFactory in interface ServiceFactoryInterfacefalse if this factory allows creation of multiple services
by calling its
getService(ServiceConfigurationInterface, DiscoveryServiceInterface) method
or true if only one service is allowed per application.public final ServiceProfile getServiceProfile()
getServiceProfile in interface ServiceFactoryInterface
public final RemoteServiceInterface getService(ServiceConfigurationInterface serviceConfiguration)
throws ServiceException
RemoteServiceInterface is the
base interface implemented by all services.
The service obtained using this method will be registered with the
local discovery service.
Use getService(ServiceConfigurationInterface, DiscoveryServiceInterface)
if you wish to register the service with a different discovery service.
getService in interface ServiceFactoryInterfaceserviceConfiguration - Service configuration.
ServiceException - if unable to obtain a service based upon
the specified configuration.ServiceFactoryInterface.getService(ServiceConfigurationInterface, DiscoveryServiceInterface)
public abstract RemoteServiceInterface getService(ServiceConfigurationInterface serviceConfiguration,
DiscoveryServiceInterface discoveryService)
throws ServiceException
ServiceFactoryInterfaceRemoteServiceInterface is the
base interface implemented by all services.
getService in interface ServiceFactoryInterfaceserviceConfiguration - Service configuration.discoveryService - This discovery service which may be used to locate other services.
A service which can be discovered must register itself
with this discovery service.
ServiceException - if unable to obtain a service based upon
the specified configuration.ServiceFactoryInterface.getService(ServiceConfigurationInterface)
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||