public boolean destroy ( final String sessionId , final Session session , final String datacenter ) { final URI uri = createURI ( "/destroy/" + sessionId ) ; final HttpRequestBuilder httpRequestBuilder = RequestUtils . getHttpRequestBuilder ( datacenter , null , null , "" ) ; HTTP . Response httpResponse = HTTP . jsonRestCallViaPUT ( uri . toString ( ) + "?" + httpRequestBuilder . paramString ( ) , toJson ( session ) ) ; if ( httpResponse == null || httpResponse . code ( ) != 200 ) { die ( "Unable destroy the session" , sessionId , uri , httpResponse ) ; } return httpResponse . code ( ) == 200 ; }
Destroy the session .