-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathParameters.java
More file actions
50 lines (40 loc) · 1.13 KB
/
Parameters.java
File metadata and controls
50 lines (40 loc) · 1.13 KB
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
package com.yurii.salimov.lesson12.task02;
/**
* @author Yuriy Salimov (yuriy.alex.salimov@gmail.com)
* @version 1.0
*/
public final class Parameters {
private static Parameters parameters = new Parameters();
private final String link;
private final int connectNumber;
private final long timer;
private final boolean reconnect;
private Parameters() {
this.link = "https://SITE.com";
this.connectNumber = 100;
this.timer = 10000;
this.reconnect = false;
}
public static Parameters getInstance() {
return parameters;
}
@Override
public String toString() {
return "Link = " + this.link +
"; \r\nNumber Of Connections = " + this.connectNumber +
"; \r\nTimer := " + this.timer / 1000 +
"; \r\nReconnect := " + this.reconnect;
}
public String getLink() {
return this.link;
}
public int getNumberOfConnections() {
return this.connectNumber;
}
public long getTimer() {
return this.timer;
}
public boolean isReconnect() {
return this.reconnect;
}
}