public class RegularSizeDistribution extends java.lang.Object implements PacketSizeDistribution
| Constructor and Description |
|---|
RegularSizeDistribution()
Creates a new RegularSizeDistribution with a default size value of 100
bytes.
|
RegularSizeDistribution(int size)
Creates a new RegularSizeDistribution with the given size (in bytes).s
|
| Modifier and Type | Method and Description |
|---|---|
int |
getSize() |
int |
getType() |
int |
nextSize()
Since packets following a regular size distribution have constant size,
this method simply returns the current size value for this
RegularSizeDistribution.
|
void |
setSize(int newSize)
Sets the packet size for this regular size distribution to the given
value, if it is valid (a positive value).
|
public RegularSizeDistribution()
public RegularSizeDistribution(int size)
public int getSize()
public void setSize(int newSize)
newSize - the desired new size, in bytesjava.lang.IllegalArgumentException - if newSize is <= 0public int getType()
getType in interface PacketSizeDistributionpublic int nextSize()
nextSize in interface PacketSizeDistribution