blob: bd0b94877542083a2dd161b020448dc764361bda [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
Jian Li47671902016-08-11 01:18:18 +090018import java.util.List;
19
Jian Li10a09062016-07-26 23:58:50 +090020/**
Jian Li672ebda2017-02-06 20:21:04 +090021 * LISP map record section which is part of LISP map register message.
Jian Li10a09062016-07-26 23:58:50 +090022 */
Jian Li672ebda2017-02-06 20:21:04 +090023public interface LispMapRecord extends LispRecord {
Jian Li10a09062016-07-26 23:58:50 +090024
25 /**
26 * Obtains locator count value.
27 *
28 * @return locator count value
29 */
30 int getLocatorCount();
31
32 /**
Jian Li672ebda2017-02-06 20:21:04 +090033 * Obtains a collection of locators.
Jian Li10a09062016-07-26 23:58:50 +090034 *
Jian Li672ebda2017-02-06 20:21:04 +090035 * @return a collection of locators
Jian Li10a09062016-07-26 23:58:50 +090036 */
Jian Li672ebda2017-02-06 20:21:04 +090037 List<LispLocator> getLocators();
Jian Li47671902016-08-11 01:18:18 +090038
39 /**
Jian Li10a09062016-07-26 23:58:50 +090040 * A builder of LISP map record.
41 */
Jian Li672ebda2017-02-06 20:21:04 +090042 interface MapRecordBuilder extends RecordBuilder<MapRecordBuilder> {
Jian Li10a09062016-07-26 23:58:50 +090043
44 /**
Jian Li672ebda2017-02-06 20:21:04 +090045 * Sets a collection of locators.
Jian Li10a09062016-07-26 23:58:50 +090046 *
Jian Li672ebda2017-02-06 20:21:04 +090047 * @param locators a collection of locators
Jian Li10a09062016-07-26 23:58:50 +090048 * @return MapRecordBuilder object
49 */
Jian Li672ebda2017-02-06 20:21:04 +090050 MapRecordBuilder withLocators(List<LispLocator> locators);
Jian Li10a09062016-07-26 23:58:50 +090051
52 /**
Jian Li672ebda2017-02-06 20:21:04 +090053 * Builds LISP map record object.
Jian Li10a09062016-07-26 23:58:50 +090054 *
Jian Li672ebda2017-02-06 20:21:04 +090055 * @return LISP map record object
Jian Li631e62a2016-08-03 22:42:00 +090056 */
57 LispMapRecord build();
Jian Li10a09062016-07-26 23:58:50 +090058 }
59}