public final void methodResponse(final String methodName, final Handle handle,
final QmfData outArgs, final QmfData error)
{
try
{
MapMessage response = _syncSession.createMapMessage();
response.setJMSCorrelationID(handle.getCorrelationId());
response.setStringProperty("x-amqp-0-10.app-id", "qmf2");
response.setStringProperty("method", "response");
response.setStringProperty("qmf.opcode", "_method_response");
response.setStringProperty("qmf.agent", _name);
response.setStringProperty("qpid.subject", handle.getRoutingKey());
if (error == null)
{
if (outArgs != null)
{
response.setObject("_arguments", outArgs.mapEncode());
if (outArgs.getSubtypes() != null)
{
response.setObject("_subtypes", outArgs.getSubtypes());
}
}
}
else
{
Map<String, Object> errorMap = error.mapEncode();
for (Map.Entry<String, Object> entry : errorMap.entrySet())
{
response.setObject(entry.getKey(), entry.getValue());
}
}
sendResponse(handle, response);
}
catch (JMSException jmse)