Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ActiveMQMapMessage


     * @return an ActiveMQMapMessage
     * @throws JMSException if the JMS provider fails to create this message due to some internal error.
     */
    public MapMessage createMapMessage() throws JMSException {
        checkClosed();
        return new ActiveMQMapMessage();
    }
View Full Code Here


     * @return an ActiveMQMapMessage
     * @throws JMSException if the JMS provider fails to create this message due to some internal error.
     */
    public MapMessage createMapMessage() throws JMSException {
        checkClosed();
        return new ActiveMQMapMessage();
    }
View Full Code Here

  public ActiveMQMapMessageReaderTest(String arg0) {
    super(arg0);
  }

  public void testGetPacketType() {
    ActiveMQMapMessage msg = new ActiveMQMapMessage();
    assertTrue(msg.getPacketType() == Packet.ACTIVEMQ_MAP_MESSAGE);
  }
View Full Code Here

  public void testReadPacket() {
        DefaultWireFormat wf = new DefaultWireFormat();
    ActiveMQMapMessageReader reader = new ActiveMQMapMessageReader(wf);
    ActiveMQMapMessageWriter writer = new ActiveMQMapMessageWriter(wf);
    ActiveMQMapMessage msg1 = new ActiveMQMapMessage();
    try {
      msg1.setTable(this.table);
      super.initializeMessage(msg1);
      byte[] data = writer.writePacketToByteArray(msg1);
      ActiveMQMapMessage msg2 = (ActiveMQMapMessage) reader.readPacketFromByteArray(data);
      super.testEquals(msg1, msg2);
      assertTrue(msg1.getTable().equals(msg2.getTable()));
    }
        catch(JMSException jmsEx){
            jmsEx.printStackTrace();
            assertTrue(false);
        }
View Full Code Here

  public void testTime() {

        DefaultWireFormat wf = new DefaultWireFormat();
    ActiveMQMapMessageReader reader = new ActiveMQMapMessageReader(wf);
    ActiveMQMapMessageWriter writer = new ActiveMQMapMessageWriter(wf);
    ActiveMQMapMessage msg1 = new ActiveMQMapMessage();

    ActiveMQMapMessage msg2 = null;
    try {
      int count = 10000;
      long startTime = System.currentTimeMillis();

      msg1.setTable(this.table);
View Full Code Here

    /**
     * @return a new Packet instance
     */

    public Packet createPacket() {
        return new ActiveMQMapMessage();
    }
View Full Code Here

     * @return an ActiveMQMapMessage
     * @throws JMSException if the JMS provider fails to create this message due to some internal error.
     */
    public MapMessage createMapMessage() throws JMSException {
        checkClosed();
        return new ActiveMQMapMessage();
    }
View Full Code Here

        Packet actual = writeThenReadPacket(expected);
        assertObjectMessage(expected, (ActiveMQObjectMessage) actual);
    }

    public void testMapMessage() throws Exception {
        ActiveMQMapMessage expected = createMapMessage();
        Packet actual = writeThenReadPacket(expected);
        assertMapMessage(expected, (ActiveMQMapMessage) actual);
    }
View Full Code Here

        assertEquals("propertyShort", expected.getShortProperty("propertyShort"), actual.getShortProperty("propertyShort"));
        assertEquals("propertyString", expected.getStringProperty("propertyString"), actual.getStringProperty("propertyString"));
    }

    protected ActiveMQMapMessage createMapMessage() throws JMSException {
        ActiveMQMapMessage answer = new ActiveMQMapMessage();
        answer.setBooleanProperty("propertyBool", true);
        answer.setByteProperty("propertyByte", (byte) 44);
        answer.setDoubleProperty("propertyDouble", 123.456);
        answer.setFloatProperty("propertyFloat", (float) 22.223456);
        answer.setIntProperty("propertyInt", 1234567);
        answer.setLongProperty("propertyLong", 1234567890L);
        answer.setShortProperty("propertyShort", (short) 1234);
        answer.setStringProperty("propertyString", "This is some text");
        configureMessage(answer);
        return answer;
    }
View Full Code Here

  public ActiveMQMapMessageReaderTest(String arg0) {
    super(arg0);
  }

  public void testGetPacketType() {
    ActiveMQMapMessage msg = new ActiveMQMapMessage();
    assertTrue(msg.getPacketType() == Packet.ACTIVEMQ_MAP_MESSAGE);
  }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.ActiveMQMapMessage

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.