Search in sources :

Example 1 with Section

use of org.apache.qpid.protonj2.types.messaging.Section in project qpid-protonj2 by apache.

the class StreamSenderTest method testFlushAfterSecondWriteDoesNotEncodeAMQPHeaderFromConfiguration.

@Test
void testFlushAfterSecondWriteDoesNotEncodeAMQPHeaderFromConfiguration() throws Exception {
    try (ProtonTestServer peer = new ProtonTestServer()) {
        peer.expectSASLAnonymousConnect();
        peer.expectOpen().respond();
        peer.expectBegin().respond();
        peer.expectAttach().ofSender().respond();
        peer.remoteFlow().withLinkCredit(1).queue();
        peer.start();
        URI remoteURI = peer.getServerURI();
        LOG.info("Test started, peer listening on: {}", remoteURI);
        Client container = Client.create();
        Connection connection = container.connect(remoteURI.getHost(), remoteURI.getPort());
        StreamSender sender = connection.openStreamSender("test-queue");
        StreamSenderMessage tracker = sender.beginMessage();
        // Populate all Header values
        Header header = new Header();
        header.setDurable(true);
        header.setPriority((byte) 1);
        header.setTimeToLive(65535);
        header.setFirstAcquirer(true);
        header.setDeliveryCount(2);
        tracker.header(header);
        OutputStreamOptions options = new OutputStreamOptions();
        OutputStream stream = tracker.body(options);
        HeaderMatcher headerMatcher = new HeaderMatcher(true);
        headerMatcher.withDurable(true);
        headerMatcher.withPriority((byte) 1);
        headerMatcher.withTtl(65535);
        headerMatcher.withFirstAcquirer(true);
        headerMatcher.withDeliveryCount(2);
        EncodedDataMatcher dataMatcher1 = new EncodedDataMatcher(new byte[] { 0, 1, 2, 3 });
        TransferPayloadCompositeMatcher payloadMatcher1 = new TransferPayloadCompositeMatcher();
        payloadMatcher1.setHeadersMatcher(headerMatcher);
        payloadMatcher1.setMessageContentMatcher(dataMatcher1);
        // Second flush expectation
        EncodedDataMatcher dataMatcher2 = new EncodedDataMatcher(new byte[] { 4, 5, 6, 7 });
        TransferPayloadCompositeMatcher payloadMatcher2 = new TransferPayloadCompositeMatcher();
        payloadMatcher2.setMessageContentMatcher(dataMatcher2);
        peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
        peer.expectTransfer().withPayload(payloadMatcher1).withMore(true);
        peer.expectTransfer().withPayload(payloadMatcher2).withMore(true);
        peer.expectTransfer().withNullPayload().withMore(false).accept();
        peer.expectDetach().respond();
        peer.expectEnd().respond();
        peer.expectClose().respond();
        // Stream won't output until some body bytes are written.
        stream.write(new byte[] { 0, 1, 2, 3 });
        stream.flush();
        // Next write should only be a single Data section
        stream.write(new byte[] { 4, 5, 6, 7 });
        stream.flush();
        // Final Transfer that completes the Delivery
        stream.close();
        sender.closeAsync().get();
        connection.closeAsync().get();
        peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
    }
}
Also used : HeaderMatcher(org.apache.qpid.protonj2.test.driver.matchers.messaging.HeaderMatcher) ProtonTestServer(org.apache.qpid.protonj2.test.driver.ProtonTestServer) Header(org.apache.qpid.protonj2.types.messaging.Header) OutputStreamOptions(org.apache.qpid.protonj2.client.OutputStreamOptions) ByteArrayOutputStream(java.io.ByteArrayOutputStream) OutputStream(java.io.OutputStream) Connection(org.apache.qpid.protonj2.client.Connection) EncodedDataMatcher(org.apache.qpid.protonj2.test.driver.matchers.types.EncodedDataMatcher) StreamSender(org.apache.qpid.protonj2.client.StreamSender) StreamSenderMessage(org.apache.qpid.protonj2.client.StreamSenderMessage) Client(org.apache.qpid.protonj2.client.Client) TransferPayloadCompositeMatcher(org.apache.qpid.protonj2.test.driver.matchers.transport.TransferPayloadCompositeMatcher) URI(java.net.URI) Test(org.junit.jupiter.api.Test)

Example 2 with Section

use of org.apache.qpid.protonj2.types.messaging.Section in project qpid-protonj2 by apache.

the class ImperativeClientTestCase method createEncodedMessage.

protected byte[] createEncodedMessage(Section<?>... body) {
    Encoder encoder = CodecFactory.getEncoder();
    ProtonBuffer buffer = new ProtonByteBufferAllocator().allocate();
    for (Section<?> section : body) {
        encoder.writeObject(buffer, encoder.newEncoderState(), section);
    }
    byte[] result = new byte[buffer.getReadableBytes()];
    buffer.readBytes(result);
    return result;
}
Also used : ProtonBuffer(org.apache.qpid.protonj2.buffer.ProtonBuffer) Encoder(org.apache.qpid.protonj2.codec.Encoder) ProtonByteBufferAllocator(org.apache.qpid.protonj2.buffer.ProtonByteBufferAllocator)

Example 3 with Section

use of org.apache.qpid.protonj2.types.messaging.Section in project qpid-protonj2 by apache.

the class StreamReceiverTest method testStreamReceiverMessageThrowsOnAnyMessageModificationAPI.

@Test
public void testStreamReceiverMessageThrowsOnAnyMessageModificationAPI() throws Exception {
    final byte[] body = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    final byte[] payload = createEncodedMessage(new Data(body));
    try (ProtonTestServer peer = new ProtonTestServer()) {
        peer.expectSASLAnonymousConnect();
        peer.expectOpen().respond();
        peer.expectBegin().respond();
        peer.expectAttach().withRole(Role.RECEIVER.getValue()).respond();
        peer.expectFlow();
        peer.remoteTransfer().withHandle(0).withDeliveryId(0).withDeliveryTag(new byte[] { 1 }).withMore(false).withMessageFormat(0).withPayload(payload).queue();
        peer.expectDisposition().withFirst(0).withState().accepted().withSettled(true);
        peer.start();
        URI remoteURI = peer.getServerURI();
        LOG.info("Test started, peer listening on: {}", remoteURI);
        final Client container = Client.create();
        final Connection connection = container.connect(remoteURI.getHost(), remoteURI.getPort());
        final StreamReceiver receiver = connection.openStreamReceiver("test-queue");
        final StreamDelivery delivery = receiver.receive();
        final StreamReceiverMessage message = delivery.message();
        assertThrows(ClientUnsupportedOperationException.class, () -> message.header(new Header()));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.properties(new Properties()));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.applicationProperties(new ApplicationProperties(null)));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.annotations(new MessageAnnotations(null)));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.footer(new Footer(null)));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.messageFormat(1));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.durable(true));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.priority((byte) 4));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.timeToLive(128));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.firstAcquirer(false));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.deliveryCount(10));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.messageId(10));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.correlationId(10));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.userId(new byte[] { 1 }));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.to("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.subject("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.replyTo("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.contentType("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.contentEncoding("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.absoluteExpiryTime(10));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.creationTime(10));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.groupId("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.groupSequence(10));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.replyToGroupId("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.annotation("test", 1));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.removeAnnotation("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.property("test", 1));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.removeProperty("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.footer("test", 1));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.removeFooter("test"));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.body(InputStream.nullInputStream()));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.addBodySection(new AmqpValue<>("test")));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.bodySections(Collections.emptyList()));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.bodySections());
        assertThrows(ClientUnsupportedOperationException.class, () -> message.clearBodySections());
        assertThrows(ClientUnsupportedOperationException.class, () -> message.forEachBodySection((section) -> {
        }));
        assertThrows(ClientUnsupportedOperationException.class, () -> message.encode(Collections.emptyMap()));
        InputStream bodyStream = message.body();
        assertNotNull(bodyStream.readAllBytes());
        bodyStream.close();
        peer.expectDetach().respond();
        peer.expectEnd().respond();
        peer.expectClose().respond();
        receiver.closeAsync().get();
        connection.closeAsync().get();
        peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
    }
}
Also used : Arrays(java.util.Arrays) LoggerFactory(org.slf4j.LoggerFactory) Properties(org.apache.qpid.protonj2.types.messaging.Properties) Random(java.util.Random) ImperativeClientTestCase(org.apache.qpid.protonj2.client.test.ImperativeClientTestCase) Future(java.util.concurrent.Future) ClientLinkRemotelyClosedException(org.apache.qpid.protonj2.client.exceptions.ClientLinkRemotelyClosedException) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) Data(org.apache.qpid.protonj2.types.messaging.Data) Map(java.util.Map) URI(java.net.URI) ClientOperationTimedOutException(org.apache.qpid.protonj2.client.exceptions.ClientOperationTimedOutException) Accepted(org.apache.qpid.protonj2.test.driver.codec.messaging.Accepted) EncodingCodes(org.apache.qpid.protonj2.codec.EncodingCodes) ReceiverOptions(org.apache.qpid.protonj2.client.ReceiverOptions) SenderOptions(org.apache.qpid.protonj2.client.SenderOptions) Binary(org.apache.qpid.protonj2.types.Binary) Footer(org.apache.qpid.protonj2.types.messaging.Footer) UUID(java.util.UUID) Assertions.assertNotSame(org.junit.jupiter.api.Assertions.assertNotSame) StreamReceiverMessage(org.apache.qpid.protonj2.client.StreamReceiverMessage) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Connection(org.apache.qpid.protonj2.client.Connection) Client(org.apache.qpid.protonj2.client.Client) ClientUnsupportedOperationException(org.apache.qpid.protonj2.client.exceptions.ClientUnsupportedOperationException) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) HashMap(java.util.HashMap) AmqpValue(org.apache.qpid.protonj2.types.messaging.AmqpValue) ApplicationProperties(org.apache.qpid.protonj2.types.messaging.ApplicationProperties) Wait(org.apache.qpid.protonj2.client.test.Wait) Symbol(org.apache.qpid.protonj2.types.Symbol) ArrayList(java.util.ArrayList) StreamReceiver(org.apache.qpid.protonj2.client.StreamReceiver) ClientException(org.apache.qpid.protonj2.client.exceptions.ClientException) DeliveryState(org.apache.qpid.protonj2.client.DeliveryState) UnsignedInteger(org.apache.qpid.protonj2.types.UnsignedInteger) ConnectionOptions(org.apache.qpid.protonj2.client.ConnectionOptions) Role(org.apache.qpid.protonj2.types.transport.Role) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Header(org.apache.qpid.protonj2.types.messaging.Header) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) Logger(org.slf4j.Logger) DeliveryAnnotations(org.apache.qpid.protonj2.test.driver.codec.messaging.DeliveryAnnotations) ProtonTestServer(org.apache.qpid.protonj2.test.driver.ProtonTestServer) ClientIllegalStateException(org.apache.qpid.protonj2.client.exceptions.ClientIllegalStateException) IOException(java.io.IOException) ClientDeliveryAbortedException(org.apache.qpid.protonj2.client.exceptions.ClientDeliveryAbortedException) StreamReceiverOptions(org.apache.qpid.protonj2.client.StreamReceiverOptions) ErrorCondition(org.apache.qpid.protonj2.client.ErrorCondition) AmqpSequence(org.apache.qpid.protonj2.types.messaging.AmqpSequence) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) MessageAnnotations(org.apache.qpid.protonj2.types.messaging.MessageAnnotations) StreamDelivery(org.apache.qpid.protonj2.client.StreamDelivery) Collections(java.util.Collections) Timeout(org.junit.jupiter.api.Timeout) InputStream(java.io.InputStream) ProtonTestServer(org.apache.qpid.protonj2.test.driver.ProtonTestServer) InputStream(java.io.InputStream) Connection(org.apache.qpid.protonj2.client.Connection) Data(org.apache.qpid.protonj2.types.messaging.Data) Properties(org.apache.qpid.protonj2.types.messaging.Properties) ApplicationProperties(org.apache.qpid.protonj2.types.messaging.ApplicationProperties) URI(java.net.URI) AmqpValue(org.apache.qpid.protonj2.types.messaging.AmqpValue) StreamDelivery(org.apache.qpid.protonj2.client.StreamDelivery) Header(org.apache.qpid.protonj2.types.messaging.Header) StreamReceiver(org.apache.qpid.protonj2.client.StreamReceiver) StreamReceiverMessage(org.apache.qpid.protonj2.client.StreamReceiverMessage) MessageAnnotations(org.apache.qpid.protonj2.types.messaging.MessageAnnotations) Footer(org.apache.qpid.protonj2.types.messaging.Footer) ApplicationProperties(org.apache.qpid.protonj2.types.messaging.ApplicationProperties) Client(org.apache.qpid.protonj2.client.Client) Test(org.junit.jupiter.api.Test)

Example 4 with Section

use of org.apache.qpid.protonj2.types.messaging.Section in project qpid-protonj2 by apache.

the class ReconnectStreamSenderTest method testStreamMessageWriteThatFlushesFailsAfterConnectionDropped.

@Test
void testStreamMessageWriteThatFlushesFailsAfterConnectionDropped() throws Exception {
    try (ProtonTestServer firstPeer = new ProtonTestServer();
        ProtonTestServer finalPeer = new ProtonTestServer()) {
        firstPeer.expectSASLAnonymousConnect();
        firstPeer.expectOpen().respond();
        firstPeer.expectBegin().respond();
        firstPeer.expectAttach().ofSender().respond();
        firstPeer.remoteFlow().withLinkCredit(1).queue();
        firstPeer.dropAfterLastHandler();
        firstPeer.start();
        finalPeer.expectSASLAnonymousConnect();
        finalPeer.expectOpen().respond();
        finalPeer.expectBegin().respond();
        finalPeer.expectAttach().ofSender().respond();
        finalPeer.remoteFlow().withLinkCredit(1).queue();
        finalPeer.start();
        final URI primaryURI = firstPeer.getServerURI();
        final URI backupURI = finalPeer.getServerURI();
        ConnectionOptions options = new ConnectionOptions();
        options.maxFrameSize(32768);
        options.idleTimeout(5, TimeUnit.SECONDS);
        options.reconnectOptions().reconnectEnabled(true);
        options.reconnectOptions().addReconnectLocation(backupURI.getHost(), backupURI.getPort());
        Client container = Client.create();
        Connection connection = container.connect(primaryURI.getHost(), primaryURI.getPort(), options);
        StreamSender sender = connection.openStreamSender("test-queue");
        StreamSenderMessage message = sender.beginMessage();
        byte[] payload = new byte[65536];
        Arrays.fill(payload, (byte) 65);
        OutputStreamOptions streamOptions = new OutputStreamOptions().bodyLength(payload.length);
        OutputStream stream = message.body(streamOptions);
        firstPeer.waitForScriptToComplete();
        // Reconnection should have occurred now and we should not be able to flush data
        // from
        // the stream as its initial sender instance was closed on disconnect.
        finalPeer.waitForScriptToComplete();
        finalPeer.expectClose().respond();
        try {
            stream.write(payload);
            fail("Should not be able to write section after connection drop");
        } catch (IOException ioe) {
            assertTrue(ioe.getCause() instanceof ClientException);
        }
        connection.closeAsync().get();
        finalPeer.waitForScriptToComplete(5, TimeUnit.SECONDS);
    }
}
Also used : ProtonTestServer(org.apache.qpid.protonj2.test.driver.ProtonTestServer) OutputStreamOptions(org.apache.qpid.protonj2.client.OutputStreamOptions) OutputStream(java.io.OutputStream) Connection(org.apache.qpid.protonj2.client.Connection) StreamSender(org.apache.qpid.protonj2.client.StreamSender) StreamSenderMessage(org.apache.qpid.protonj2.client.StreamSenderMessage) ConnectionOptions(org.apache.qpid.protonj2.client.ConnectionOptions) IOException(java.io.IOException) ClientException(org.apache.qpid.protonj2.client.exceptions.ClientException) Client(org.apache.qpid.protonj2.client.Client) URI(java.net.URI) Test(org.junit.jupiter.api.Test)

Example 5 with Section

use of org.apache.qpid.protonj2.types.messaging.Section in project qpid-protonj2 by apache.

the class ReconnectStreamSenderTest method testStreamMessageWriteThatFlushesFailsAfterConnectionDroppedAndReconnected.

@Test
public void testStreamMessageWriteThatFlushesFailsAfterConnectionDroppedAndReconnected() throws Exception {
    try (ProtonTestServer firstPeer = new ProtonTestServer();
        ProtonTestServer finalPeer = new ProtonTestServer()) {
        EncodedDataMatcher dataMatcher = new EncodedDataMatcher(new byte[] { 0, 1, 2, 3 });
        TransferPayloadCompositeMatcher payloadMatcher = new TransferPayloadCompositeMatcher();
        payloadMatcher.setMessageContentMatcher(dataMatcher);
        firstPeer.expectSASLAnonymousConnect();
        firstPeer.expectOpen().respond();
        firstPeer.expectBegin().respond();
        firstPeer.expectAttach().ofSender().respond();
        firstPeer.remoteFlow().withLinkCredit(1).queue();
        firstPeer.expectTransfer().withPayload(payloadMatcher).withMore(true);
        firstPeer.dropAfterLastHandler();
        firstPeer.start();
        finalPeer.expectSASLAnonymousConnect();
        finalPeer.expectOpen().respond();
        finalPeer.expectBegin().respond();
        finalPeer.expectAttach().ofSender().respond();
        finalPeer.start();
        final URI primaryURI = firstPeer.getServerURI();
        final URI backupURI = finalPeer.getServerURI();
        ConnectionOptions options = new ConnectionOptions();
        options.maxFrameSize(32768);
        options.idleTimeout(5, TimeUnit.SECONDS);
        options.reconnectOptions().reconnectEnabled(true);
        options.reconnectOptions().addReconnectLocation(backupURI.getHost(), backupURI.getPort());
        Client container = Client.create();
        Connection connection = container.connect(primaryURI.getHost(), primaryURI.getPort(), options);
        StreamSenderOptions senderOptions = new StreamSenderOptions();
        senderOptions.sendTimeout(1000);
        StreamSender sender = connection.openStreamSender("test-queue", senderOptions);
        StreamSenderMessage message = sender.beginMessage();
        OutputStream stream = message.body();
        stream.write(new byte[] { 0, 1, 2, 3 });
        stream.flush();
        firstPeer.waitForScriptToComplete();
        // Reconnection should have occurred now and we should not be able to flush data
        // from the stream as its initial sender instance was closed on disconnect.
        finalPeer.waitForScriptToComplete();
        // Ensure that idle processing happens in case send blocks so we can see the
        // send timed out exception
        finalPeer.remoteEmptyFrame().later(5000);
        finalPeer.remoteEmptyFrame().later(10000);
        finalPeer.remoteEmptyFrame().later(15000);
        // Test timeout kicks in now
        finalPeer.remoteEmptyFrame().later(20000);
        finalPeer.expectClose().respond();
        byte[] payload = new byte[1024];
        Arrays.fill(payload, (byte) 65);
        try {
            stream.write(payload);
            stream.flush();
            fail("Should not be able to write section after connection drop");
        } catch (IOException ioe) {
            assertFalse(ioe.getCause() instanceof ClientSendTimedOutException);
            assertTrue(ioe.getCause() instanceof ClientConnectionRemotelyClosedException);
        }
        connection.closeAsync().get();
        finalPeer.waitForScriptToComplete(5, TimeUnit.SECONDS);
    }
}
Also used : ProtonTestServer(org.apache.qpid.protonj2.test.driver.ProtonTestServer) OutputStream(java.io.OutputStream) EncodedDataMatcher(org.apache.qpid.protonj2.test.driver.matchers.types.EncodedDataMatcher) Connection(org.apache.qpid.protonj2.client.Connection) ClientSendTimedOutException(org.apache.qpid.protonj2.client.exceptions.ClientSendTimedOutException) IOException(java.io.IOException) TransferPayloadCompositeMatcher(org.apache.qpid.protonj2.test.driver.matchers.transport.TransferPayloadCompositeMatcher) URI(java.net.URI) StreamSenderOptions(org.apache.qpid.protonj2.client.StreamSenderOptions) ClientConnectionRemotelyClosedException(org.apache.qpid.protonj2.client.exceptions.ClientConnectionRemotelyClosedException) StreamSender(org.apache.qpid.protonj2.client.StreamSender) StreamSenderMessage(org.apache.qpid.protonj2.client.StreamSenderMessage) ConnectionOptions(org.apache.qpid.protonj2.client.ConnectionOptions) Client(org.apache.qpid.protonj2.client.Client) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)20 Data (org.apache.qpid.protonj2.types.messaging.Data)15 ArrayList (java.util.ArrayList)13 Client (org.apache.qpid.protonj2.client.Client)10 Connection (org.apache.qpid.protonj2.client.Connection)10 Section (org.apache.qpid.protonj2.types.messaging.Section)10 URI (java.net.URI)9 ProtonTestServer (org.apache.qpid.protonj2.test.driver.ProtonTestServer)9 StreamSender (org.apache.qpid.protonj2.client.StreamSender)7 StreamSenderMessage (org.apache.qpid.protonj2.client.StreamSenderMessage)7 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)6 ProtonBuffer (org.apache.qpid.protonj2.buffer.ProtonBuffer)6 IOException (java.io.IOException)5 OutputStream (java.io.OutputStream)5 Header (org.apache.qpid.protonj2.types.messaging.Header)5 ProtonByteBufferAllocator (org.apache.qpid.protonj2.buffer.ProtonByteBufferAllocator)4 ConnectionOptions (org.apache.qpid.protonj2.client.ConnectionOptions)4 OutputStreamOptions (org.apache.qpid.protonj2.client.OutputStreamOptions)4 ClientException (org.apache.qpid.protonj2.client.exceptions.ClientException)4 Encoder (org.apache.qpid.protonj2.codec.Encoder)4