public abstract class AbstractServiceFactory extends java.lang.Object implements ServiceFactory
ServiceFactory
implementation.Constructor and Description |
---|
AbstractServiceFactory()
Creates a new
AbstractServiceFactory . |
Modifier and Type | Method and Description |
---|---|
Service |
create(DynObject parameters,
ServiceManager serviceManager)
Creates a new
Service . |
DynObject |
createParameters()
Creates the parameters for the
Service created by this factory. |
protected abstract DynClass |
createParametersDynClass()
|
protected abstract Service |
doCreate(DynObject parameters,
ServiceManager serviceManager)
Creates a new
Service with the given parameters and
ServiceManager . |
java.lang.String |
getName()
Returns the name of the services created by this factory.
|
protected void |
setParametersDynClass(DynClass parametersDynClass)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize
public AbstractServiceFactory()
AbstractServiceFactory
.public java.lang.String getName()
ServiceFactory
getName
in interface ServiceFactory
public DynObject createParameters()
ServiceFactory
Service
created by this factory.createParameters
in interface ServiceFactory
public final Service create(DynObject parameters, ServiceManager serviceManager) throws ServiceException
ServiceFactory
Service
.create
in interface ServiceFactory
parameters
- for the Service
serviceManager
- to be used by the Service
Service
ServiceException
- if the parameters are not valid or there is an error creating
the Service
protected void setParametersDynClass(DynClass parametersDynClass)
parametersDynClass
- the parameters DynClass
protected abstract Service doCreate(DynObject parameters, ServiceManager serviceManager) throws ServiceException
Service
with the given parameters and
ServiceManager
.parameters
- to create the Service
serviceManager
- to be used by the Service
ServiceException
- if the parameters are not valid or there is an error creating
the Service