Search in sources :

Example 46 with AMQShortString

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);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 47 with AMQShortString

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);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 48 with AMQShortString

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);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 49 with AMQShortString

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);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 50 with AMQShortString

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;
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString) Transaction(com.sleepycat.je.Transaction) FieldTable(org.apache.qpid.server.protocol.v0_8.FieldTable) BindingTuple(org.apache.qpid.server.store.berkeleydb.upgrade.UpgradeFrom4To5.BindingTuple) ArrayList(java.util.ArrayList) Database(com.sleepycat.je.Database) DatabaseEntry(com.sleepycat.je.DatabaseEntry) BindingRecord(org.apache.qpid.server.store.berkeleydb.upgrade.UpgradeFrom4To5.BindingRecord)

Aggregations

AMQShortString (org.apache.qpid.server.protocol.v0_8.AMQShortString)45 FieldTable (org.apache.qpid.server.protocol.v0_8.FieldTable)13 Transaction (com.sleepycat.je.Transaction)7 Database (com.sleepycat.je.Database)6 DatabaseEntry (com.sleepycat.je.DatabaseEntry)6 MessagePublishInfo (org.apache.qpid.server.protocol.v0_8.transport.MessagePublishInfo)6 TupleOutput (com.sleepycat.bind.tuple.TupleOutput)4 MessageConversionException (org.apache.qpid.server.protocol.converter.MessageConversionException)4 TupleInput (com.sleepycat.bind.tuple.TupleInput)3 DeliveryProperties (org.apache.qpid.server.protocol.v0_10.transport.DeliveryProperties)3 BasicContentHeaderProperties (org.apache.qpid.server.protocol.v0_8.transport.BasicContentHeaderProperties)3 URISyntaxException (java.net.URISyntaxException)2 HashSet (java.util.HashSet)2 MessageDestination (org.apache.qpid.server.message.MessageDestination)2 Exchange (org.apache.qpid.server.model.Exchange)2 Header (org.apache.qpid.server.protocol.v0_10.transport.Header)2 MessageProperties (org.apache.qpid.server.protocol.v0_10.transport.MessageProperties)2 ReplyTo (org.apache.qpid.server.protocol.v0_10.transport.ReplyTo)2 AMQBody (org.apache.qpid.server.protocol.v0_8.transport.AMQBody)2 ContentHeaderBody (org.apache.qpid.server.protocol.v0_8.transport.ContentHeaderBody)2