blob: 4d32eb77fe9a4e20461fe09ffcbc80a14a5d539b [file] [log] [blame]
Avantika-Huaweidbdf7722016-05-21 14:20:31 +05301/*
2 * Copyright 2016-present 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 */
16package org.onosproject.pce.util;
17
18import java.util.List;
Saurav Dasb5c236e2016-06-07 10:08:06 -070019import com.google.common.collect.ImmutableList;
Avantika-Huaweidbdf7722016-05-21 14:20:31 +053020import org.onosproject.net.DeviceId;
21import org.onosproject.net.flowobjective.FilteringObjective;
22import org.onosproject.net.flowobjective.FlowObjectiveService;
23import org.onosproject.net.flowobjective.ForwardingObjective;
24import org.onosproject.net.flowobjective.NextObjective;
25
26/**
27 * Test implementation of FlowObjectiveService.
28 */
29public class FlowObjServiceAdapter implements FlowObjectiveService {
30
31 private ForwardingObjective forwardingObjective;
32 @Override
33 public void filter(DeviceId deviceId, FilteringObjective filteringObjective) {
34
35 }
36
37 @Override
38 public void forward(DeviceId deviceId, ForwardingObjective forwardingObjective) {
39 this.forwardingObjective = forwardingObjective;
40 }
41
42 @Override
43 public void next(DeviceId deviceId, NextObjective nextObjective) {
44
45 }
46
47 @Override
48 public int allocateNextId() {
49 return 0;
50 }
51
52 @Override
53 public void initPolicy(String policy) {
54
55 }
56
57 public ForwardingObjective forwardingObjective() {
58 return forwardingObjective;
59 }
60
61 @Override
62 public List<String> getNextMappings() {
Saurav Dasb5c236e2016-06-07 10:08:06 -070063 return ImmutableList.of();
64 }
65
66 @Override
67 public List<String> getPendingNexts() {
68 return ImmutableList.of();
Avantika-Huaweidbdf7722016-05-21 14:20:31 +053069 }
70}