| 1 | package pl.zankowski.iextrading4j.client.socket.manager; | |
| 2 | ||
| 3 | import io.socket.client.IO; | |
| 4 | import io.socket.client.Socket; | |
| 5 | ||
| 6 | import java.net.URISyntaxException; | |
| 7 | ||
| 8 | public class SocketWrapper { | |
| 9 | ||
| 10 | private static final int RECONNECTION_ATTEMPTS = 32; | |
| 11 | private static final long RECONNECTION_DELAY = 10000; | |
| 12 | ||
| 13 | public Socket socket(final String uri, final boolean reconnect) throws URISyntaxException { | |
| 14 |
1
1. socket : replaced return value with null for pl/zankowski/iextrading4j/client/socket/manager/SocketWrapper::socket → NO_COVERAGE |
return IO.socket(uri, createOptions(reconnect)); |
| 15 | } | |
| 16 | ||
| 17 | private IO.Options createOptions(final boolean reconnect) { | |
| 18 | final IO.Options options = new IO.Options(); | |
| 19 | options.reconnection = reconnect; | |
| 20 | options.reconnectionAttempts = RECONNECTION_ATTEMPTS; | |
| 21 | options.reconnectionDelay = RECONNECTION_DELAY; | |
| 22 |
1
1. createOptions : replaced return value with null for pl/zankowski/iextrading4j/client/socket/manager/SocketWrapper::createOptions → NO_COVERAGE |
return options; |
| 23 | } | |
| 24 | ||
| 25 | } | |
Mutations | ||
| 14 |
1.1 |
|
| 22 |
1.1 |