Open Kilda Java Documentation
SwitchInfoExtendedData.java
Go to the documentation of this file.
1 /* Copyright 2017 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.messaging.info.event;
17 
20 
21 import com.fasterxml.jackson.annotation.JsonCreator;
22 import com.fasterxml.jackson.annotation.JsonProperty;
23 
24 import java.util.List;
25 
26 public class SwitchInfoExtendedData extends SwitchInfoData {
27 
28  @JsonProperty("flows")
29  private List<FlowEntry> flows;
30 
31  @JsonCreator
33  @JsonProperty("switch_id") final SwitchId switchId,
34  @JsonProperty("state") final SwitchState state,
35  @JsonProperty("address") final String address,
36  @JsonProperty("hostname") final String hostname,
37  @JsonProperty("description") final String description,
38  @JsonProperty("controller") final String controller,
39  @JsonProperty("flows") final List<FlowEntry> flows) {
40  super(switchId, state, address, hostname, description, controller);
41  this.flows = flows;
42  }
43 
44  public SwitchInfoExtendedData(final SwitchInfoData sw, final List<FlowEntry> flows) {
45  super(sw.getSwitchId(), sw.getState(), sw.getAddress(), sw.getHostname(), sw.getDescription(),
46  sw.getController());
47  this.flows = flows;
48  }
49 }
SwitchInfoExtendedData( @JsonProperty("switch_id") final SwitchId switchId, @JsonProperty("state") final SwitchState state, @JsonProperty("address") final String address, @JsonProperty("hostname") final String hostname, @JsonProperty("description") final String description, @JsonProperty("controller") final String controller, @JsonProperty("flows") final List< FlowEntry > flows)
Definition: FlowEntry.java:29
SwitchInfoExtendedData(final SwitchInfoData sw, final List< FlowEntry > flows)