Showing
4 changed files
with
28 additions
and
6 deletions
... | @@ -3,6 +3,14 @@ package org.onlab.onos.net.resource; | ... | @@ -3,6 +3,14 @@ package org.onlab.onos.net.resource; |
3 | /** | 3 | /** |
4 | * Representation of allocated bandwidth resource. | 4 | * Representation of allocated bandwidth resource. |
5 | */ | 5 | */ |
6 | -public interface BandwidthResourceAllocation extends BandwidthResourceRequest { | 6 | +public class BandwidthResourceAllocation extends BandwidthResourceRequest { |
7 | - | 7 | + /** |
8 | + * Creates a new {@link BandwidthResourceAllocation} with {@link Bandwidth} | ||
9 | + * object. | ||
10 | + * | ||
11 | + * @param bandwidth allocated bandwidth | ||
12 | + */ | ||
13 | + public BandwidthResourceAllocation(Bandwidth bandwidth) { | ||
14 | + super(bandwidth); | ||
15 | + } | ||
8 | } | 16 | } | ... | ... |
... | @@ -3,7 +3,7 @@ package org.onlab.onos.net.resource; | ... | @@ -3,7 +3,7 @@ package org.onlab.onos.net.resource; |
3 | /** | 3 | /** |
4 | * Representation of a request for bandwidth resource. | 4 | * Representation of a request for bandwidth resource. |
5 | */ | 5 | */ |
6 | -public final class BandwidthResourceRequest implements ResourceRequest { | 6 | +public class BandwidthResourceRequest implements ResourceRequest { |
7 | private final Bandwidth bandwidth; | 7 | private final Bandwidth bandwidth; |
8 | 8 | ||
9 | /** | 9 | /** | ... | ... |
... | @@ -3,11 +3,25 @@ package org.onlab.onos.net.resource; | ... | @@ -3,11 +3,25 @@ package org.onlab.onos.net.resource; |
3 | /** | 3 | /** |
4 | * Representation of allocated lambda resource. | 4 | * Representation of allocated lambda resource. |
5 | */ | 5 | */ |
6 | -public interface LambdaResourceAllocation extends LambdaResourceRequest { | 6 | +public class LambdaResourceAllocation extends LambdaResourceRequest { |
7 | + private final Lambda lambda; | ||
8 | + | ||
9 | + /** | ||
10 | + * Creates a new {@link LambdaResourceAllocation} with {@link Lambda} | ||
11 | + * object. | ||
12 | + * | ||
13 | + * @param lambda allocated lambda | ||
14 | + */ | ||
15 | + public LambdaResourceAllocation(Lambda lambda) { | ||
16 | + this.lambda = lambda; | ||
17 | + } | ||
18 | + | ||
7 | /** | 19 | /** |
8 | * Returns the lambda resource. | 20 | * Returns the lambda resource. |
9 | * | 21 | * |
10 | * @return the lambda resource | 22 | * @return the lambda resource |
11 | */ | 23 | */ |
12 | - Lambda lambda(); | 24 | + Lambda lambda() { |
25 | + return lambda; | ||
26 | + } | ||
13 | } | 27 | } | ... | ... |
... | @@ -5,7 +5,7 @@ import org.onlab.onos.net.Link; | ... | @@ -5,7 +5,7 @@ import org.onlab.onos.net.Link; |
5 | /** | 5 | /** |
6 | * Representation of allocated link resources. | 6 | * Representation of allocated link resources. |
7 | */ | 7 | */ |
8 | -public interface LinkResourceAllocations extends LinkResourceRequest { | 8 | +public interface LinkResourceAllocations { |
9 | /** | 9 | /** |
10 | * Returns allocated resource for the given link. | 10 | * Returns allocated resource for the given link. |
11 | * | 11 | * | ... | ... |
-
Please register or login to post a comment