blob: 2cc0480d4cc24bc7a4014a76f6eff42918cb4880 [file] [log] [blame]
Jian Liafe2d3f2016-11-01 02:49:07 +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.msg.protocols;
17
18import io.netty.buffer.ByteBuf;
19import org.onosproject.lisp.msg.exceptions.LispWriterException;
20
21import java.net.InetSocketAddress;
22
23/**
24 * Abstract LISP message.
25 */
26public abstract class AbstractLispMessage implements LispMessage {
27
28 protected InetSocketAddress sender;
29
30 @Override
31 public LispType getType() {
32 return null;
33 }
34
35 @Override
36 public void configSender(InetSocketAddress sender) {
37 this.sender = sender;
38 }
39
40 @Override
41 public InetSocketAddress getSender() {
42 return sender;
43 }
44
45 @Override
46 public void writeTo(ByteBuf byteBuf) throws LispWriterException {
47 }
48
49 @Override
50 public Builder createBuilder() {
51 return null;
52 }
53}