public class TurbineRunDataService extends TurbineBaseService implements RunDataService
configuration, name, serviceBroker
initableBroker, isInitialized
COOKIE_PARSER_KEY, DEFAULT_CONFIG, PARAMETER_PARSER_KEY, RUN_DATA_KEY, SERVICE_NAME
Constructor and Description |
---|
TurbineRunDataService()
Constructs a RunData Service.
|
Modifier and Type | Method and Description |
---|---|
RunData |
getRunData(HttpServletRequest req,
HttpServletResponse res,
ServletConfig config)
Gets a default RunData object.
|
RunData |
getRunData(String key,
HttpServletRequest req,
HttpServletResponse res,
ServletConfig config)
Gets a RunData instance from a specific configuration.
|
void |
init()
Initializes the service by setting the pool capacity.
|
boolean |
putRunData(RunData data)
Puts the used RunData object back to the factory for recycling.
|
void |
shutdown()
Shutdown the service
|
init, init
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
getInit, getInitableBroker, setInit, setInitableBroker
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration, getName, getProperties, setName, setServiceBroker
getInit, init, setInitableBroker
public TurbineRunDataService()
public void init() throws InitializationException
init
in interface Initable
init
in class TurbineBaseService
InitializationException
- if initialization fails.public void shutdown()
shutdown
in interface Initable
shutdown
in class TurbineBaseService
TurbineBaseService.shutdown()
public RunData getRunData(HttpServletRequest req, HttpServletResponse res, ServletConfig config) throws TurbineException
getRunData
in interface RunDataService
req
- a servlet request.res
- a servlet response.config
- a servlet config.TurbineException
- if the operation fails.public RunData getRunData(String key, HttpServletRequest req, HttpServletResponse res, ServletConfig config) throws TurbineException, IllegalArgumentException
getRunData
in interface RunDataService
key
- a configuration key.req
- a servlet request.res
- a servlet response.config
- a servlet config.TurbineException
- if the operation fails.IllegalArgumentException
- if any of the parameters are null.
TODO The "key" parameter should be removed in favor of just looking up what class via the roleConfig avalon file.public boolean putRunData(RunData data)
putRunData
in interface RunDataService
data
- the used RunData object.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.