gov.nasa.gsfc.drl.rtstps.core.output.hdf5.UnitTest
Class NoCopyPacketFactory

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.UnitTest.NoCopyPacketFactory
All Implemented Interfaces:
PacketFactoryI

public class NoCopyPacketFactory
extends java.lang.Object
implements PacketFactoryI

A Packet is not created but simply used over and over again, although the data is copied into it. This more closely simulates how RT-STPS actually works (which keeps a packet pool and resuses packets) This is appropriate if the receiver of the packet actually copies it as well, which is true at the moment of the RDR builder code...


Field Summary
private static Packet packet
           
 
Constructor Summary
NoCopyPacketFactory()
           
 
Method Summary
 PacketI make(int index, byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

packet

private static Packet packet
Constructor Detail

NoCopyPacketFactory

public NoCopyPacketFactory()
Method Detail

make

public PacketI make(int index,
                    byte[] data)
Specified by:
make in interface PacketFactoryI