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.renderer.opflex.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
24 public class OpflexAgent {
29 JsonRpcEndpoint endpoint;
30 OpflexRpcServer opflexServer;
32 public OpflexAgent() {}
35 * Get the OpFlex administrative domain for this agent
39 public String getDomain() {
44 * Set the OpFlex administrative domain for this agent
48 public void setDomain(String domain) {
53 * Get the identity for this agent, as a String
57 public String getIdentity() {
62 * Set the identity for the agent.
66 public void setIdentity(String identity) {
67 this.identity = identity;
71 * Associate an {@link OpflexRpcServer} with this agent.
75 public OpflexRpcServer getOpflexServer() {
80 * Get the {@link OpflexRpcServer} associated with this agent
84 public void setOpflexServer(OpflexRpcServer server) {
85 this.opflexServer = server;
89 * Get the roles for this agent
93 public List<Role> getRoles() {
98 * Set the list of roles for this agent
102 public void setRoles(List<Role> roles) {
107 * Get the {@link JsonRpcEndpoint} for this agent
111 public JsonRpcEndpoint getEndpoint() {
116 * Set the {@link JsonRpcEndpoint} for this agent
120 public void setEndpoint(JsonRpcEndpoint endpoint) {
121 this.endpoint = endpoint;