|
Bully Task (12.12.2005) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.jku.fim.datalinksimulation.genericdevices.HardwareComponent
at.jku.fim.datalinksimulation.layer1.wire.Wire
at.jku.fim.datalinksimulation.layer1.wire.StandardWire
at.jku.fim.datalinksimulation.layer1.wire.damagedwire.DamagedWire
public class DamagedWire
Title: OSI Simulation Framework
Copyright: (c) 2004-05
Company: FIM@JKU, www.fim.uni-linz.ac.at
Field Summary | |
---|---|
protected boolean |
damagingEnabled
if value is set to true, damaging is performed |
protected DamagingStrategy |
damagingStrategy
the strategy implementation used to "confuse" data |
Fields inherited from class at.jku.fim.datalinksimulation.layer1.wire.StandardWire |
---|
connectors |
Fields inherited from class at.jku.fim.datalinksimulation.genericdevices.HardwareComponent |
---|
networkComponentId |
Constructor Summary | |
---|---|
DamagedWire(DamagingStrategy strategy)
Constructor |
Method Summary | |
---|---|
DamagingStrategy |
getDamagingStrategy()
|
boolean |
isDamagingEnabled()
|
void |
send(WireConnector sender,
RawData data)
Send data to the wire; the data should automatically be forwarded to the directly connected WireConnectors |
void |
setDamagingEnabled(boolean damagingEnabled)
Enable or disable data damaging |
void |
setDamagingStrategy(DamagingStrategy damagingStrategy)
Set a new damaging strategy |
Methods inherited from class at.jku.fim.datalinksimulation.layer1.wire.StandardWire |
---|
connect, disconnect |
Methods inherited from class at.jku.fim.datalinksimulation.layer1.wire.Wire |
---|
connect, disconnect |
Methods inherited from class at.jku.fim.datalinksimulation.genericdevices.HardwareComponent |
---|
getNetworkComponentId, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected DamagingStrategy damagingStrategy
protected boolean damagingEnabled
Constructor Detail |
---|
public DamagedWire(DamagingStrategy strategy)
strategy
- Inital damaging strategy; damaging is enabled by defaultMethod Detail |
---|
public void send(WireConnector sender, RawData data)
Wire
send
in class StandardWire
data
- The data to sendpublic DamagingStrategy getDamagingStrategy()
public void setDamagingStrategy(DamagingStrategy damagingStrategy)
damagingStrategy
- New damaging strategy or nullpublic boolean isDamagingEnabled()
public void setDamagingEnabled(boolean damagingEnabled)
damagingEnabled
- Switch
|
Bully Task (12.12.2005) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |