blob: a51177865d1fc42430e13596a929886403df85c7 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 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 */
Toshio Koide485b4782014-10-20 19:34:21 -070016package org.onlab.onos.net.resource;
17
18import java.util.Collection;
19import java.util.Set;
20
21import org.onlab.onos.net.Link;
22import org.onlab.onos.net.intent.IntentId;
23
24/**
25 * Representation of a request for link resource.
26 */
Toshio Koide65e890f2014-10-23 12:02:25 -070027public interface LinkResourceRequest extends ResourceRequest {
Toshio Koide485b4782014-10-20 19:34:21 -070028
29 /**
30 * Returns the {@link IntentId} associated with the request.
31 *
32 * @return the {@link IntentId} associated with the request
33 */
Toshio Koide65e890f2014-10-23 12:02:25 -070034 IntentId intendId();
Toshio Koide485b4782014-10-20 19:34:21 -070035
36 /**
37 * Returns the set of target links.
38 *
39 * @return the set of target links
40 */
Toshio Koide65e890f2014-10-23 12:02:25 -070041 Collection<Link> links();
Toshio Koide485b4782014-10-20 19:34:21 -070042
43 /**
44 * Returns the set of resource requests.
45 *
46 * @return the set of resource requests
47 */
Toshio Koide65e890f2014-10-23 12:02:25 -070048 Set<ResourceRequest> resources();
Toshio Koide569ca702014-10-23 11:37:44 -070049
50 /**
51 * Builder of link resource request.
52 */
Toshio Koide65e890f2014-10-23 12:02:25 -070053 interface Builder {
54 /**
Toshio Koide569ca702014-10-23 11:37:44 -070055 * Adds lambda request.
56 *
57 * @return self
58 */
Toshio Koide65e890f2014-10-23 12:02:25 -070059 public Builder addLambdaRequest();
Toshio Koide569ca702014-10-23 11:37:44 -070060
61 /**
62 * Adds bandwidth request with bandwidth value.
63 *
64 * @param bandwidth bandwidth value to be requested
65 * @return self
66 */
Toshio Koide65e890f2014-10-23 12:02:25 -070067 public Builder addBandwidthRequest(double bandwidth);
Toshio Koide569ca702014-10-23 11:37:44 -070068
69 /**
70 * Returns link resource request.
71 *
72 * @return link resource request
73 */
Toshio Koide65e890f2014-10-23 12:02:25 -070074 public LinkResourceRequest build();
Toshio Koide569ca702014-10-23 11:37:44 -070075 }
Toshio Koide485b4782014-10-20 19:34:21 -070076}