Package org.apache.activemq.command

Examples of org.apache.activemq.command.ActiveMQStreamMessage


        return new ActiveMQBytesMessage();
    }

    @Override
    public StreamMessage createStreamMessage() {
        return new ActiveMQStreamMessage();
    }
View Full Code Here


     * @return an ActiveMQStreamMessage
     * @throws JMSException if the JMS provider fails to create this message due
     *                 to some internal error.
     */
    public StreamMessage createStreamMessage() throws JMSException {
        ActiveMQStreamMessage message = new ActiveMQStreamMessage();
        configureMessage(message);
        return message;
    }
View Full Code Here

    @Test
    public void testStreamMessageSerialization() throws Exception
    {
        Session session = mock(Session.class);
        when(session.createStreamMessage()).thenReturn(new ActiveMQStreamMessage());

        // Creates a test list with data
        List<Object> data = new ArrayList<Object>();
        data.add(Boolean.TRUE);
        data.add(new Byte("1"));
View Full Code Here

    @Test(expected = MessageFormatException.class)
    public void testStreamMessageSerializationWithInvalidType() throws Exception
    {
        Session session = null;
        session = mock(Session.class);
        when(session.createStreamMessage()).thenReturn(new ActiveMQStreamMessage());

        // Creates a test list with data
        List<Object> data = new ArrayList<Object>();
        data.add(new Object());
View Full Code Here

     * @return an ActiveMQStreamMessage
     * @throws JMSException if the JMS provider fails to create this message due
     *                 to some internal error.
     */
    public StreamMessage createStreamMessage() throws JMSException {
        ActiveMQStreamMessage message = new ActiveMQStreamMessage();
        configureMessage(message);
        return message;
    }
View Full Code Here

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQStreamMessage();
    }
View Full Code Here

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new ActiveMQStreamMessage();
    }
View Full Code Here

     * @return an ActiveMQStreamMessage
     * @throws JMSException if the JMS provider fails to create this message due
     *                 to some internal error.
     */
    public StreamMessage createStreamMessage() throws JMSException {
        ActiveMQStreamMessage message = new ActiveMQStreamMessage();
        configureMessage(message);
        return message;
    }
View Full Code Here

        }

        producer.send(test);
        Message msg = consumer1.receive(RECEIVE_TIMEOUT_MILLS);
        assertNotNull(msg);
        ActiveMQStreamMessage message = (ActiveMQStreamMessage) msg;
        assertTrue(message.isCompressed());

        for (int i = 0; i < 100; ++i) {
            assertEquals("test string: " + i, message.readString());
        }
    }
View Full Code Here

     * @return an ActiveMQStreamMessage
     * @throws JMSException if the JMS provider fails to create this message due
     *                 to some internal error.
     */
    public StreamMessage createStreamMessage() throws JMSException {
        ActiveMQStreamMessage message = new ActiveMQStreamMessage();
        configureMessage(message);
        return message;
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.ActiveMQStreamMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.