/
TCAPStack.java
373 lines (312 loc) · 12.9 KB
/
TCAPStack.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
/*
* TeleStax, Open Source Cloud Communications Copyright 2012.
* and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.mobicents.protocols.ss7.tcapAnsi.api;
import java.util.List;
/**
* @author baranowb
*
*/
public interface TCAPStack {
/**
* Returns the name of this stack
*
* @return
*/
String getName();
/**
* Set the persist directory to store the xml files
*
* @return
*/
String getPersistDir();
int getSubSystemNumber();
/**
* Returns stack provider.
*
* @return
*/
TCAPProvider getProvider();
TCAPCounterProvider getCounterProvider();
/**
* Stops this stack and transport layer(SCCP)
*/
void stop();
/**
* Start stack and transport layer(SCCP)
*
* @throws IllegalStateException - if stack is already running or not configured
* @throws StartFailedException
*/
void start() throws Exception;
boolean isStarted();
/**
* Sets millisecond value for dialog timeout. It specifies how long dialog can be idle - not receive/send any messages.
*
* @param l
*/
void setDialogIdleTimeout(long l) throws Exception;
long getDialogIdleTimeout();
void setInvokeTimeout(long v) throws Exception;
long getInvokeTimeout();
/**
* Sets the maximum number of dialogs allowed to be alive at a given time. If not set, a default value of 5000 dialogs will
* be used.
*
* Important a: Default value may vary depending on the future implementations or changes to current implementation.
*
* Important b: If stack ranges provided, maximum number dialogs naturally cannot be greater than the provided range, thus,
* it will be normalized to range delta (end - start).
*
*
* @param v number of dialogs
*/
void setMaxDialogs(int v) throws Exception;
/**
*
* @return Maximum number of allowed concurrent dialogs.
*/
int getMaxDialogs();
/**
* Sets the start of the range of the generated dialog ids.
*/
void setDialogIdRangeStart(long val) throws Exception;
/**
* Sets the start of the range of the generated dialog ids.
*/
void setDialogIdRangeEnd(long val) throws Exception;
/**
*
* @return starting dialog id within the range
*/
long getDialogIdRangeStart();
/**
*
* @return ending dialog id within the range
*/
long getDialogIdRangeEnd();
/**
* previewMode is needed for special processing mode When PreviewMode in TCAP level we have: - we only listern incoming
* messages and sends nothing. send(), close(), sendComponent() and other such methods do nothing. - A TCAP Dialog is
* temporary. TCAP Dialog is discarded after any icoming message like TC-BEGIN or TC-CONTINUE has been processed - for any
* incoming messages (including TC-CONTINUE, TC-END, TC-ABORT) a new TCAP Dialog is created (end then deleted). - no timers
* and timeouts
*
* default state: no previewMode
*/
void setPreviewMode(boolean val) throws Exception;
/**
*
* @return if areviewMode is active
*/
boolean getPreviewMode();
void setExtraSsns(List<Integer> extraSsnsNew) throws Exception;
List<Integer> getExtraSsns();
boolean isExtraSsnPresent(int ssn);
String getSubSystemNumberList();
void setStatisticsEnabled(boolean val) throws Exception;
boolean getStatisticsEnabled();
/**
* @return if true incoming TCAP messages will be blocked (depending on congestion level, from level 2 - new incoming
* dialogs are rejected, from level 3 - all incoming messages are rejected)
*/
boolean isCongControl_blockingIncomingTcapMessages();
/**
* @param value if true incoming TCAP messages will be blocked (depending on congestion level, from level 2 - new incoming
* dialogs are rejected, from level 3 - all incoming messages are rejected)
*/
void setCongControl_blockingIncomingTcapMessages(boolean value) throws Exception;
/**
* @return ExecutorMonitor Threshold 1: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor
* becomes the congestion level 1
*/
double getCongControl_ExecutorDelayThreshold_1();
/**
* @return ExecutorMonitor Threshold 2: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor
* becomes the congestion level 2
*/
double getCongControl_ExecutorDelayThreshold_2();
/**
* @return ExecutorMonitor Threshold 3: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor
* becomes the congestion level 3
*/
double getCongControl_ExecutorDelayThreshold_3();
/**
* Setting of ExecutorMonitor Threshold 1: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor becomes
* the congestion level 1
*
* @param value
*/
void setCongControl_ExecutorDelayThreshold_1(double value) throws Exception;
/**
* Setting of ExecutorMonitor Threshold 2: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor becomes
* the congestion level 2
*
* @param value
*/
void setCongControl_ExecutorDelayThreshold_2(double value) throws Exception;
/**
* Setting of ExecutorMonitor Threshold 3: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor becomes
* the congestion level 3
*
* @param value
*/
void setCongControl_ExecutorDelayThreshold_3(double value) throws Exception;
/**
* @return ExecutorMonitor Threshold 1: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor
* resumes to the congestion level 0
*/
double getCongControl_ExecutorBackToNormalDelayThreshold_1();
/**
* @return ExecutorMonitor Threshold 2: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor
* resumes to the congestion level 1
*/
double getCongControl_ExecutorBackToNormalDelayThreshold_2();
/**
* @return ExecutorMonitor Threshold 3: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor
* resumes to the congestion level 2
*/
double getCongControl_ExecutorBackToNormalDelayThreshold_3();
/**
* Setting of ExecutorMonitor Threshold 1: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor resumes to
* the congestion level 0
*
* @param value
*/
void setCongControl_ExecutorBackToNormalDelayThreshold_1(double value) throws Exception;
/**
* Setting of ExecutorMonitor Threshold 2: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor resumes to
* the congestion level 1
*
* @param value
*/
void setCongControl_ExecutorBackToNormalDelayThreshold_2(double value) throws Exception;
/**
* Setting of ExecutorMonitor Threshold 3: delays in seconds (between the time when an incoming message has come from a peer
* and scheduled for execution and the time when the execution of the message starts) after which ExecutorMonitor resumes to
* the congestion level 2
*
* @param value
*/
void setCongControl_ExecutorBackToNormalDelayThreshold_3(double value) throws Exception;
/**
* @return MemoryMonitor Threshold 1: a percent of occupied memory after which MemoryMonitor becomes the congestion level 1
*/
double getCongControl_MemoryThreshold_1();
/**
* @return MemoryMonitor Threshold 2: a percent of occupied memory after which MemoryMonitor becomes the congestion level 2
*/
double getCongControl_MemoryThreshold_2();
/**
* @return MemoryMonitor Threshold 3: a percent of occupied memory after which MemoryMonitor becomes the congestion level 3
*/
double getCongControl_MemoryThreshold_3();
/**
* Setting of MemoryMonitor Threshold 1: a percent of occupied memory after which MemoryMonitor becomes the congestion level
* 1
*
* @param value
*/
void setCongControl_MemoryThreshold_1(double value) throws Exception;
/**
* Setting of MemoryMonitor Threshold 2: a percent of occupied memory after which MemoryMonitor becomes the congestion level
* 2
*
* @param value
*/
void setCongControl_MemoryThreshold_2(double value) throws Exception;
/**
* Setting of MemoryMonitor Threshold 3: a percent of occupied memory after which MemoryMonitor becomes the congestion level
* 3
*
* @param value
*/
void setCongControl_MemoryThreshold_3(double value) throws Exception;
/**
* @return MemoryMonitor Threshold 1: a percent of occupied memory after which MemoryMonitor resumes to the congestion level
* 0
*/
double getCongControl_BackToNormalMemoryThreshold_1();
/**
* @return MemoryMonitor Threshold 2: a percent of occupied memory after which MemoryMonitor resumes to the congestion level
* 1
*/
double getCongControl_BackToNormalMemoryThreshold_2();
/**
* @return MemoryMonitor Threshold 3: a percent of occupied memory after which MemoryMonitor resumes to the congestion level
* 2
*/
double getCongControl_BackToNormalMemoryThreshold_3();
/**
* Setting of MemoryMonitor Threshold 1: a percent of occupied memory after which MemoryMonitor resumes to the congestion
* level 0
*
* @param value
*/
void setCongControl_BackToNormalMemoryThreshold_1(double value) throws Exception;
/**
* Setting of MemoryMonitor Threshold 2: a percent of occupied memory after which MemoryMonitor resumes to the congestion
* level 1
*
* @param value
*/
void setCongControl_BackToNormalMemoryThreshold_2(double value) throws Exception;
/**
* Setting of MemoryMonitor Threshold 3: a percent of occupied memory after which MemoryMonitor resumes to the congestion
* level 2
*
* @param value
*/
void setCongControl_BackToNormalMemoryThreshold_3(double value) throws Exception;
/**
*
* @return the TCAPCounterEventsListener object or null it it isn't set (or set to null value)
*/
TCAPCounterEventsListener getTCAPCounterEventsListener();
/**
* Sets the tcapCounterEventsListener attribute to the given value.
*
* @param value
*/
void setTCAPCounterEventsListener(TCAPCounterEventsListener tcapCounterEventsListener);
/** Set value for slsRange for this TCAP Stack.
*
* @param val
*/
void setSlsRange(String val) throws Exception;
/**
* Returns the SlsRange that this TCAP Stack is registered for
*
* @return
*/
String getSlsRange();
}