Jian Li | 7ccc3a8 | 2016-12-09 01:30:56 +0900 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.lisp.ctl; |
| 17 | |
| 18 | import io.netty.channel.Channel; |
| 19 | import org.onlab.packet.IpAddress; |
| 20 | import org.onosproject.lisp.msg.protocols.LispMessage; |
| 21 | import org.onosproject.net.Device; |
| 22 | |
| 23 | /** |
| 24 | * Test adapter for the LISP router interface. |
| 25 | */ |
| 26 | public class LispRouterAdapter implements LispRouter { |
Jian Li | 0dab596 | 2016-12-15 03:44:28 +0900 | [diff] [blame] | 27 | |
| 28 | private boolean subscribed; |
| 29 | |
Jian Li | 7ccc3a8 | 2016-12-09 01:30:56 +0900 | [diff] [blame] | 30 | @Override |
| 31 | public void sendMessage(LispMessage msg) { |
| 32 | |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public void handleMessage(LispMessage msg) { |
| 37 | |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | public Device.Type deviceType() { |
| 42 | return null; |
| 43 | } |
| 44 | |
| 45 | @Override |
| 46 | public String channelId() { |
| 47 | return null; |
| 48 | } |
| 49 | |
| 50 | @Override |
| 51 | public void setChannel(Channel channel) { |
| 52 | |
| 53 | } |
| 54 | |
| 55 | @Override |
| 56 | public String stringId() { |
| 57 | return null; |
| 58 | } |
| 59 | |
| 60 | @Override |
| 61 | public IpAddress routerId() { |
| 62 | return null; |
| 63 | } |
| 64 | |
| 65 | @Override |
| 66 | public boolean isConnected() { |
| 67 | return false; |
| 68 | } |
Jian Li | 834ff72 | 2016-12-13 19:43:02 +0900 | [diff] [blame] | 69 | |
| 70 | @Override |
| 71 | public void setConnected(boolean connected) { |
| 72 | |
| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public boolean isSubscribed() { |
Jian Li | 0dab596 | 2016-12-15 03:44:28 +0900 | [diff] [blame] | 77 | return subscribed; |
Jian Li | 834ff72 | 2016-12-13 19:43:02 +0900 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | @Override |
| 81 | public void setSubscribed(boolean subscribed) { |
Jian Li | 0dab596 | 2016-12-15 03:44:28 +0900 | [diff] [blame] | 82 | this.subscribed = subscribed; |
Jian Li | 834ff72 | 2016-12-13 19:43:02 +0900 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | @Override |
| 86 | public void setAgent(LispRouterAgent agent) { |
| 87 | |
| 88 | } |
| 89 | |
| 90 | @Override |
| 91 | public boolean connectRouter() { |
| 92 | return false; |
| 93 | } |
| 94 | |
| 95 | @Override |
| 96 | public void disconnectRouter() { |
| 97 | |
| 98 | } |
Jian Li | 7ccc3a8 | 2016-12-09 01:30:56 +0900 | [diff] [blame] | 99 | } |