protected final void buildLocation() { final StringBuilder sb = new StringBuilder(getScheme() + "://" + serverHostName); appendPort(sb); if (resourcePath == null || !resourcePath.startsWith("/") && !"".equals(resourcePath)) { sb.append("/"); } sb.append(resourcePath); location = sb.toString(); }
protected final void buildLocation() { final StringBuilder sb = new StringBuilder(getScheme() + "://" + serverHostName); appendPort(sb); if (resourcePath == null || !resourcePath.startsWith("/") && !"".equals(resourcePath)) { sb.append("/"); } sb.append(resourcePath); location = sb.toString(); }
protected final void buildLocation() { final StringBuilder sb = new StringBuilder(getScheme() + "://" + serverHostName); appendPort(sb); if (resourcePath == null || !resourcePath.startsWith("/") && !"".equals(resourcePath)) { sb.append("/"); } sb.append(resourcePath); location = sb.toString(); }
protected final void buildLocation() { final StringBuilder sb = new StringBuilder(getScheme() + "://" + serverHostName); appendPort(sb); if (resourcePath == null || !resourcePath.startsWith("/") && !"".equals(resourcePath)) { sb.append("/"); } sb.append(resourcePath); location = sb.toString(); }
protected final void buildLocation() { final StringBuilder sb = new StringBuilder(getScheme() + "://" + serverHostName); appendPort(sb); if (resourcePath == null || !resourcePath.startsWith("/") && !"".equals(resourcePath)) { sb.append("/"); } sb.append(resourcePath); location = sb.toString(); }
protected final void buildLocation() { final StringBuilder sb = new StringBuilder(getScheme() + "://" + serverHostName); appendPort(sb); if (resourcePath == null || !resourcePath.startsWith("/") && !"".equals(resourcePath)) { sb.append("/"); } sb.append(resourcePath); location = sb.toString(); }
public HandShake(URI url) { builder = HttpRequestPacket.builder() .protocol(Protocol.HTTP_1_1) .method(Method.GET) .header(Header.Connection, "Upgrade") .upgrade("WebSocket"); resourcePath = url.getPath(); if ("".equals(resourcePath)) { resourcePath = "/"; } if (url.getQuery() != null) { resourcePath += "?" + url.getQuery(); } serverHostName = url.getHost(); secure = "wss://".equals(url.getScheme()); port = url.getPort(); final StringBuilder sb = new StringBuilder(32) .append(getScheme()).append("://").append(url.getHost()); origin = appendPort(sb).toString().toLowerCase(Locale.ENGLISH); buildLocation(); }
public HandShake(URI url) { builder = HttpRequestPacket.builder() .protocol(Protocol.HTTP_1_1) .method(Method.GET) .header(Header.Connection, "Upgrade") .upgrade("WebSocket"); resourcePath = url.getPath(); if ("".equals(resourcePath)) { resourcePath = "/"; } if (url.getQuery() != null) { resourcePath += "?" + url.getQuery(); } serverHostName = url.getHost(); secure = "wss://".equals(url.getScheme()); port = url.getPort(); final StringBuilder sb = new StringBuilder(32) .append(getScheme()).append("://").append(url.getHost()); origin = appendPort(sb).toString().toLowerCase(Locale.ENGLISH); buildLocation(); }
public HandShake(URI url) { builder = HttpRequestPacket.builder() .protocol(Protocol.HTTP_1_1) .method(Method.GET) .header(Header.Connection, "Upgrade") .upgrade("WebSocket"); resourcePath = url.getPath(); if ("".equals(resourcePath)) { resourcePath = "/"; } if (url.getQuery() != null) { resourcePath += "?" + url.getQuery(); } serverHostName = url.getHost(); secure = "wss://".equals(url.getScheme()); port = url.getPort(); final StringBuilder sb = new StringBuilder(32) .append(getScheme()).append("://").append(url.getHost()); origin = appendPort(sb).toString().toLowerCase(Locale.ENGLISH); buildLocation(); }
public HandShake(URI url) { builder = HttpRequestPacket.builder() .protocol(Protocol.HTTP_1_1) .method(Method.GET) .header(Header.Connection, "Upgrade") .upgrade("WebSocket"); resourcePath = url.getPath(); if ("".equals(resourcePath)) { resourcePath = "/"; } if (url.getQuery() != null) { resourcePath += "?" + url.getQuery(); } serverHostName = url.getHost(); secure = "wss://".equals(url.getScheme()); port = url.getPort(); final StringBuilder sb = new StringBuilder(32) .append(getScheme()).append("://").append(url.getHost()); origin = appendPort(sb).toString().toLowerCase(Locale.ENGLISH); buildLocation(); }
public HandShake(URI url) { builder = HttpRequestPacket.builder() .protocol(Protocol.HTTP_1_1) .method(Method.GET) .header(Header.Connection, "Upgrade") .upgrade("WebSocket"); resourcePath = url.getPath(); if ("".equals(resourcePath)) { resourcePath = "/"; } if (url.getQuery() != null) { resourcePath += "?" + url.getQuery(); } serverHostName = url.getHost(); secure = "wss://".equals(url.getScheme()); port = url.getPort(); final StringBuilder sb = new StringBuilder(32) .append(getScheme()).append("://").append(url.getHost()); origin = appendPort(sb).toString().toLowerCase(Locale.ENGLISH); buildLocation(); }
public HandShake(URI url) { builder = HttpRequestPacket.builder() .protocol(Protocol.HTTP_1_1) .method(Method.GET) .header(Header.Connection, "Upgrade") .upgrade("WebSocket"); resourcePath = url.getPath(); if ("".equals(resourcePath)) { resourcePath = "/"; } if (url.getQuery() != null) { resourcePath += "?" + url.getQuery(); } serverHostName = url.getHost(); secure = "wss://".equals(url.getScheme()); port = url.getPort(); final StringBuilder sb = new StringBuilder(32) .append(getScheme()).append("://").append(url.getHost()); origin = appendPort(sb).toString().toLowerCase(Locale.ENGLISH); buildLocation(); }