Map<String, String> args = new HashMap<String, String> ();
for (TaskProperty param : params)
args.put(param.getKey(), param.getValue());
ClientAction action = null;
try
{
suspendFor(waitFor);
action = (ClientAction) Class.forName(impl).newInstance();
}
catch (ClassCastException e)
{
System.err.println("Class " + impl + " does not implement " + ClientAction.class.getName());
}
catch (ClassNotFoundException e)
{
System.err.println("Cannot locate class " + impl);
}
catch (IllegalAccessException e)
{
e.printStackTrace();
}
catch (InstantiationException e)
{
System.err.println("Class " + impl + " cannot be instantiated: " + e.getMessage());
}
try
{
printResult(action.execute(config, args));
}
catch (Exception e)
{
System.out.println("Error executing test: " + e.getMessage());
printResult(false);