Search in sources :

Example 21 with AMQShortString

use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.

the class ConnectionStartOkBody method process.

public static void process(final QpidByteBuffer in, final ServerMethodProcessor dispatcher) throws AMQFrameDecodingException {
    FieldTable clientProperties = EncodingUtils.readFieldTable(in);
    AMQShortString mechanism = AMQShortString.readAMQShortString(in);
    byte[] response = EncodingUtils.readBytes(in);
    AMQShortString locale = AMQShortString.readAMQShortString(in);
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveConnectionStartOk(clientProperties, mechanism, response, locale);
    }
    if (clientProperties != null) {
        clientProperties.clearEncodedForm();
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString) FieldTable(org.apache.qpid.server.protocol.v0_8.FieldTable)

Example 22 with AMQShortString

use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.

the class ExchangeBoundOkBody method process.

public static void process(final QpidByteBuffer buffer, final ClientChannelMethodProcessor dispatcher) {
    int replyCode = buffer.getUnsignedShort();
    AMQShortString replyText = AMQShortString.readAMQShortString(buffer);
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveExchangeBoundOk(replyCode, replyText);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 23 with AMQShortString

use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.

the class ExchangeDeclareBody method process.

public static void process(final QpidByteBuffer buffer, final ServerChannelMethodProcessor dispatcher) throws AMQFrameDecodingException {
    int ticket = buffer.getUnsignedShort();
    AMQShortString exchange = AMQShortString.readAMQShortString(buffer);
    AMQShortString type = AMQShortString.readAMQShortString(buffer);
    byte bitfield = buffer.get();
    boolean passive = (bitfield & 0x1) == 0x1;
    boolean durable = (bitfield & 0x2) == 0x2;
    boolean autoDelete = (bitfield & 0x4) == 0x4;
    boolean internal = (bitfield & 0x8) == 0x8;
    boolean nowait = (bitfield & 0x10) == 0x10;
    FieldTable arguments = EncodingUtils.readFieldTable(buffer);
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveExchangeDeclare(exchange, type, passive, durable, autoDelete, internal, nowait, arguments);
    }
    if (arguments != null) {
        arguments.clearEncodedForm();
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString) FieldTable(org.apache.qpid.server.protocol.v0_8.FieldTable)

Example 24 with AMQShortString

use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.

the class ExchangeDeleteBody method process.

public static void process(final QpidByteBuffer buffer, final ServerChannelMethodProcessor dispatcher) {
    int ticket = buffer.getUnsignedShort();
    AMQShortString exchange = AMQShortString.readAMQShortString(buffer);
    byte bitfield = buffer.get();
    boolean ifUnused = (bitfield & 0x01) == 0x01;
    boolean nowait = (bitfield & 0x02) == 0x02;
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveExchangeDelete(exchange, ifUnused, nowait);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 25 with AMQShortString

use of org.apache.qpid.server.protocol.v0_8.AMQShortString in project qpid-broker-j by apache.

the class QueueBindBody method process.

public static void process(final QpidByteBuffer buffer, final ServerChannelMethodProcessor dispatcher) throws AMQFrameDecodingException {
    int ticket = buffer.getUnsignedShort();
    AMQShortString queue = AMQShortString.readAMQShortString(buffer);
    AMQShortString exchange = AMQShortString.readAMQShortString(buffer);
    AMQShortString bindingKey = AMQShortString.readAMQShortString(buffer);
    boolean nowait = (buffer.get() & 0x01) == 0x01;
    FieldTable arguments = EncodingUtils.readFieldTable(buffer);
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveQueueBind(queue, exchange, bindingKey, nowait, arguments);
    }
    if (arguments != null) {
        arguments.clearEncodedForm();
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString) FieldTable(org.apache.qpid.server.protocol.v0_8.FieldTable)

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