verinec.netsim.entities.packets
Class Leaf
java.lang.Object
desmoj.core.simulator.NamedObject
desmoj.core.simulator.ModelComponent
desmoj.core.simulator.Schedulable
desmoj.core.simulator.Entity
verinec.netsim.entities.packets.Packet
verinec.netsim.entities.packets.Leaf
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- ARPPacket, DLPacket, IPPacket, UDPPacket
public abstract class Leaf
- extends Packet
A Leaf in the composite Design Pattern. A Leaf is a Packet that contains
itself no more other Packets.
- Version:
- $Revision:835 $
- Author:
- Dominik Jungo
| Methods inherited from class desmoj.core.simulator.Entity |
getPriority, isEqual, isLarger, isLargerOrEqual, isNotEqual, isSimProcess, isSmaller, isSmallerOrEqual, numQueues, schedule, scheduleAfter, scheduleBefore, setPriority |
| Methods inherited from class desmoj.core.simulator.ModelComponent |
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn |
payload
private Object payload
Leaf
public Leaf(Model owner)
- Parameters:
owner -
Leaf
public Leaf(Model owner,
Object payload)
- Creates a new Leaf
- Parameters:
owner - a Modelpayload - the Packets payload
getPayload
public Object getPayload()
- Description copied from class:
Packet
- gets the packets payload
- Specified by:
getPayload in class Packet
- Returns:
- the packets payload
- See Also:
Packet.getPayload()
setPayload
public void setPayload(Object payload)
- adds payload to the packet
- Parameters:
payload - a payload
toString
public String toString()
- Description copied from class:
Packet
- This returns a String representation of the Packet.
- Overrides:
toString in class Packet
- Returns:
- the a String representation of the Packet
- See Also:
Packet.toString()
clone
public Object clone()
throws CloneNotSupportedException
- Specified by:
clone in class Packet
- Throws:
CloneNotSupportedException- See Also:
Object.clone()
selfClone
protected abstract Leaf selfClone()
deepClone
private final Object deepClone()
throws CloneNotSupportedException
- Throws:
CloneNotSupportedException