protected String serviceUrl() { int i = client.getUrl().indexOf('?'); String serviceUrl = (i > 0 ? client.getUrl().substring(0, i) : client.getUrl()) + "?servertransport=rpcprotocol&connectionID=" + connectionId; serviceUrl = addUrlParameter(serviceUrl, Constants.CLIENT_SERIALZE_MODE_PARAMETER, client.getSerializer().getPushMode().name()); return serviceUrl; }
protected String serviceUrl() { int i = client.getUrl().indexOf('?'); String serviceUrl = (i > 0 ? client.getUrl().substring(0, i) : client.getUrl()) + "?servertransport=rpcprotocol&connectionID=" + connectionId; serviceUrl = addUrlParameter(serviceUrl, Constants.CLIENT_SERIALZE_MODE_PARAMETER, client.getSerializer().getPushMode().name()); return serviceUrl; }
@Override public void connect(int connectionCount) { domain = getDomain(getDocumentDomain(), client.getUrl()); StringBuilder html = new StringBuilder("<html>"); if (domain != null) { html.append("<script>document.domain='").append(domain).append("'</script>"); } html.append("<iframe src=''></iframe></html>"); iframe = createIFrame(html.toString()); expectingDisconnection = false; String url = getUrl(connectionCount); if (domain != null) { url += "&d=" + domain; } iframe.setSrc(url); }
@Override public void connect(int connectionCount) { domain = getDomain(getDocumentDomain(), client.getUrl()); StringBuilder html = new StringBuilder("<html>"); if (domain != null) { html.append("<script>document.domain='").append(domain).append("'</script>"); } html.append("<iframe src=''></iframe></html>"); iframe = createIFrame(html.toString()); expectingDisconnection = false; String url = getUrl(connectionCount); if (domain != null) { url += "&d=" + domain; } iframe.setSrc(url); }
public String getUrl(int connectionCount) { String url = client.getUrl(); if (client.getSerializer() != null) { url = addUrlParameter(url, Constants.CLIENT_DESERIALZE_MODE_PARAMETER, client.getSerializer().getMode().name()); url = addUrlParameter(url, Constants.CLIENT_SERIALZE_MODE_PARAMETER, client.getSerializer().getPushMode().name()); } String className = getClass().getName(); className = className.substring(className.lastIndexOf('.') + 1); String transport = className.substring(0, className.indexOf("CometTransport")); return addUrlParameter(url, "t", Integer.toString((int) (Duration.currentTimeMillis() % Integer.MAX_VALUE), Character.MAX_RADIX).toUpperCase() + "&c=" + connectionCount + "&tr=" + transport); }
public String getUrl(int connectionCount) { String url = client.getUrl(); if (client.getSerializer() != null) { url = addUrlParameter(url, Constants.CLIENT_DESERIALZE_MODE_PARAMETER, client.getSerializer().getMode().name()); url = addUrlParameter(url, Constants.CLIENT_SERIALZE_MODE_PARAMETER, client.getSerializer().getPushMode().name()); } String className = getClass().getName(); className = className.substring(className.lastIndexOf('.') + 1); String transport = className.substring(0, className.indexOf("CometTransport")); return addUrlParameter(url, "t", Integer.toString((int) (Duration.currentTimeMillis() % Integer.MAX_VALUE), Character.MAX_RADIX).toUpperCase() + "&c=" + connectionCount + "&tr=" + transport); }