use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.
the class ExchangeBoundBody method process.
public static void process(final QpidByteBuffer buffer, final ServerChannelMethodProcessor dispatcher) {
AMQShortString exchange = AMQShortString.readAMQShortString(buffer);
AMQShortString routingKey = AMQShortString.readAMQShortString(buffer);
AMQShortString queue = AMQShortString.readAMQShortString(buffer);
if (!dispatcher.ignoreAllButCloseOk()) {
dispatcher.receiveExchangeBound(exchange, routingKey, queue);
}
}
use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.
the class QueueDeclareOkBody method process.
public static void process(final QpidByteBuffer buffer, final ClientChannelMethodProcessor dispatcher) {
AMQShortString queue = AMQShortString.readAMQShortString(buffer);
long messageCount = buffer.getUnsignedInt();
long consumerCount = buffer.getUnsignedInt();
if (!dispatcher.ignoreAllButCloseOk()) {
dispatcher.receiveQueueDeclareOk(queue, messageCount, consumerCount);
}
}
use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.
the class QueueDeleteBody method process.
public static void process(final QpidByteBuffer buffer, final ServerChannelMethodProcessor dispatcher) {
int ticket = buffer.getUnsignedShort();
AMQShortString queue = AMQShortString.readAMQShortString(buffer);
byte bitfield = buffer.get();
boolean ifUnused = (bitfield & 0x01) == 0x01;
boolean ifEmpty = (bitfield & 0x02) == 0x02;
boolean nowait = (bitfield & 0x04) == 0x04;
if (!dispatcher.ignoreAllButCloseOk()) {
dispatcher.receiveQueueDelete(queue, ifUnused, ifEmpty, nowait);
}
}
use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.
the class QueuePurgeBody method process.
public static void process(final QpidByteBuffer buffer, final ServerChannelMethodProcessor dispatcher) {
int ticket = buffer.getUnsignedShort();
AMQShortString queue = AMQShortString.readAMQShortString(buffer);
boolean nowait = (buffer.get() & 0x01) == 0x01;
if (!dispatcher.ignoreAllButCloseOk()) {
dispatcher.receiveQueuePurge(queue, nowait);
}
}
use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.
the class UpgradeFrom4to5Test method loadBindings.
private List<BindingRecord> loadBindings() {
final BindingTuple bindingTuple = new BindingTuple();
final List<BindingRecord> queueBindings = new ArrayList<BindingRecord>();
CursorOperation databaseOperation = new CursorOperation() {
@Override
public void processEntry(Database sourceDatabase, Database targetDatabase, Transaction transaction, DatabaseEntry key, DatabaseEntry value) {
BindingRecord bindingRecord = bindingTuple.entryToObject(key);
AMQShortString queueName = bindingRecord.getQueueName();
AMQShortString exchangeName = bindingRecord.getExchangeName();
AMQShortString routingKey = bindingRecord.getRoutingKey();
FieldTable arguments = bindingRecord.getArguments();
queueBindings.add(new BindingRecord(exchangeName, queueName, routingKey, arguments));
}
};
new DatabaseTemplate(_environment, BINDING_DB_NAME, null).run(databaseOperation);
return queueBindings;
}
Aggregations