blob: 2f667c7033ad775f0512bb0cc94236e2b9b70702 [file] [log] [blame]
mohamed rahil8ea09d42016-04-19 20:47:21 +05301/*
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.isis.controller;
17
18/**
19 * Representation of a LSP wrapper.
20 */
21public interface LspWrapper {
22
23 /**
24 * Returns bin number into which the LSP wrapper is put for aging process.
25 *
26 * @return bin number
27 */
28 int binNumber();
29
30 /**
31 * Sets bin number into which the LSP wrapper is put for aging process.
32 *
33 * @param binNumber bin number
34 */
35 void setBinNumber(int binNumber);
36
37 /**
38 * Checks the contained LSP is self originated or not.
39 *
40 * @return true if self originated else false
41 */
42 boolean isSelfOriginated();
43
44 /**
45 * Sets the contained LSP is self originated or not.
46 *
47 * @param selfOriginated true if self originated else false
48 */
49 void setSelfOriginated(boolean selfOriginated);
50
51 /**
52 * Returns the LSP type.
53 *
54 * @return LSP type
55 */
56 IsisPduType lspType();
57
58 /**
59 * Returns the LSPs remaining life time.
60 *
61 * @return LSPs remaining life time.
62 */
63 int remainingLifetime();
64
65 /**
66 * Returns the age counter value when LSP was received.
67 *
68 * @return age counter value when LSP was received
69 */
70 int ageCounterWhenReceived();
71
72 /**
73 * Returns the age counter roll over value when LSP was added to wrapper instance.
74 *
75 * @return age counter roll over value when LSP was added to wrapper instance
76 */
77 int ageCounterRollOverWhenAdded();
78
79 /**
80 * Returns the LSP instance stored in wrapper.
81 *
82 * @return LSP instance stored in wrapper
83 */
84 IsisMessage lsPdu();
85
86 /**
87 * Sets LSPs remaining life time.
88 *
89 * @param remainingLifetime LSPs remaining life time
90 */
91 void setRemainingLifetime(int remainingLifetime);
92
93 /**
94 * Returns the age of LSP when received.
95 *
96 * @return age of LSP when received
97 */
98 int lspAgeReceived();
99
100 /**
101 * Returns the LSP processing string.
102 *
103 * @return lsp processing value for switch case
104 */
105 String lspProcessing();
106
107 /**
108 * Returns ISIS interface instance.
109 *
110 * @return ISIS interface instance
111 */
112 IsisInterface isisInterface();
113
114 /**
115 * Returns the current LSP age.
116 *
117 * @return LSP age
118 */
119 int currentAge();
120
121 /**
122 * Sets the LSP processing string based on LSP to process.
123 *
124 * @param lspProcessing "refreshLsp" or "maxageLsp" based on LSP to process
125 */
126 void setLspProcessing(String lspProcessing);
sunish vk7bdf4d42016-06-24 12:29:43 +0530127}