@Override public StreamMessage createStreamMessage() throws JMSException { return next.createStreamMessage(); }
@Override public StreamMessage createStreamMessage() throws JMSException { return next.createStreamMessage(); }
/** * @return * @throws JMSException */ public StreamMessage createStreamMessage() throws JMSException { return next.createStreamMessage(); }
@Override public StreamMessage createStreamMessage() throws JMSException { return next.createStreamMessage(); }
@Override public StreamMessage createStreamMessage() throws JMSException { return next.createStreamMessage(); }
/** * Send a <code>StreamMessage</code> with an empty body. * <br /> * Receive it and test if the message is effectively an instance of * <code>StreamMessage</code> */ public void testStreamMessage_1() { try { StreamMessage message = senderSession.createStreamMessage(); sender.send(message); Message msg = receiver.receive(TestConfig.TIMEOUT); assertTrue("The message should be an instance of StreamMessage.\n", msg instanceof StreamMessage); } catch (JMSException e) { fail(e); } }
/** * Send a <code>StreamMessage</code> with an empty body. * <br /> * Receive it and test if the message is effectively an instance of * <code>StreamMessage</code> */ @Test public void testStreamMessage_1() { try { StreamMessage message = senderSession.createStreamMessage(); sender.send(message); Message msg = receiver.receive(TestConfig.TIMEOUT); Assert.assertTrue("The message should be an instance of StreamMessage.\n", msg instanceof StreamMessage); } catch (JMSException e) { fail(e); } }
/** * Send a <code>StreamMessage</code> with 2 Java primitives in its body (a <code> * String</code> and a <code>double</code>). * <br /> * Receive it and test that the values of the primitives of the body are correct */ public void testStreamMessage_2() { try { StreamMessage message = senderSession.createStreamMessage(); message.writeString("pi"); message.writeDouble(3.14159); sender.send(message); Message m = receiver.receive(TestConfig.TIMEOUT); assertTrue("The message should be an instance of StreamMessage.\n", m instanceof StreamMessage); StreamMessage msg = (StreamMessage) m; assertEquals("pi", msg.readString()); assertEquals(3.14159, msg.readDouble(), 0); } catch (JMSException e) { fail(e); } }
/** * Send a <code>StreamMessage</code> with 2 Java primitives in its body (a <code> * String</code> and a <code>double</code>). * <br /> * Receive it and test that the values of the primitives of the body are correct */ @Test public void testStreamMessage_2() { try { StreamMessage message = senderSession.createStreamMessage(); message.writeString("pi"); message.writeDouble(3.14159); sender.send(message); Message m = receiver.receive(TestConfig.TIMEOUT); Assert.assertTrue("The message should be an instance of StreamMessage.\n", m instanceof StreamMessage); StreamMessage msg = (StreamMessage) m; Assert.assertEquals("pi", msg.readString()); Assert.assertEquals(3.14159, msg.readDouble(), 0); } catch (JMSException e) { fail(e); } }
StreamMessage streamMessage = defaultQueueSession.createStreamMessage(); streamMessage.setStringProperty("testName", "testSendEmptyMessages"); defaultSender.send(streamMessage);