ExtendedSmppSessionConfiguration.java

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 1 1. getResponseTimeout : replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getResponseTimeout → RUN_ERROR
		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 → RUN_ERROR
		return unbindTimeout;
62
	}
63
64
	public void setUnbindTimeout(long unbindTimeout) {
65
		this.unbindTimeout = unbindTimeout;
66
	}
67
68
	public RetryExecutor getConnectRetry() {
69 1 1. getConnectRetry : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getConnectRetry → RUN_ERROR
		return connectRetry;
70
	}
71
72
	public void setConnectRetry(RetryExecutor connectRetry) {
73
		this.connectRetry = connectRetry;
74
	}
75
76
	public KeepAliveOptions getKeepAlive() {
77 1 1. getKeepAlive : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getKeepAlive → RUN_ERROR
		return keepAlive;
78
	}
79
80
	public void setKeepAlive(KeepAliveOptions keepAlive) {
81
		this.keepAlive = keepAlive;
82
	}
83
84
	public ReuseSessionOptions getReuseSession() {
85 1 1. getReuseSession : replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getReuseSession → RUN_ERROR
		return reuseSession;
86
	}
87
88
	public void setReuseSession(ReuseSessionOptions reuseSession) {
89
		this.reuseSession = reuseSession;
90
	}
91
92
}

Mutations

53

1.1
Location : getResponseTimeout
Killed by :
replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getResponseTimeout → RUN_ERROR

61

1.1
Location : getUnbindTimeout
Killed by :
replaced long return with 0 for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getUnbindTimeout → RUN_ERROR

69

1.1
Location : getConnectRetry
Killed by :
replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getConnectRetry → RUN_ERROR

77

1.1
Location : getKeepAlive
Killed by :
replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getKeepAlive → RUN_ERROR

85

1.1
Location : getReuseSession
Killed by :
replaced return value with null for fr/sii/ogham/sms/sender/impl/cloudhopper/ExtendedSmppSessionConfiguration::getReuseSession → RUN_ERROR

Active mutators

Tests examined


Report generated by PIT 1.13.1