@Override public String getId() { return this.request.getSockJsUrlInfo().getSessionId(); }
String message = "Connect timed out for " + DefaultTransportRequest.this; logger.error(message); ex = new SockJsTransportFailureException(message, getSockJsUrlInfo().getSessionId(), ex);
@Test public void sessionId() throws Exception { SockJsUrlInfo info = new SockJsUrlInfo(new URI("http://example.com")); assertEquals("Invalid sessionId: " + info.getSessionId(), 32, info.getSessionId().length()); }
public URI getTransportUrl(TransportType transportType) { return UriComponentsBuilder.fromUri(this.sockJsUrl) .scheme(getScheme(transportType)) .pathSegment(getServerId()) .pathSegment(getSessionId()) .pathSegment(transportType.toString()) .build(true).toUri(); }
private void testTransportUrl(String scheme, String expectedScheme, TransportType transportType) throws Exception { SockJsUrlInfo info = new SockJsUrlInfo(new URI(scheme + "://example.com")); String serverId = info.getServerId(); String sessionId = info.getSessionId(); String transport = transportType.toString().toLowerCase(); URI expected = new URI(expectedScheme + "://example.com/" + serverId + "/" + sessionId + "/" + transport); assertThat(info.getTransportUrl(transportType), equalTo(expected)); }
@Override public String getId() { return this.request.getSockJsUrlInfo().getSessionId(); }
@Override public String getId() { return this.request.getSockJsUrlInfo().getSessionId(); }
String message = "Connect timed out for " + DefaultTransportRequest.this; logger.error(message); ex = new SockJsTransportFailureException(message, getSockJsUrlInfo().getSessionId(), ex);
String message = "Connect timed out for " + DefaultTransportRequest.this; logger.error(message); ex = new SockJsTransportFailureException(message, getSockJsUrlInfo().getSessionId(), ex);
public URI getTransportUrl(TransportType transportType) { return UriComponentsBuilder.fromUri(this.sockJsUrl) .scheme(getScheme(transportType)) .pathSegment(getServerId()) .pathSegment(getSessionId()) .pathSegment(transportType.toString()) .build(true).toUri(); }
public URI getTransportUrl(TransportType transportType) { return UriComponentsBuilder.fromUri(this.sockJsUrl) .scheme(getScheme(transportType)) .pathSegment(getServerId()) .pathSegment(getSessionId()) .pathSegment(transportType.toString()) .build(true).toUri(); }