|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.robokind.api.common.services.ServiceContext<ServiceClass,ServiceConfig,Param>
ServiceClass - Class of Service created in this ServiceContextServiceConfig - Class of ServiceConfig used in this ServiceContextParam - Class of the parameter used by this ServiceContextpublic class ServiceContext<ServiceClass,ServiceConfig,Param>
An ServiceContext keeps track of an attempt to create a new Service. It contains a complementary pair of ServiceConfigurationLoader and ServiceFactory where: the loader takes the given Param type the loader and connector share the same ServiceConfig class the connector returns the given Service class
| Constructor Summary | |
|---|---|
ServiceContext()
Creates an empty ServiceContext |
|
ServiceContext(ServiceConfigurationLoader<ServiceConfig,Param> loader,
ServiceFactory<ServiceClass,ServiceConfig> connector)
Creates a new ServiceContext from the given ServiceConfigurationLoader and ServiceFactory. |
|
| Method Summary | |
|---|---|
boolean |
buildService()
Builds a Service using the ServiceFactory and ServiceConfig. |
Class<ServiceConfig> |
getConfigClass()
|
VersionProperty |
getConfigFormat()
|
Param |
getLoadParameter()
Returns the load parameter. |
ServiceClass |
getService()
Returns the Service from this context. |
Class<ServiceClass> |
getServiceClass()
|
ServiceConfig |
getServiceConfiguration()
Returns the ServiceConfig loaded from the LoadParameter. |
ServiceConfigurationLoader<ServiceConfig,Param> |
getServiceConfigurationLoader()
Returns the ServiceConfigurationLoader for this ServiceContext. |
ServiceFactory<ServiceClass,ServiceConfig> |
getServiceFactory()
Return the ServiceFactory used by this ServiceContext. |
VersionProperty |
getServiceVersion()
|
boolean |
loadConfiguration()
Loads the ServiceConfig using the ServiceConfigurationLoader and LoadParameter. |
void |
setLoadParameter(Param param)
Sets the load parameter. |
void |
setServiceConfigurationLoader(ServiceConfigurationLoader<ServiceConfig,Param> loader)
Sets the ServiceConfigurationLoader for this ServiceContext. |
void |
setServiceConnector(ServiceFactory<ServiceClass,ServiceConfig> factory)
Sets the ServiceFactory to be used by this ServiceContext. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceContext()
public ServiceContext(ServiceConfigurationLoader<ServiceConfig,Param> loader,
ServiceFactory<ServiceClass,ServiceConfig> connector)
loader - ServiceConfigurationLoader of the correct typeconnector - ServiceFactory of the correct type| Method Detail |
|---|
public ServiceConfigurationLoader<ServiceConfig,Param> getServiceConfigurationLoader()
public void setServiceConfigurationLoader(ServiceConfigurationLoader<ServiceConfig,Param> loader)
loader - ServiceConfigurationLoader to usepublic ServiceFactory<ServiceClass,ServiceConfig> getServiceFactory()
public void setServiceConnector(ServiceFactory<ServiceClass,ServiceConfig> factory)
factory - ServiceFactory to be used by this ServiceContextpublic Param getLoadParameter()
public void setLoadParameter(Param param)
param - parameter passed to the ServiceConfigurationLoader to load
the ServiceConfig
public boolean loadConfiguration()
throws Exception
Exceptionpublic ServiceConfig getServiceConfiguration()
public boolean buildService()
throws Exception
Exceptionpublic ServiceClass getService()
public VersionProperty getServiceVersion()
public Class<ServiceClass> getServiceClass()
public VersionProperty getConfigFormat()
public Class<ServiceConfig> getConfigClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||