Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 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 | package org.onosproject.routing.impl; |
| 17 | |
| 18 | import org.apache.felix.scr.annotations.Component; |
| 19 | import org.apache.felix.scr.annotations.Service; |
| 20 | import org.onlab.packet.IpAddress; |
Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 21 | import org.onosproject.routing.FibListener; |
Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 22 | import org.onosproject.routing.RouteEntry; |
| 23 | import org.onosproject.routing.RoutingService; |
| 24 | import org.onosproject.routing.StaticRoutingService; |
| 25 | |
| 26 | import java.util.Collection; |
| 27 | |
| 28 | /** |
| 29 | * Static router maintains handle to FIB listener. |
| 30 | * |
| 31 | * TODO: implement getRoutes methods |
| 32 | */ |
| 33 | @Component(immediate = true, enabled = false) |
| 34 | @Service |
| 35 | public class StaticRouter implements RoutingService, StaticRoutingService { |
| 36 | private FibListener fibListener; |
| 37 | |
| 38 | @Override |
| 39 | public void start() { |
| 40 | |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public void addFibListener(FibListener fibListener) { |
| 45 | this.fibListener = fibListener; |
| 46 | } |
| 47 | |
| 48 | @Override |
Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 49 | public void stop() { |
| 50 | |
| 51 | } |
| 52 | |
| 53 | @Override |
| 54 | public Collection<RouteEntry> getRoutes4() { |
| 55 | return null; |
| 56 | } |
| 57 | |
| 58 | @Override |
| 59 | public Collection<RouteEntry> getRoutes6() { |
| 60 | return null; |
| 61 | } |
| 62 | |
| 63 | @Override |
Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 64 | public RouteEntry getLongestMatchableRouteEntry(IpAddress ipAddress) { |
| 65 | return null; |
| 66 | } |
| 67 | |
| 68 | @Override |
Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 69 | public FibListener getFibListener() { |
| 70 | return fibListener; |
| 71 | } |
| 72 | |
| 73 | } |