Open Kilda Java Documentation
ISwitch.java
Go to the documentation of this file.
1 package org.openkilda.simulator.interfaces;
2 
8 
9 import org.projectfloodlight.openflow.types.DatapathId;
10 
11 import java.util.List;
12 import java.util.Map;
13 
14 public interface ISwitch {
15  void modState(SwitchState state) throws SimulatorException;
16 
17  void activate();
18 
19  void deactivate();
20 
21  boolean isActive();
22 
24 
25  void setControlPlaneLatency(int controlPlaneLatency);
26 
27  DatapathId getDpid();
28 
29  String getDpidAsString();
30 
31  void setDpid(DatapathId dpid);
32 
33  void setDpid(SwitchId dpid);
34 
35  List<IPortImpl> getPorts();
36 
37  IPortImpl getPort(int portNum) throws SimulatorException;
38 
40 
41  int getMaxPorts();
42 
43  void setMaxPorts(int maxPorts);
44 
45  Map<Long, IFlow> getFlows();
46 
47  IFlow getFlow(long cookie) throws SimulatorException;
48 
49  void addFlow(IFlow flow) throws SimulatorException;
50 
51  void modFlow(IFlow flow) throws SimulatorException;
52 
53  void delFlow(long cookie) throws SimulatorException;
54 
55  List<PortStatsEntry> getPortStats();
56 
57  PortStatsEntry getPortStats(int portNum);
58 }
List< PortStatsEntry > getPortStats()
void setControlPlaneLatency(int controlPlaneLatency)