|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.comp.Component
|
+--drcl.net.traffic.TrafficComponent
|
+--drcl.net.traffic.TrafficShaperComponent
This component is the base class for regulating incoming packets and outputing the packets
according to the associated traffic model.
A TrafficShaperComponent expects input data in Packet and outputs either the incoming
packet or an enclosing packet that encapsulates the incoming packet.
A TrafficShaperComponent holds a TrafficShaper object that does the real job.
One may plug in a different TrafficShaper object to create a different traffic shaper component.
TrafficShaper, Serialized Form| Inner classes inherited from class drcl.comp.Component |
Component.LockPack |
| Fields inherited from class drcl.net.traffic.TrafficComponent |
downPort, timerPort |
| Constructor Summary | |
TrafficShaperComponent()
|
|
TrafficShaperComponent(java.lang.String id_)
|
|
TrafficShaperComponent(TrafficShaper shaper_)
|
|
| Method Summary | |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
int |
getBufferSize()
Returns the (maximum) buffer size of this traffic shaper (byte). |
TrafficShaper |
getShaper()
Returns the associated TrafficShaper instance. |
TrafficModel |
getTrafficModel()
Returns the associated traffic model. |
java.lang.String |
info(java.lang.String prefix_)
|
protected void |
process(java.lang.Object data_,
Port inPort_)
The main callback method of a component. |
void |
reset()
Resets the component for being used anew. |
void |
setBufferSize(int size_)
Sets the (maximum) buffer size of this traffic shaper (byte). |
void |
setShaper(TrafficShaper shaper_)
Installs the TrafficShaper instance. |
void |
setTrafficModel(TrafficModel traffic_)
Sets the associated traffic model. |
| Methods inherited from class drcl.net.traffic.TrafficComponent |
getPacketWrapper, info, setPacketWrapper |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TrafficShaperComponent()
public TrafficShaperComponent(TrafficShaper shaper_)
public TrafficShaperComponent(java.lang.String id_)
| Method Detail |
public void reset()
Componentreset in class Componentpublic void duplicate(java.lang.Object source_)
Componentduplicate in class TrafficComponentpublic java.lang.String info(java.lang.String prefix_)
info in class TrafficComponent
protected void process(java.lang.Object data_,
Port inPort_)
Componentprocess in class Componentdrcl.comp.Componentdata_ - the arrival data.inPort_ - the port where the data arrives.public void setShaper(TrafficShaper shaper_)
TrafficShaper instance.public TrafficShaper getShaper()
TrafficShaper instance.public TrafficModel getTrafficModel()
TrafficComponentgetTrafficModel in class TrafficComponentpublic void setTrafficModel(TrafficModel traffic_)
TrafficComponentsetTrafficModel in class TrafficComponentpublic void setBufferSize(int size_)
public int getBufferSize()
|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||