Search in sources :

Example 11 with FrameBody

use of org.apache.qpid.server.protocol.v1_0.type.FrameBody in project qpid-broker-j by apache.

the class AMQPConnection_1_0Impl method send.

public void send(short channel, FrameBody body) {
    AMQFrame frame = AMQFrame.createAMQFrame(channel, body);
    send(frame);
}
Also used : AMQFrame(org.apache.qpid.server.protocol.v1_0.framing.AMQFrame)

Example 12 with FrameBody

use of org.apache.qpid.server.protocol.v1_0.type.FrameBody in project qpid-broker-j by apache.

the class Session_1_0Test method testReceiveReattachRebindingQueueNoActiveLinks.

public void testReceiveReattachRebindingQueueNoActiveLinks() {
    final String linkName = "testLink";
    final String address = "amq.direct/" + TOPIC_NAME;
    Attach attach = createSharedTopicAttach(true, linkName, address, true);
    _session.receiveAttach(attach);
    assertAttachSent(_connection, _session, attach);
    assertQueues(TOPIC_NAME, LifetimePolicy.PERMANENT);
    sendDetach(_session, attach.getHandle(), false);
    ArgumentCaptor<FrameBody> frameCapture = ArgumentCaptor.forClass(FrameBody.class);
    verify(_connection, times(2)).sendFrame(eq(_session.getChannelId()), frameCapture.capture());
    assertTrue(frameCapture.getAllValues().get(1) instanceof Detach);
    assertQueues(TOPIC_NAME, LifetimePolicy.PERMANENT);
    String topicName2 = TOPIC_NAME + "2";
    final String address2 = "amq.direct/" + topicName2;
    Attach attach2 = createSharedTopicAttach(true, linkName, address2, true);
    _session.receiveAttach(attach2);
    assertAttachSent(_connection, _session, attach2, 2);
    assertQueues(topicName2, LifetimePolicy.PERMANENT);
}
Also used : Attach(org.apache.qpid.server.protocol.v1_0.type.transport.Attach) FrameBody(org.apache.qpid.server.protocol.v1_0.type.FrameBody) Detach(org.apache.qpid.server.protocol.v1_0.type.transport.Detach)

Example 13 with FrameBody

use of org.apache.qpid.server.protocol.v1_0.type.FrameBody in project qpid-broker-j by apache.

the class Interaction method sendPerformativeAndChainFuture.

private void sendPerformativeAndChainFuture(final SaslFrameBody frameBody) throws Exception {
    SASLFrame transportFrame = new SASLFrame(frameBody);
    sendPerformativeAndChainFuture(transportFrame);
}
Also used : SASLFrame(org.apache.qpid.server.protocol.v1_0.framing.SASLFrame)

Aggregations

FrameBody (org.apache.qpid.server.protocol.v1_0.type.FrameBody)8 Attach (org.apache.qpid.server.protocol.v1_0.type.transport.Attach)5 ChannelFrameBody (org.apache.qpid.server.protocol.v1_0.type.transport.ChannelFrameBody)4 Detach (org.apache.qpid.server.protocol.v1_0.type.transport.Detach)4 Transfer (org.apache.qpid.server.protocol.v1_0.type.transport.Transfer)4 QpidByteBuffer (org.apache.qpid.server.bytebuffer.QpidByteBuffer)3 Queue (org.apache.qpid.server.model.Queue)2 SaslFrameBody (org.apache.qpid.server.protocol.v1_0.type.SaslFrameBody)2 Source (org.apache.qpid.server.protocol.v1_0.type.messaging.Source)2 AmqpError (org.apache.qpid.server.protocol.v1_0.type.transport.AmqpError)2 ConnectionError (org.apache.qpid.server.protocol.v1_0.type.transport.ConnectionError)2 Error (org.apache.qpid.server.protocol.v1_0.type.transport.Error)2 AccessControlContext (java.security.AccessControlContext)1 ArrayList (java.util.ArrayList)1 AMQFrame (org.apache.qpid.server.protocol.v1_0.framing.AMQFrame)1 SASLFrame (org.apache.qpid.server.protocol.v1_0.framing.SASLFrame)1 TransportFrame (org.apache.qpid.server.protocol.v1_0.framing.TransportFrame)1 AmqpErrorException (org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException)1 Target (org.apache.qpid.server.protocol.v1_0.type.messaging.Target)1 QueueConsumer (org.apache.qpid.server.queue.QueueConsumer)1