/** @return string */ @Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append( "\nRemoteHttpCacheResponse" ); buf.append( "\n success [" + isSuccess() + "]" ); buf.append( "\n payload [" + getPayload() + "]" ); buf.append( "\n errorMessage [" + getErrorMessage() + "]" ); return buf.toString(); } }
/** @return string */ @Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append( "\nRemoteHttpCacheResponse" ); buf.append( "\n success [" + isSuccess() + "]" ); buf.append( "\n payload [" + getPayload() + "]" ); buf.append( "\n errorMessage [" + getErrorMessage() + "]" ); return buf.toString(); } }
/** * Make and alive request. * <p> * @return true if we make a successful alive request. * @throws IOException */ @Override public boolean isAlive() throws IOException { if ( !isInitialized() ) { String message = "The Remote Http Client is not initialized. Cannot process request."; log.warn( message ); throw new IOException( message ); } RemoteCacheRequest<K, V> remoteHttpCacheRequest = RemoteCacheRequestFactory.createAliveCheckRequest( 0 ); RemoteCacheResponse<String> remoteHttpCacheResponse = getRemoteDispatcher().dispatchRequest( remoteHttpCacheRequest ); if ( remoteHttpCacheResponse != null ) { return remoteHttpCacheResponse.isSuccess(); } return false; }
/** * Make and alive request. * <p> * @return true if we make a successful alive request. * @throws IOException */ @Override public boolean isAlive() throws IOException { if ( !isInitialized() ) { String message = "The Remote Http Client is not initialized. Cannot process request."; log.warn( message ); throw new IOException( message ); } RemoteCacheRequest<K, V> remoteHttpCacheRequest = RemoteCacheRequestFactory.createAliveCheckRequest( 0 ); RemoteCacheResponse<String> remoteHttpCacheResponse = getRemoteDispatcher().dispatchRequest( remoteHttpCacheRequest ); if ( remoteHttpCacheResponse != null ) { return remoteHttpCacheResponse.isSuccess(); } return false; }