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;
12 import java.util.List;
14 import org.opendaylight.groupbasedpolicy.jsonrpc.JsonRpcEndpoint;
17 * Represents a participant in an OpFlex domain. It
18 * contains references to the {@link OpflexRpcServer} that
19 * it communicates with (i.e. peer), and indicates the roles
25 public class OpflexAgent {
29 JsonRpcEndpoint endpoint;
30 OpflexRpcServer opflexServer;
32 public OpflexAgent() {
36 * Get the OpFlex administrative domain for this agent
40 public String getDomain() {
45 * Set the OpFlex administrative domain for this agent
49 public void setDomain(String domain) {
54 * Get the identity for this agent, as a String
58 public String getIdentity() {
63 * Set the identity for the agent.
67 public void setIdentity(String identity) {
68 this.identity = identity;
72 * Associate an {@link OpflexRpcServer} with this agent.
76 public OpflexRpcServer getOpflexServer() {
81 * Get the {@link OpflexRpcServer} associated with this agent
85 public void setOpflexServer(OpflexRpcServer server) {
86 this.opflexServer = server;
90 * Get the roles for this agent
94 public List<Role> getRoles() {
99 * Set the list of roles for this agent
103 public void setRoles(List<Role> roles) {
108 * Get the {@link JsonRpcEndpoint} for this agent
112 public JsonRpcEndpoint getEndpoint() {
117 * Set the {@link JsonRpcEndpoint} for this agent
121 public void setEndpoint(JsonRpcEndpoint endpoint) {
122 this.endpoint = endpoint;