Skip to content

Commit dfe747c

Browse files
committed
- removed some unused code
1 parent 5ca4ff0 commit dfe747c

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.sobotics</groupId>
44
<artifactId>redunda-lib</artifactId>
5-
<version>0.0.1-SNAPSHOT</version>
5+
<version>0.1.0</version>
66
<name>Redunda Library</name>
77
<description>Communicates with SOBotic's Redunda</description>
88

src/main/java/org/sobotics/PingService.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import java.io.BufferedReader;
33
import java.io.DataOutputStream;
44
import java.io.InputStreamReader;
5-
import java.io.StringReader;
65
import java.net.URL;
76
import java.util.concurrent.Executors;
87
import java.util.concurrent.ScheduledExecutorService;
@@ -14,6 +13,9 @@
1413
import com.google.gson.JsonObject;
1514
import com.google.gson.JsonParser;
1615

16+
/**
17+
* Manages the connection to Redunda
18+
* */
1719
public class PingService {
1820
/**
1921
* The API-key for the current instance. You can get the key in the Instances-overview on Redunda
@@ -60,13 +62,19 @@ public PingService(String key, int pingInterval) {
6062
this.interval = pingInterval;
6163
}
6264

65+
/**
66+
* Enables or disables the debugging mode.
67+
* */
6368
public void setDebugging(boolean debug) {
6469
this.debugging = debug;
6570
if (this.debugging == true) {
6671
PingService.standby = new AtomicBoolean(false);
6772
}
6873
}
6974

75+
/**
76+
* Returns is PingService is in debugging mode.
77+
* */
7078
public boolean getDebugging() {
7179
return this.debugging;
7280
}
@@ -118,11 +126,6 @@ private void execute() throws Throwable {
118126
wr.writeBytes(parameters);
119127
wr.flush();
120128
wr.close();
121-
122-
//int responseCode = con.getResponseCode();
123-
//System.out.println("\nSending 'POST' request to URL : " + url);
124-
//System.out.println("Post parameters : " + parameters);
125-
//System.out.println("Response Code : " + responseCode);
126129

127130
BufferedReader in = new BufferedReader(
128131
new InputStreamReader(con.getInputStream()));

0 commit comments

Comments
 (0)