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> extends Object
| Constructor and Description |
|---|
ServiceContext()
Creates an empty ServiceContext
|
ServiceContext(ConfigurationLoader<ServiceConfig,Param> loader,
ServiceFactory<ServiceClass,ServiceConfig> factory)
Creates a new ServiceContext from the given
ConfigurationLoader and ServiceFactory.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
buildService()
Builds a Service using the ServiceFactory and ServiceConfig.
|
VersionProperty |
getConfigFormat() |
Class<ServiceConfig> |
getConfigurationClass() |
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.
|
ConfigurationLoader<ServiceConfig,Param> |
getServiceConfigurationLoader()
Returns the ConfigurationLoader for this ServiceContext.
|
ServiceFactory<ServiceClass,ServiceConfig> |
getServiceFactory()
Return the ServiceFactory used by this ServiceContext.
|
VersionProperty |
getServiceVersion() |
boolean |
loadConfiguration()
Loads the ServiceConfig using the ConfigurationLoader and
LoadParameter.
|
void |
setLoadParameter(Param param)
Sets the load parameter.
|
void |
setServiceConfiguration(ServiceConfig config)
Sets the ServiceConfig to use instead of loading a config.
|
void |
setServiceConfigurationLoader(ConfigurationLoader<ServiceConfig,Param> loader)
Sets the ConfigurationLoader for this ServiceContext.
|
void |
setServiceFactory(ServiceFactory<ServiceClass,ServiceConfig> factory)
Sets the ServiceFactory to be used by this ServiceContext.
|
public ServiceContext()
public ServiceContext(ConfigurationLoader<ServiceConfig,Param> loader, ServiceFactory<ServiceClass,ServiceConfig> factory)
loader - ConfigurationLoader of the correct typefactory - ServiceFactory of the correct typepublic ConfigurationLoader<ServiceConfig,Param> getServiceConfigurationLoader()
public void setServiceConfigurationLoader(ConfigurationLoader<ServiceConfig,Param> loader)
loader - ConfigurationLoader to usepublic ServiceFactory<ServiceClass,ServiceConfig> getServiceFactory()
public void setServiceFactory(ServiceFactory<ServiceClass,ServiceConfig> factory)
factory - ServiceFactory to be used by this ServiceContextpublic Param getLoadParameter()
public void setLoadParameter(Param param)
param - parameter passed to the ConfigurationLoader to load
the ServiceConfigpublic boolean loadConfiguration()
public ServiceConfig getServiceConfiguration()
public void setServiceConfiguration(ServiceConfig config)
config - ServiceConfig to setpublic boolean buildService()
public ServiceClass getService()
public VersionProperty getServiceVersion()
public Class<ServiceClass> getServiceClass()
public VersionProperty getConfigFormat()
public Class<ServiceConfig> getConfigurationClass()
Copyright © 2011-2014. All Rights Reserved.