Package eu.rekawek.toxiproxy.model.toxic
Class Slicer
- java.lang.Object
-
- eu.rekawek.toxiproxy.model.Toxic
-
- eu.rekawek.toxiproxy.model.toxic.Slicer
-
public class Slicer extends Toxic
-
-
Constructor Summary
Constructors Constructor Description Slicer(HttpClient httpClient, String path, com.google.gson.JsonObject json)Slicer(HttpClient httpClient, String toxicListPath, String name, ToxicDirection stream, long averageSize, long delay)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.gson.JsonObjectgetAttributes()longgetAverageSize()longgetDelay()longgetSizeVariation()protected ToxicTypegetType()protected voidsetAttributes(com.google.gson.JsonObject attributes)SlicersetAverageSize(long averageSize)SlicersetDelay(long delay)SlicersetSizeVariation(long sizeVariation)-
Methods inherited from class eu.rekawek.toxiproxy.model.Toxic
createToxic, getName, getStream, getToxicity, postAttribute, remove, setToxicity, toString
-
-
-
-
Constructor Detail
-
Slicer
public Slicer(HttpClient httpClient, String toxicListPath, String name, ToxicDirection stream, long averageSize, long delay) throws IOException
- Throws:
IOException
-
Slicer
public Slicer(HttpClient httpClient, String path, com.google.gson.JsonObject json)
-
-
Method Detail
-
setAttributes
protected void setAttributes(com.google.gson.JsonObject attributes)
- Specified by:
setAttributesin classToxic
-
getAttributes
protected com.google.gson.JsonObject getAttributes()
- Specified by:
getAttributesin classToxic
-
getAverageSize
public long getAverageSize()
-
getSizeVariation
public long getSizeVariation()
-
getDelay
public long getDelay()
-
setAverageSize
public Slicer setAverageSize(long averageSize) throws IOException
- Throws:
IOException
-
setSizeVariation
public Slicer setSizeVariation(long sizeVariation) throws IOException
- Throws:
IOException
-
setDelay
public Slicer setDelay(long delay) throws IOException
- Throws:
IOException
-
-