1 | package fr.sii.ogham.sms.builder.cloudhopper; | |
2 | ||
3 | import com.cloudhopper.smpp.pdu.Pdu; | |
4 | import com.cloudhopper.smpp.type.LoggingOptions; | |
5 | ||
6 | import fr.sii.ogham.core.builder.Builder; | |
7 | import fr.sii.ogham.core.fluent.AbstractParent; | |
8 | ||
9 | /** | |
10 | * * Configure logs: | |
11 | * <ul> | |
12 | * <li>Enable/disable log of {@link Pdu}s</li> | |
13 | * <li>Enable/disable log of bytes</li> | |
14 | * </ul> | |
15 | * | |
16 | * @author Aurélien Baudet | |
17 | * | |
18 | */ | |
19 | public class LoggingBuilder extends AbstractParent<CloudhopperBuilder> implements Builder<LoggingOptions> { | |
20 | private LoggingOptions options; | |
21 | ||
22 | /** | |
23 | * Initializes the builder with a parent builder. The parent builder is used | |
24 | * when calling {@link #and()} method. | |
25 | * | |
26 | * @param parent | |
27 | * the parent builder | |
28 | */ | |
29 | public LoggingBuilder(CloudhopperBuilder parent) { | |
30 | super(parent); | |
31 | } | |
32 | ||
33 | /** | |
34 | * Provide a {@link LoggingOptions} instance to: | |
35 | * <ul> | |
36 | * <li>Enable/disable log of {@link Pdu}s</li> | |
37 | * <li>Enable/disable log of bytes</li> | |
38 | * </ul> | |
39 | * | |
40 | * If this method is called several times, only the last instance is used. | |
41 | * | |
42 | * @param options | |
43 | * the logging options | |
44 | * @return this instance for fluent chaining | |
45 | */ | |
46 | public LoggingBuilder options(LoggingOptions options) { | |
47 | this.options = options; | |
48 |
1
1. options : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/LoggingBuilder::options → NO_COVERAGE |
return this; |
49 | } | |
50 | ||
51 | @Override | |
52 | public LoggingOptions build() { | |
53 |
1
1. build : replaced return value with null for fr/sii/ogham/sms/builder/cloudhopper/LoggingBuilder::build → NO_COVERAGE |
return options; |
54 | } | |
55 | ||
56 | } | |
Mutations | ||
48 |
1.1 |
|
53 |
1.1 |