|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 implementation.
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 AuthenticationServiceInterface
would be named "AuthenticationServiceFactory".
An abstract implementation of a service factory
AbstractServiceFactory
is available to be subclassed.
Method Summary | |
---|---|
RemoteServiceInterface |
getService(ServiceConfigurationInterface serviceConfiguration)
Gets a service that has been initialized with the specified service configuration. |
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. |
Method Detail |
---|
RemoteServiceInterface getService(ServiceConfigurationInterface serviceConfiguration) throws ServiceException
RemoteServiceInterface
is the
base interface implemented by all services.
serviceConfiguration
- Service configuration.
ServiceException
- if unable to obtain a service based upon
the specified configuration.RemoteServiceInterface getService(ServiceConfigurationInterface serviceConfiguration, DiscoveryServiceInterface discoveryService) throws ServiceException
RemoteServiceInterface
is the
base interface implemented by all services.
serviceConfiguration
- 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.boolean isSingletonFactory()
false
if this factory allows creation of multiple services
by calling getService method or true
if only one service is
allowed per application.ServiceProfile getServiceProfile()
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |