List of usage examples for java.net CookieHandler toString
public String toString()
From source file:com.blackducksoftware.integration.hub.rest.RestConnection.java
public void handleRequest(final ClientResource resource) throws BDRestException { final boolean debugLogging = isDebugLogging(); if (debugLogging) { logMessage(LogLevel.TRACE, "Resource : " + resource.toString()); logRestletRequestOrResponse(resource.getRequest()); }/*from www.j a va 2s . c om*/ final CookieHandler originalCookieHandler = CookieHandler.getDefault(); try { if (originalCookieHandler != null) { if (debugLogging) { logMessage(LogLevel.TRACE, "Setting Cookie Handler to NULL"); } CookieHandler.setDefault(null); } resource.handle(); } catch (final ResourceException e) { throw new BDRestException("Problem connecting to the Hub server provided.", e, resource); } finally { if (originalCookieHandler != null) { if (debugLogging) { logMessage(LogLevel.TRACE, "Setting Original Cookie Handler : " + originalCookieHandler.toString()); } CookieHandler.setDefault(originalCookieHandler); } } if (debugLogging) { logRestletRequestOrResponse(resource.getResponse()); logMessage(LogLevel.TRACE, "Status Code : " + resource.getResponse().getStatus().getCode()); } }