Jian Li | e4f1216 | 2016-09-13 00:09:09 +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.buffer.ByteBuf; |
| 19 | import org.onosproject.lisp.msg.protocols.LispMessage; |
| 20 | import org.onosproject.lisp.msg.protocols.LispType; |
| 21 | |
| 22 | /** |
| 23 | * Adapter for testing against a LISP message. |
| 24 | */ |
| 25 | public class LispMessageAdapter implements LispMessage { |
| 26 | LispType type; |
| 27 | |
| 28 | private LispMessageAdapter() {} |
| 29 | |
| 30 | public LispMessageAdapter(LispType type) { |
| 31 | this.type = type; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public LispType getType() { |
| 36 | return type; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public void writeTo(ByteBuf byteBuf) { |
| 41 | |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public Builder createBuilder() { |
| 46 | return null; |
| 47 | } |
| 48 | } |