/** * @deprecated Specific to {@link Mode#REMOTING}. */ @Deprecated private Channel connectViaHttp(URL url) throws IOException { LOGGER.log(FINE, "Trying to connect to {0} via Remoting over HTTP", url); FullDuplexHttpStream con = new FullDuplexHttpStream(url, "cli?remoting=true", authorization); Channel ch = new Channel("Chunked connection to " + url, pool,con.getInputStream(),con.getOutputStream()); final long interval = 15*1000; final long timeout = (interval * 3) / 4; new PingThread(ch,timeout,interval) { protected void onDead() { // noop. the point of ping is to keep the connection alive // as most HTTP servers have a rather short read time out } }.start(); return ch; }
pool,con.getInputStream(),con.getOutputStream()); new PingThread(channel,30*1000) { protected void onDead() {