public Response getCacheClusterStatus ( @Context HttpServletRequest request, @PathParam ("params") String params ) throws DotStateException, DotDataException, DotSecurityException, JSONException {
InitDataObject initData = init( params, true, request, false, "9" );
ResourceResponse responseResource = new ResourceResponse( initData.getParamsMap() );
View view = ((DotGuavaCacheAdministratorImpl)CacheLocator.getCacheAdministrator().getImplementationObject()).getView();
JChannel channel = ((DotGuavaCacheAdministratorImpl)CacheLocator.getCacheAdministrator().getImplementationObject()).getChannel();
JSONObject jsonClusterStatusObject = new JSONObject();
if(view!=null) {
List<Address> members = view.getMembers();
jsonClusterStatusObject.put( "clusterName", channel.getClusterName());
jsonClusterStatusObject.put( "open", channel.isOpen());
jsonClusterStatusObject.put( "numberOfNodes", members.size());
jsonClusterStatusObject.put( "address", channel.getAddressAsString());
jsonClusterStatusObject.put( "receivedBytes", channel.getReceivedBytes());
jsonClusterStatusObject.put( "receivedMessages", channel.getReceivedMessages());
jsonClusterStatusObject.put( "sentBytes", channel.getSentBytes());
jsonClusterStatusObject.put( "sentMessages", channel.getSentMessages());
}
return responseResource.response( jsonClusterStatusObject.toString() );