SwitchNull

final class SwitchNull implements Switch

A class that implements the Null Object Design Pattern for Switch class.

Author:Manoel Campos da Silva Filho

See also: Switch.NULL

Methods

addPacketToBeSentToDownlinkSwitch

public void addPacketToBeSentToDownlinkSwitch(Switch downlinkSwitch, HostPacket packet)

addPacketToBeSentToHost

public void addPacketToBeSentToHost(NetworkHost host, HostPacket packet)

addPacketToBeSentToUplinkSwitch

public void addPacketToBeSentToUplinkSwitch(Switch uplinkSwitch, HostPacket packet)

compareTo

public int compareTo(SimEntity entity)

connectHost

public void connectHost(NetworkHost host)

disconnectHost

public boolean disconnectHost(NetworkHost host)

getDatacenter

public NetworkDatacenter getDatacenter()

getDownlinkBandwidth

public double getDownlinkBandwidth()

getDownlinkSwitchPacketList

public List<HostPacket> getDownlinkSwitchPacketList(Switch swt)

getDownlinkSwitches

public List<Switch> getDownlinkSwitches()

getHostList

public List<NetworkHost> getHostList()

getHostPacketList

public List<HostPacket> getHostPacketList(NetworkHost host)

getId

public long getId()

getLevel

public int getLevel()

getName

public String getName()

getPacketList

public List<HostPacket> getPacketList()

getPacketToHostMap

public Map<NetworkHost, List<HostPacket>> getPacketToHostMap()

getPorts

public int getPorts()

getSimulation

public Simulation getSimulation()

getState

public State getState()

getSwitchingDelay

public double getSwitchingDelay()

getUplinkBandwidth

public double getUplinkBandwidth()

getUplinkSwitchPacketList

public List<HostPacket> getUplinkSwitchPacketList(Switch swt)

getUplinkSwitchPacketMap

public Map<Switch, List<HostPacket>> getUplinkSwitchPacketMap()

getUplinkSwitches

public List<Switch> getUplinkSwitches()

isAlive

public boolean isAlive()

isFinished

public boolean isFinished()

isStarted

public boolean isStarted()

processEvent

public void processEvent(SimEvent evt)

run

public void run()

schedule

public boolean schedule(SimEvent evt)

schedule

public boolean schedule(SimEntity dest, double delay, int tag, Object data)

schedule

public boolean schedule(double delay, int tag, Object data)

schedule

public boolean schedule(SimEntity dest, double delay, int tag)

setDatacenter

public void setDatacenter(NetworkDatacenter datacenter)

setDownlinkBandwidth

public void setDownlinkBandwidth(double downlinkBandwidth)

setName

public SimEntity setName(String newName)

setPorts

public void setPorts(int ports)

setSimulation

public SimEntity setSimulation(Simulation simulation)

setState

public SimEntity setState(State state)

setSwitchingDelay

public void setSwitchingDelay(double switchingDelay)

setUplinkBandwidth

public void setUplinkBandwidth(double uplinkBandwidth)

shutdownEntity

public void shutdownEntity()

start

public void start()