Package net.timewalker.ffmq3.common.message

Examples of net.timewalker.ffmq3.common.message.MapMessageImpl.markAsReadOnly()


    assertEquals(123,msg.getInt("prop"));
   
    // Long
    msg = new MapMessageImpl();
    msg.setString("prop","123");
    msg.markAsReadOnly();
    assertEquals(123,msg.getLong("prop"));
   
    // Float
    msg = new MapMessageImpl();
    msg.setString("prop","123");
View Full Code Here


    assertEquals(123,msg.getLong("prop"));
   
    // Float
    msg = new MapMessageImpl();
    msg.setString("prop","123");
    msg.markAsReadOnly();
    assertEquals(123,msg.getFloat("prop"),0);
   
    // Double
    msg = new MapMessageImpl();
    msg.setString("prop","123");
View Full Code Here

    assertEquals(123,msg.getFloat("prop"),0);
   
    // Double
    msg = new MapMessageImpl();
    msg.setString("prop","123");
    msg.markAsReadOnly();
    assertEquals(123,msg.getDouble("prop"),0);
   
    // String
    msg = new MapMessageImpl();
    msg.setString("prop","123");
View Full Code Here

    assertEquals(123,msg.getDouble("prop"),0);
   
    // String
    msg = new MapMessageImpl();
    msg.setString("prop","123");
    msg.markAsReadOnly();
    assertEquals("123",msg.getString("prop"));
   
    // Bytes
    msg = new MapMessageImpl();
    msg.setString("prop","123");
View Full Code Here

    assertEquals("123",msg.getString("prop"));
   
    // Bytes
    msg = new MapMessageImpl();
    msg.setString("prop","123");
    msg.markAsReadOnly();
    try { msg.getBytes("prop"); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals("123",msg.getString("prop"));
  }
 
  public void testBytesConversion() throws Exception
View Full Code Here

    byte[] dummy = { (byte)1 , (byte)2 , (byte)3 };
   
    // Boolean
    msg = new MapMessageImpl();
    msg.setBytes("prop",dummy);
    msg.markAsReadOnly();
    try { msg.getBoolean("prop"); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(3,msg.getBytes("prop").length);
   
    // Byte
    msg = new MapMessageImpl();
View Full Code Here

    assertEquals(3,msg.getBytes("prop").length);
   
    // Byte
    msg = new MapMessageImpl();
    msg.setBytes("prop",dummy);
    msg.markAsReadOnly();
    try { msg.getByte("prop"); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(3,msg.getBytes("prop").length);
   
    // Short
    msg = new MapMessageImpl();
View Full Code Here

    assertEquals(3,msg.getBytes("prop").length);
   
    // Short
    msg = new MapMessageImpl();
    msg.setBytes("prop",dummy);
    msg.markAsReadOnly();
    try { msg.getShort("prop"); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(3,msg.getBytes("prop").length);
   
    // Char
    msg = new MapMessageImpl();
View Full Code Here

    assertEquals(3,msg.getBytes("prop").length);
   
    // Char
    msg = new MapMessageImpl();
    msg.setBytes("prop",dummy);
    msg.markAsReadOnly();
    try { msg.getChar("prop"); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(3,msg.getBytes("prop").length);
   
    // Int
    msg = new MapMessageImpl();
View Full Code Here

    assertEquals(3,msg.getBytes("prop").length);
   
    // Int
    msg = new MapMessageImpl();
    msg.setBytes("prop",dummy);
    msg.markAsReadOnly();
    try { msg.getInt("prop"); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertEquals(3,msg.getBytes("prop").length);
   
    // Long
    msg = new MapMessageImpl();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.