Marc De Leenheer | 48a91f7 | 2015-06-05 23:35:41 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 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 | 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; |
| 21 | import org.onlab.packet.MacAddress; |
| 22 | import org.onosproject.net.ConnectPoint; |
| 23 | import org.onosproject.routing.FibListener; |
| 24 | import org.onosproject.routing.IntentRequestListener; |
| 25 | import org.onosproject.routing.RouteEntry; |
| 26 | import org.onosproject.routing.RoutingService; |
| 27 | import org.onosproject.routing.StaticRoutingService; |
| 28 | |
| 29 | import java.util.Collection; |
| 30 | |
| 31 | /** |
| 32 | * Static router maintains handle to FIB listener. |
| 33 | * |
| 34 | * TODO: implement getRoutes methods |
| 35 | */ |
| 36 | @Component(immediate = true, enabled = false) |
| 37 | @Service |
| 38 | public class StaticRouter implements RoutingService, StaticRoutingService { |
| 39 | private FibListener fibListener; |
| 40 | |
| 41 | @Override |
| 42 | public void start() { |
| 43 | |
| 44 | } |
| 45 | |
| 46 | @Override |
| 47 | public void addFibListener(FibListener fibListener) { |
| 48 | this.fibListener = fibListener; |
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public void addIntentRequestListener(IntentRequestListener intentRequestListener) { |
| 53 | |
| 54 | } |
| 55 | |
| 56 | @Override |
| 57 | public void stop() { |
| 58 | |
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | public Collection<RouteEntry> getRoutes4() { |
| 63 | return null; |
| 64 | } |
| 65 | |
| 66 | @Override |
| 67 | public Collection<RouteEntry> getRoutes6() { |
| 68 | return null; |
| 69 | } |
| 70 | |
| 71 | @Override |
| 72 | public LocationType getLocationType(IpAddress ipAddress) { |
| 73 | return null; |
| 74 | } |
| 75 | |
| 76 | @Override |
| 77 | public RouteEntry getLongestMatchableRouteEntry(IpAddress ipAddress) { |
| 78 | return null; |
| 79 | } |
| 80 | |
| 81 | @Override |
| 82 | public ConnectPoint getEgressConnectPoint(IpAddress dstIpAddress) { |
| 83 | return null; |
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public void packetReactiveProcessor(IpAddress dstIpAddress, IpAddress srcIpAddress, |
| 88 | ConnectPoint srcConnectPoint, MacAddress srcMacAddress) { |
| 89 | |
| 90 | } |
| 91 | |
| 92 | @Override |
| 93 | public FibListener getFibListener() { |
| 94 | return fibListener; |
| 95 | } |
| 96 | |
| 97 | } |