*
* @param agentRequest The request to process.
*/
private void processRequest(AgentRequest agentRequest) {
Parameters inputParameters = descriptorStore.createParameters();
ParameterNames outputParameters = descriptorStore.createParameterNames();
final Request request = agentRequest.getRequest();
final com.volantis.map.common.param.Parameters inputParams =
request.getInputParams();
final Iterator requestInputParams = inputParams.getParameterNames();
try {
while (requestInputParams.hasNext()) {
String paramName = (String) requestInputParams.next();
inputParameters.setParameterValue(
paramName, inputParams.getParameterValue(paramName));
}
} catch (MissingParameterException e) {
// this is not expected as we iterate through the parameter names
throw new UndeclaredThrowableException(e);
}
Iterator requestOutputParams = request.getOutputParams().iterator();
while (requestOutputParams.hasNext()) {
String paramName = (String) requestOutputParams.next();
outputParameters.setName(paramName);
}
// TODO later If there's an appropriate plugin, allow it to do pre-processing of the parameters.
// plugin.preProcess(inputParameters, outputParameters, device);