Package eu.mosaic_cloud.components.tools

Examples of eu.mosaic_cloud.components.tools.DefaultChannelMessageCoder.decode()


    final DefaultChannelMessageCoder coder = DefaultChannelMessageCoder.defaultInstance;
    final int tries = 16;
    for (int index = 0; index < tries; index++) {
      final ChannelMessage outboundMessage = RandomMessageGenerator.defaultInstance.generateChannelMessage ();
      final ByteBuffer packet = coder.encode (outboundMessage);
      final ChannelMessage inboundMessage = coder.decode (packet);
      Assert.assertEquals (outboundMessage.metaData, inboundMessage.metaData);
      Assert.assertEquals (outboundMessage.data, inboundMessage.data);
    }
  }
}
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.