{
System.out.println("WorkItem type: " + wi.getType());
if (wi.getType() == METHOD_CALL)
{
MethodCallWorkItem item = (MethodCallWorkItem)wi;
MethodCallParams methodCallParams = item.getMethodCallParams();
String methodName = methodCallParams.getName();
ObjectId objectId = methodCallParams.getObjectId();
QmfData inArgs = methodCallParams.getArgs();
ObjectId controlAddress = _control.getObjectId();
if (objectId.equals(controlAddress))
{
if (methodName.equals("processPayload"))
{
System.out.println("Invoked processPayload method");
byte[] parameter = inArgs.getValue("parameter");
System.out.println("payload size = " + parameter.length);
QmfData outArgs = new QmfData();
outArgs.setValue("return", parameter);
_agent.methodResponse(methodName, item.getHandle(), outArgs, null);
}
}
}
}