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()));
}
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);
}
}
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);
}
}
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();
}
}
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);
}
}
Aggregations