blob: ec4e2579c835d7bc24469a2f921002540a9c8754 [file] [log] [blame]
Mahesh Poojary Sd7a36922016-04-01 16:11:14 +05301/*
2 * Copyright 2016 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.pce.pceservice;
18
19import org.onosproject.incubator.net.tunnel.Tunnel;
20import org.onosproject.incubator.net.tunnel.TunnelId;
21import org.onosproject.net.intent.Constraint;
22import org.onosproject.pce.pceservice.DefaultPcePath.Builder;
23
24/**
25 * Abstraction of an entity which provides functionalities of pce path.
26 */
27public interface PcePath {
28
29 /**
30 * Returns the attribute path id.
31 *
32 * @return path id
33 */
34 TunnelId id();
35
36 /**
37 * Sets the attribute path id.
38 *
39 * @param id path id
40 */
41 void id(TunnelId id);
42
43 /**
44 * Returns the attribute ingress.
45 *
46 * @return source
47 */
48 String source();
49
50 /**
51 * Sets the attribute ingress.
52 *
53 * @param src pce source
54 */
55 void source(String src);
56
57 /**
58 * Returns the attribute egress.
59 *
60 * @return destination
61 */
62 String destination();
63
64 /**
65 * Sets the attribute egress.
66 *
67 * @param dst pce destination.
68 */
69 void destination(String dst);
70
71 /**
72 * Returns the attribute lspType.
73 *
74 * @return lspType
75 */
76 LspType lspType();
77
78 /**
79 * Returns the attribute symbolic-path-name.
80 *
81 * @return symbolic-path-name
82 */
83 String name();
84
85 /**
86 * Returns the attribute cost constraint.
87 *
88 * @return cost constraint
89 */
90 Constraint costConstraint();
91
92 /**
93 * Returns the attribute bandwidth constraint.
94 *
95 * @return bandwidth constraint
96 */
97 Constraint bandwidthConstraint();
98
99 /**
100 * Copies only non-null or non-zero member variables.
101 *
102 * @param id path-id
103 * @return pce-path
104 */
105 PcePath copy(PcePath id);
106
107 /**
108 * Builder for pce path.
109 */
110 interface Builder {
111
112 /**
113 * Returns the builder object of path id.
114 *
115 * @param id path id
116 * @return builder object of path id
117 */
118 Builder id(String id);
119
120 /**
121 * Returns the builder object of ingress.
122 *
123 * @param source ingress
124 * @return builder object of ingress
125 */
126 Builder source(String source);
127
128 /**
129 * Returns the builder object of egress.
130 *
131 * @param destination egress
132 * @return builder object of egress
133 */
134 Builder destination(String destination);
135
136 /**
137 * Returns the builder object of lspType.
138 *
139 * @param lspType lsp type
140 * @return builder object of lsp type
141 */
142 Builder lspType(String lspType);
143
144 /**
145 * Returns the builder object of symbolic-path-name.
146 *
147 * @param n symbolic-path-name
148 * @return builder object of symbolic-path-name
149 */
150 Builder name(String n);
151
152 /**
153 * Returns the builder object of cost constraint.
154 *
155 * @param cost constraint
156 * @return builder object of cost constraint
157 */
158 Builder costConstraint(String cost);
159
160 /**
161 * Returns the builder object of bandwidth constraint.
162 *
163 * @param bandwidth constraint
164 * @return builder object of bandwidth constraint
165 */
166 Builder bandwidthConstraint(String bandwidth);
167
168 /**
169 * Copies tunnel information to local.
170 *
171 * @param tunnel pcc tunnel
172 * @return object of pce-path
173 */
174 Builder of(Tunnel tunnel);
175
176 /**
177 * Builds object of pce path.
178 *
179 * @return object of pce path.
180 */
181 PcePath build();
182 }
183}