1 | package fr.sii.ogham.sms.sender.impl.cloudhopper; | |
2 | ||
3 | import com.cloudhopper.smpp.SmppSessionConfiguration; | |
4 | import com.cloudhopper.smpp.pdu.EnquireLink; | |
5 | import com.cloudhopper.smpp.pdu.SubmitSm; | |
6 | import com.cloudhopper.smpp.pdu.Unbind; | |
7 | ||
8 | import fr.sii.ogham.core.retry.RetryExecutor; | |
9 | ||
10 | /** | |
11 | * Additional options to configure how Cloudhopper should behave: | |
12 | * <ul> | |
13 | * <li>Additional timeouts (response, unbind)</li> | |
14 | * <li>Retry strategy for connection</li> | |
15 | * <li>Options for session management strategy</li> | |
16 | * </ul> | |
17 | * | |
18 | * @author Aurélien Baudet | |
19 | * | |
20 | */ | |
21 | public class ExtendedSmppSessionConfiguration extends SmppSessionConfiguration { | |
22 | /** | |
23 | * The maximum amount of time (in milliseconds) to wait for receiving the | |
24 | * response from the server for a single segment ({@link SubmitSm}). | |
25 | */ | |
26 | private long responseTimeout; | |
27 | /** | |
28 | * The maximum amount of time (in milliseconds) to wait for receiving the | |
29 | * response to a disconnect request ({@link Unbind} command) from the | |
30 | * server. | |
31 | */ | |
32 | private long unbindTimeout; | |
33 | /** | |
34 | * The strategy to use for trying to connect to the server. | |
35 | */ | |
36 | private RetryExecutor connectRetry; | |
37 | /** | |
38 | * Keep alive the opened session by sending messages ({@link EnquireLink}) | |
39 | * regularly. If the session is closed by the server automatic reconnection | |
40 | * is done. | |
41 | */ | |
42 | private KeepAliveOptions keepAlive; | |
43 | /** | |
44 | * If possible reuse the same session to send the messages instead of | |
45 | * creating a new one for each message. | |
46 | * | |
47 | * If keep alive options is also set, the keep alive sttrategy is used and | |
48 | * this option has ne effect. | |
49 | */ | |
50 | private ReuseSessionOptions reuseSession; | |
51 | ||
52 | public long getResponseTimeout() { | |
53 |
5
1. getResponseTimeout : replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getResponseTimeout → SURVIVED 2. getResponseTimeout : replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getResponseTimeout → KILLED 3. getResponseTimeout : replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getResponseTimeout → KILLED 4. getResponseTimeout : replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getResponseTimeout → KILLED 5. getResponseTimeout : replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getResponseTimeout → KILLED |
return responseTimeout; |
54 | } | |
55 | ||
56 | public void setResponseTimeout(long responseTimeout) { | |
57 | this.responseTimeout = responseTimeout; | |
58 | } | |
59 | ||
60 | public long getUnbindTimeout() { | |
61 |
1
1. getUnbindTimeout : replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getUnbindTimeout → SURVIVED |
return unbindTimeout; |
62 | } | |
63 | ||
64 | public void setUnbindTimeout(long unbindTimeout) { | |
65 | this.unbindTimeout = unbindTimeout; | |
66 | } | |
67 | ||
68 | public RetryExecutor getConnectRetry() { | |
69 |
5
1. getConnectRetry : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getConnectRetry → SURVIVED 2. getConnectRetry : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getConnectRetry → KILLED 3. getConnectRetry : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getConnectRetry → KILLED 4. getConnectRetry : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getConnectRetry → KILLED 5. getConnectRetry : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getConnectRetry → KILLED |
return connectRetry; |
70 | } | |
71 | ||
72 | public void setConnectRetry(RetryExecutor connectRetry) { | |
73 | this.connectRetry = connectRetry; | |
74 | } | |
75 | ||
76 | public KeepAliveOptions getKeepAlive() { | |
77 |
2
1. getKeepAlive : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getKeepAlive → SURVIVED 2. getKeepAlive : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getKeepAlive → TIMED_OUT |
return keepAlive; |
78 | } | |
79 | ||
80 | public void setKeepAlive(KeepAliveOptions keepAlive) { | |
81 | this.keepAlive = keepAlive; | |
82 | } | |
83 | ||
84 | public ReuseSessionOptions getReuseSession() { | |
85 |
2
1. getReuseSession : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getReuseSession → SURVIVED 2. getReuseSession : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getReuseSession → KILLED |
return reuseSession; |
86 | } | |
87 | ||
88 | public void setReuseSession(ReuseSessionOptions reuseSession) { | |
89 | this.reuseSession = reuseSession; | |
90 | } | |
91 | ||
92 | } | |
Mutations | ||
53 |
1.1 2.2 3.3 4.4 5.5 |
|
61 |
1.1 |
|
69 |
1.1 2.2 3.3 4.4 5.5 |
|
77 |
1.1 2.2 |
|
85 |
1.1 2.2 |