Open Kilda Java Documentation
TopologyMessage.java
Go to the documentation of this file.
1 package org.openkilda.simulator.messages.simulator.command;
2 
3 import com.fasterxml.jackson.annotation.JsonInclude;
4 import com.fasterxml.jackson.annotation.JsonProperty;
5 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
6 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
10 
11 import java.util.List;
12 
13 import static com.google.common.base.MoreObjects.toStringHelper;
14 
15 @JsonSerialize
16 @JsonInclude(JsonInclude.Include.NON_NULL)
17 @JsonPropertyOrder(value = {
18  "type",
19  "switches",
20  "links"})
21 
22 public class TopologyMessage extends SimulatorMessage {
23  @JsonProperty("switches")
24  private List<SwitchMessage> switches;
25 
26  public TopologyMessage(@JsonProperty("switches") final List<SwitchMessage> switches,
27  @JsonProperty("links") final List<LinkMessage> links) {
28  this.switches = switches;
29  }
30 
31  public List<SwitchMessage> getSwitches() {
32  return switches;
33  }
34 
35  @Override
36  public String toString() {
37  return toStringHelper(this)
38  .add("switches", switches.toString())
39  .toString();
40  }
41 }
value
Definition: nodes.py:62
TopologyMessage(@JsonProperty("switches") final List< SwitchMessage > switches, @JsonProperty("links") final List< LinkMessage > links)