Package net.timewalker.ffmq3.common.message

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


    StreamMessageImpl msg;
   
    // Boolean
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    assertTrue(msg.readBoolean());
   
    // Byte
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
View Full Code Here


    assertTrue(msg.readBoolean());
   
    // Byte
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readByte(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertTrue(msg.readBoolean());
   
    // Short
    msg = new StreamMessageImpl();
View Full Code Here

    assertTrue(msg.readBoolean());
   
    // Short
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());

    // Char
    msg = new StreamMessageImpl();
View Full Code Here

    assertTrue(msg.readBoolean());

    // Char
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readChar(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertTrue(msg.readBoolean());
   
    // Int
    msg = new StreamMessageImpl();
View Full Code Here

    assertTrue(msg.readBoolean());
   
    // Int
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readInt(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Long
    msg = new StreamMessageImpl();
View Full Code Here

    assertTrue(msg.readBoolean());
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readLong(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Float
    msg = new StreamMessageImpl();
View Full Code Here

    assertTrue(msg.readBoolean());
   
    // Float
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Double
    msg = new StreamMessageImpl();
View Full Code Here

    StreamMessageImpl msg;
   
    // Boolean
    msg = new StreamMessageImpl();
    msg.writeLong(123);
    msg.markAsReadOnly();
    try { msg.readBoolean(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(123,msg.readLong());
   
    // Byte
    msg = new StreamMessageImpl();
View Full Code Here

    assertEquals(123,msg.readLong());
   
    // Byte
    msg = new StreamMessageImpl();
    msg.writeLong(123);
    msg.markAsReadOnly();
    try { msg.readByte(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(123,msg.readLong());
   
    // Short
    msg = new StreamMessageImpl();
View Full Code Here

    assertEquals(123,msg.readLong());
   
    // Short
    msg = new StreamMessageImpl();
    msg.writeLong(123);
    msg.markAsReadOnly();
    try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */  }
    assertEquals(123,msg.readLong());
   
    // Char
    msg = new StreamMessageImpl();
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.