public Optional<Session> info(final String sessionId, final String datacenter, final RequestOptions requestOptions) {


        final URI uri = createURI("/info/" + sessionId);
        final HttpRequestBuilder httpRequestBuilder = RequestUtils
                .getHttpRequestBuilder(datacenter, null, null, "");


        HTTP.Response httpResponse = HTTP.getResponse(uri.toString() + "?" + httpRequestBuilder.paramString());

        if (httpResponse == null || httpResponse.code() != 200) {
            die("Unable to get the sessions", uri, httpResponse);
        }

        final List<Session> sessions = fromJsonArray(httpResponse.body(), Session.class);
        if (sessions == null || sessions.size() == 0) {
            return Optional.empty();
        }

        return Optional.of(sessions.get(0));

    }
public Optional<Session> info(final String sessionId, final String datacenter, final RequestOptions requestOptions) {


        final URI uri = createURI("/info/" + sessionId);
        final HttpRequestBuilder httpRequestBuilder = RequestUtils
                .getHttpRequestBuilder(datacenter, null, null, "");


        HTTP.Response httpResponse = HTTP.getResponse(uri.toString() + "?" + httpRequestBuilder.paramString());

        if (httpResponse == null || httpResponse.code() != 200) {
            die("Unable to get the sessions", uri, httpResponse);
        }

        final List<Session> sessions = fromJsonArray(httpResponse.body(), Session.class);
        if (sessions == null || sessions.size() == 0) {
            return Optional.empty();
        }

        return Optional.of(sessions.get(0));

    }
public Optional < Session > info ( final String sessionId , final String datacenter , final RequestOptions requestOptions ) { final URI uri = createURI ( "/info/" + sessionId ) ; final HttpRequestBuilder httpRequestBuilder = RequestUtils . getHttpRequestBuilder ( datacenter , null , null , "" ) ; HTTP . Response httpResponse = HTTP . getResponse ( uri . toString ( ) + "?" + httpRequestBuilder . paramString ( ) ) ; if ( httpResponse == null || httpResponse . code ( ) != 200 ) { die ( "Unable to get the sessions" , uri , httpResponse ) ; } final List < Session > sessions = fromJsonArray ( httpResponse . body ( ) , Session . class ) ; if ( sessions == null || sessions . size ( ) == 0 ) { return Optional . empty ( ) ; } return Optional . of ( sessions . get ( 0 ) ) ; }
/v1/session/info/session:
Queries a given session

@param sessionId      id of a session
@param requestOptions request options
@param datacenter     datacenter
@return Session for this session id.
/ v1 / session / info / session : Queries a given session