2 * Copyright (C) 2014 Cisco Systems, Inc.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 * Authors : Thomas Bachman
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages;
12 import java.util.ArrayList;
13 import java.util.List;
15 import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage;
17 import com.fasterxml.jackson.annotation.JsonIgnore;
18 import com.fasterxml.jackson.databind.JsonNode;
19 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
20 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
24 public class IdentityResponse extends RpcMessage {
26 public static final String IDENTITY_MESSAGE_RESPONSE = "send_identity_response";
28 static public class Peer {
29 private List<String> role;
30 private String connectivity_info;
32 public List<String> getRole() {
36 public void setRole(List<String> role) {
40 public String getConnectivity_info() {
41 return connectivity_info;
44 public void setConnectivity_info(String connectivity_info) {
45 this.connectivity_info = connectivity_info;
52 static public class Result {
54 private String domain;
55 private List<String> my_role;
56 private List<Peer> peers;
58 public String getName() {
62 public void setName(String name) {
67 my_role = new ArrayList<String>();
70 public String getDomain() {
74 public void setDomain(String domain) {
78 public List<String> getMy_role() {
82 public void setMy_role(List<String> my_role) {
83 this.my_role = my_role;
86 public List<Peer> getPeers() {
90 public void setPeers(List<Peer> peers) {
96 private Result result;
97 private OpflexError error;
102 private String method;
105 public JsonNode getId() {
110 public void setId(JsonNode id) {
114 public OpflexError getError() {
118 public void setError(OpflexError error) {
123 public String getMethod() {
128 public void setMethod(String method) {
131 public Result getResult() {
135 public void setResult(Result result) {
136 this.result = result;
139 public IdentityResponse(String name) {
143 public IdentityResponse() {
144 this.name = IDENTITY_MESSAGE_RESPONSE;
148 public String getName() {
153 public void setName(String name) {
159 public boolean valid() {