public final void subscriptionResponse(final Handle handle, final Handle consoleHandle, final String subscriptionId,
final long lifetime, final long publishInterval, 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", "_subscribe_response");
response.setStringProperty("qmf.agent", _name);
response.setStringProperty("qpid.subject", handle.getRoutingKey());
if (error == null)
{
response.setObject("_subscription_id", subscriptionId);
response.setObject("_duration", lifetime);
response.setObject("_interval", publishInterval);
}
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)