Example usage for org.springframework.web.socket.sockjs.client SockJsUrlInfo getInfoUrl

List of usage examples for org.springframework.web.socket.sockjs.client SockJsUrlInfo getInfoUrl

Introduction

In this page you can find the example usage for org.springframework.web.socket.sockjs.client SockJsUrlInfo getInfoUrl.

Prototype

public URI getInfoUrl() 

Source Link

Usage

From source file:org.springframework.web.socket.sockjs.client.SockJsClient.java

private ServerInfo getServerInfo(SockJsUrlInfo sockJsUrlInfo, @Nullable HttpHeaders headers) {
    URI infoUrl = sockJsUrlInfo.getInfoUrl();
    ServerInfo info = this.serverInfoCache.get(infoUrl);
    if (info == null) {
        long start = System.currentTimeMillis();
        String response = this.infoReceiver.executeInfoRequest(infoUrl, headers);
        long infoRequestTime = System.currentTimeMillis() - start;
        info = new ServerInfo(response, infoRequestTime);
        this.serverInfoCache.put(infoUrl, info);
    }//from   ww w  .  j  av  a2s .c  om
    return info;
}