Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.MessageAckWriter.writePacketToByteArray()


        ack.setDestination(destination);

    MessageAckWriter writer = new MessageAckWriter();
    MessageAckReader reader = new MessageAckReader();
    try {
      byte[] data = writer.writePacketToByteArray(ack);
      MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);

      assertTrue(mack.getId().equals(this.id));
      assertTrue(mack.getConsumerId().equals(this.consumerId));
            assertTrue(mack.getTransactionId().equals(this.transactedId));
View Full Code Here


    MessageAckReader reader = new MessageAckReader();
    try {
      int count = 100000;
      long startTime = System.currentTimeMillis();
      for (int i = 0; i < count; i++) {
        byte[] data = writer.writePacketToByteArray(ack);
        MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);
      }
      long finishTime = System.currentTimeMillis();
      long totalTime = finishTime - startTime;
      long ps = (count * 1000) / totalTime;
View Full Code Here

        ack.setMessageRead(this.messageRead);

    MessageAckWriter writer = new MessageAckWriter();
    MessageAckReader reader = new MessageAckReader();
    try {
      byte[] data = writer.writePacketToByteArray(ack);
      MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);

      assertTrue(mack.getId().equals(this.id));
      assertTrue(mack.getConsumerId().equals(this.consumerId));
            assertTrue(mack.getTransactionId().equals(this.transactedId));
View Full Code Here

    MessageAckReader reader = new MessageAckReader();
    try {
      int count = 100000;
      long startTime = System.currentTimeMillis();
      for (int i = 0; i < count; i++) {
        byte[] data = writer.writePacketToByteArray(ack);
        MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);
      }
      long finishTime = System.currentTimeMillis();
      long totalTime = finishTime - startTime;
      long ps = (count * 1000) / totalTime;
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.