blob: c910b43b36dab50ded6a81fa4b85954d9933f7e0 [file] [log] [blame]
Jian Li10a09062016-07-26 23:58:50 +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 org.onosproject.lisp.msg.types.LispAfiAddress;
19
20/**
21 * Default implementation of LispMapRecord.
22 */
23public class DefaultLispMapRecord implements LispMapRecord {
24
25 private int recordTtl;
26 private int locatorCount;
27 private byte maskLength;
28 private LispMapReplyAction action;
29 private boolean authoritative;
30 private short mapVersionNumber;
31 private LispAfiAddress eidPrefixAfi;
32
33 public int getRecordTtl() {
34 return recordTtl;
35 }
36
37 public int getLocatorCount() {
38 return locatorCount;
39 }
40
41 public byte getMaskLength() {
42 return maskLength;
43 }
44
45 public LispMapReplyAction getAction() {
46 return action;
47 }
48
49 public boolean isAuthoritative() {
50 return authoritative;
51 }
52
53 public short getMapVersionNumber() {
54 return mapVersionNumber;
55 }
56
57 public LispAfiAddress getEidPrefixAfi() {
58 return eidPrefixAfi;
59 }
60
61 public static final class DefaultMapRecordBuilder implements MapRecordBuilder {
62
63 @Override
64 public MapRecordBuilder withRecordTtl(int recordTtl) {
65 return null;
66 }
67
68 @Override
69 public MapRecordBuilder withLocatorCount(int locatorCount) {
70 return null;
71 }
72
73 @Override
74 public MapRecordBuilder withMaskLength(byte maskLength) {
75 return null;
76 }
77
78 @Override
79 public MapRecordBuilder withAction(LispMapReplyAction action) {
80 return null;
81 }
82
83 @Override
84 public MapRecordBuilder withAuthoritative(boolean authoritative) {
85 return null;
86 }
87
88 @Override
89 public MapRecordBuilder withMapVersionNumber(short mapVersionNumber) {
90 return null;
91 }
92
93 @Override
94 public MapRecordBuilder withEidPrefixAfi(LispAfiAddress prefix) {
95 return null;
96 }
97 }
98}