blob: f878fe6b4fab03da341fd0cde928cee4bef89e62 [file] [log] [blame]
Jian Lie4f12162016-09-13 00:09:09 +09001/*
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 */
16package org.onosproject.lisp.ctl;
17
18import io.netty.buffer.ByteBuf;
19import org.onosproject.lisp.msg.protocols.LispMessage;
20import org.onosproject.lisp.msg.protocols.LispType;
21
Jian Liafe2d3f2016-11-01 02:49:07 +090022import java.net.InetSocketAddress;
23
Jian Lie4f12162016-09-13 00:09:09 +090024/**
25 * Adapter for testing against a LISP message.
26 */
27public class LispMessageAdapter implements LispMessage {
28 LispType type;
29
30 private LispMessageAdapter() {}
31
32 public LispMessageAdapter(LispType type) {
33 this.type = type;
34 }
35
36 @Override
37 public LispType getType() {
38 return type;
39 }
40
41 @Override
Jian Liafe2d3f2016-11-01 02:49:07 +090042 public void configSender(InetSocketAddress sender) {
43
44 }
45
46 @Override
47 public InetSocketAddress getSender() {
48 return null;
49 }
50
51 @Override
Jian Lie4f12162016-09-13 00:09:09 +090052 public void writeTo(ByteBuf byteBuf) {
53
54 }
55
56 @Override
57 public Builder createBuilder() {
58 return null;
59 }
60}