boolean succeeded = false;
final String exchange = (String) parameters[0];
final boolean durable = (Boolean) parameters[2];
final boolean autoDelete = (Boolean) parameters[3];
final boolean passive = (Boolean) parameters[4];
final AmqpExchangeType eType = (AmqpExchangeType) parameters[1];
final String clientId = (String) parameters[5];
final Channel channel = AmqpOperationFactory.this.amqpDriver.getChannel (clientId);
if (channel != null) {
AMQP.Exchange.DeclareOk outcome = null;
if (passive) {
outcome = channel.exchangeDeclarePassive (exchange);
} else {
outcome = channel.exchangeDeclare (exchange, eType.getAmqpName (), durable, autoDelete, null);
}
succeeded = (outcome != null);
}
return succeeded;
}