protected <T> Future<T> invoke(Method m, Class<T> klass)
{
int commandId = getCommandsOut();
Future<T> future = super.invoke(m, klass);
ExecutionResult result = new ExecutionResult();
result.setCommandId(commandId);
if (m instanceof ExchangeBound)
{
ExchangeBoundResult struc = new ExchangeBoundResult();
struc.setQueueNotFound(true);
result.setValue(struc);
}
else if (m instanceof ExchangeQuery)
{
ExchangeQueryResult struc = new ExchangeQueryResult();
result.setValue(struc);
}
else if (m instanceof QueueQuery)
{
QueueQueryResult struc = new QueueQueryResult();
result.setValue(struc);
}
_delegate.executionResult(this, result);
return future;
}