Feature uses features-parent as parent
[groupbasedpolicy.git] / renderers / opflex / src / main / java / org / opendaylight / groupbasedpolicy / renderer / opflex / lib / OpflexAgent.java
1 /*
2  * Copyright (C) 2014 Cisco Systems, Inc.
3  * 
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
7  * 
8  * Authors : Thomas Bachman
9  */
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.lib;
11
12 import java.util.List;
13
14 import org.opendaylight.groupbasedpolicy.renderer.opflex.jsonrpc.JsonRpcEndpoint;
15
16 /**
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
20  * for that server.
21  *
22  * @author tbachman
23  */
24 public class OpflexAgent {
25
26     String identity;
27     String domain;
28     List<Role> roles;
29     JsonRpcEndpoint endpoint;
30     OpflexRpcServer opflexServer;
31
32     public OpflexAgent() {}
33
34     /**
35      * Get the OpFlex administrative domain for this agent
36      *
37      * @return
38      */
39     public String getDomain() {
40         return domain;
41     }
42
43     /**
44      * Set the OpFlex administrative domain for this agent
45      *
46      * @param domain
47      */
48     public void setDomain(String domain) {
49         this.domain = domain;
50     }
51
52     /**
53      * Get the identity for this agent, as a String
54      *
55      * @return
56      */
57     public String getIdentity() {
58         return identity;
59     }
60
61     /**
62      * Set the identity for the agent.
63      *
64      * @param identity
65      */
66     public void setIdentity(String identity) {
67         this.identity = identity;
68     }
69
70     /**
71      * Associate an {@link OpflexRpcServer} with this agent.
72      *
73      * @return
74      */
75     public OpflexRpcServer getOpflexServer() {
76         return opflexServer;
77     }
78
79     /**
80      * Get the {@link OpflexRpcServer} associated with this agent
81      *
82      * @param server
83      */
84     public void setOpflexServer(OpflexRpcServer server) {
85         this.opflexServer = server;
86     }
87
88     /**
89      * Get the roles for this agent
90      *
91      * @return
92      */
93     public List<Role> getRoles() {
94         return roles;
95     }
96
97     /**
98      * Set the list of roles for this agent
99      *
100      * @param roles
101      */
102     public void setRoles(List<Role> roles) {
103         this.roles = roles;
104     }
105
106     /**
107      * Get the {@link JsonRpcEndpoint} for this agent
108      *
109      * @return
110      */
111     public JsonRpcEndpoint getEndpoint() {
112         return endpoint;
113     }
114
115     /**
116      * Set the {@link JsonRpcEndpoint} for this agent
117      *
118      * @param endpoint
119      */
120     public void setEndpoint(JsonRpcEndpoint endpoint) {
121         this.endpoint = endpoint;
122     }
123
124 }