Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add lastSuccessfulPing method

  • Loading branch information...
commit 6655689f921804f77ca11209fc52d5c7fe2e0efd 1 parent 53241ee
@dustismo dustismo authored
View
5 src/main/com/trendrr/oss/networking/cheshire/CheshireClient.java
@@ -70,6 +70,10 @@ public Date getLastSuccessfulPing() {
return lastSuccessfulPing;
}
+ public synchronized void setLastSuccessfullPing(Date d) {
+ this.lastSuccessfulPing = d;
+ }
+
/**
* setting this to true will keep the connection open.
*
@@ -183,6 +187,7 @@ public void apiCall(String endPoint, Verb method, Map params, CheshireApiCallbac
*/
public void ping() throws TrendrrException {
strest.sendRequest( this.createRequest("/ping", Verb.GET, null));
+ this.setLastSuccessfullPing(new Date());
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.