Search in sources :

Example 16 with AMQShortString

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

the class MessagePublishInfoImplTest method testExchange.

/**
 * Test that we can update the exchange value.
 */
public void testExchange() {
    assertEquals(_exchange, _mpi.getExchange());
    AMQShortString newExchange = new AMQShortString("newExchange");
    // Check we can update the exchange
    _mpi.setExchange(newExchange);
    assertEquals(newExchange, _mpi.getExchange());
    // Ensure that the new exchange doesn't equal the old one
    assertFalse(_exchange.equals(_mpi.getExchange()));
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 17 with AMQShortString

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

the class BasicGetBody method process.

public static void process(final QpidByteBuffer buffer, final ServerChannelMethodProcessor dispatcher) {
    int ticket = buffer.getUnsignedShort();
    AMQShortString queue = AMQShortString.readAMQShortString(buffer);
    boolean noAck = (buffer.get() & 0x01) != 0;
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveBasicGet(queue, noAck);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 18 with AMQShortString

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

the class BasicGetOkBody method process.

public static void process(final QpidByteBuffer buffer, final ClientChannelMethodProcessor dispatcher) {
    long deliveryTag = buffer.getLong();
    boolean redelivered = (buffer.get() & 0x01) != 0;
    AMQShortString exchange = AMQShortString.readAMQShortString(buffer);
    AMQShortString routingKey = AMQShortString.readAMQShortString(buffer);
    long messageCount = buffer.getUnsignedInt();
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveBasicGetOk(deliveryTag, redelivered, exchange, routingKey, messageCount);
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString)

Example 19 with AMQShortString

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

the class ChannelAlertBody method process.

public static void process(final QpidByteBuffer buffer, final ClientChannelMethodProcessor dispatcher) throws AMQFrameDecodingException {
    int replyCode = buffer.getUnsignedShort();
    AMQShortString replyText = AMQShortString.readAMQShortString(buffer);
    FieldTable details = EncodingUtils.readFieldTable(buffer);
    if (!dispatcher.ignoreAllButCloseOk()) {
        dispatcher.receiveChannelAlert(replyCode, replyText, details);
    }
    if (details != null) {
        details.clearEncodedForm();
    }
}
Also used : AMQShortString(org.apache.qpid.server.protocol.v0_8.AMQShortString) FieldTable(org.apache.qpid.server.protocol.v0_8.FieldTable)

Example 20 with AMQShortString

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

the class ChannelCloseBody method process.

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

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