blob: 60cb914d40261249920d2fc2682dcb7870db5366 [file] [log] [blame]
Jian Li672ebda2017-02-06 20:21:04 +09001/*
2 * Copyright 2017-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 java.util.List;
19
20/**
21 * LISP referral record section which is part of LISP map referral message.
22 */
23public interface LispReferralRecord extends LispRecord {
24
25 /**
26 * Obtains referral count value.
27 *
28 * @return referral count value
29 */
30 int getReferralCount();
31
32 /**
33 * Obtains signature count value.
34 *
35 * @return signature count value
36 */
37 int getSignatureCount();
38
39 /**
40 * Obtains incomplete flag.
41 *
42 * @return incomplete flag
43 */
44 boolean isIncomplete();
45
46 /**
47 * Obtains a collection of referrals.
48 *
49 * @return a collection of referrals
50 */
51 List<LispReferral> getReferrals();
52
53 /**
54 * Obtains a collection of signatures.
55 *
56 * @return a collection of signatures
57 */
58 List<LispSignature> getSignatures();
59
60 /**
61 * A builder of LISP referral record.
62 */
63 interface ReferralRecordBuilder extends RecordBuilder<ReferralRecordBuilder> {
64
65 /**
66 * Sets a collection of referrals.
67 *
68 * @param referrals a collection of referrals
69 * @return ReferralRecordBuilder object
70 */
71 ReferralRecordBuilder withReferrals(List<LispReferral> referrals);
72
73 /**
74 * Sets a collection of signatures.
75 *
76 * @param signatures a collection of signatures
77 * @return ReferralRecordBuilder object
78 */
79 ReferralRecordBuilder withSignatures(List<LispSignature> signatures);
80
81 /**
82 * Sets incomplete flag.
83 *
84 * @param incomplete incomplete flag
85 * @return ReferralRecordBuilder object
86 */
87 ReferralRecordBuilder withIsIncomplete(boolean incomplete);
88
89 /**
90 * Builds LISP referral record object.
91 *
92 * @return LISP referral record object
93 */
94 LispReferralRecord build();
95 }
96}