Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add ping method
  • Loading branch information
vjuranek committed Jun 8, 2014
commit 9aa7c50217fc85152cf20bc515ef1a2a19856eef
13 changes: 13 additions & 0 deletions src/main/java/com/kpelykh/docker/client/DockerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,19 @@ public Version version() throws DockerException {
}
}
}


public int ping() throws DockerException {
WebResource webResource = client.resource(restEndpointUrl + "/_ping");

try {
LOGGER.trace("GET: {}", webResource);
ClientResponse resp = webResource.get(ClientResponse.class);
return resp.getStatus();
} catch (UniformInterfaceException exception) {
throw new DockerException(exception);
}
}


/**
Expand Down