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