Added range type to subject-feature-definition/parameter
[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.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  */
25 public class OpflexAgent {
26     String identity;
27     String domain;
28     List<Role> roles;
29     JsonRpcEndpoint endpoint;
30     OpflexRpcServer opflexServer;
31
32     public OpflexAgent() {
33     }
34
35     /**
36      * Get the OpFlex administrative domain for this agent
37      *
38      * @return
39      */
40     public String getDomain() {
41         return domain;
42     }
43
44     /**
45      * Set the OpFlex administrative domain for this agent
46      *
47      * @param domain
48      */
49     public void setDomain(String domain) {
50         this.domain = domain;
51     }
52
53     /**
54      * Get the identity for this agent, as a String
55      *
56      * @return
57      */
58     public String getIdentity() {
59         return identity;
60     }
61
62     /**
63      * Set the identity for the agent.
64      *
65      * @param identity
66      */
67     public void setIdentity(String identity) {
68         this.identity = identity;
69     }
70
71     /**
72      * Associate an {@link OpflexRpcServer} with this agent.
73      *
74      * @return
75      */
76     public OpflexRpcServer getOpflexServer() {
77         return opflexServer;
78     }
79
80     /**
81      * Get the {@link OpflexRpcServer} associated with this agent
82      *
83      * @param server
84      */
85     public void setOpflexServer(OpflexRpcServer server) {
86         this.opflexServer = server;
87     }
88
89     /**
90      * Get the roles for this agent
91      *
92      * @return
93      */
94     public List<Role> getRoles() {
95         return roles;
96     }
97
98     /**
99      * Set the list of roles for this agent
100      *
101      * @param roles
102      */
103     public void setRoles(List<Role> roles) {
104         this.roles = roles;
105     }
106
107     /**
108      * Get the {@link JsonRpcEndpoint} for this agent
109      *
110      * @return
111      */
112     public JsonRpcEndpoint getEndpoint() {
113         return endpoint;
114     }
115
116     /**
117      * Set the {@link JsonRpcEndpoint} for this agent
118      *
119      * @param endpoint
120      */
121     public void setEndpoint(JsonRpcEndpoint endpoint) {
122         this.endpoint = endpoint;
123     }
124
125 }