Esempio n. 1
0
 /**
  * Update the dests then call super.
  *
  * @since 0.9.9
  */
 @Override
 public void optionsUpdated(I2PTunnel tunnel) {
   if (getTunnel() != tunnel) return;
   Properties props = tunnel.getClientOptions();
   // see TunnelController.setSessionOptions()
   String targets = props.getProperty("targetDestination");
   buildAddresses(targets);
   super.optionsUpdated(tunnel);
 }
Esempio n. 2
0
 @Override
 public boolean close(boolean forced) {
   if (!open) return true;
   super.close(forced);
   if (!forced && !finished) {
     l.log("There are still pings running!");
     return false;
   }
   l.log("Closing pinger " + toString());
   l.log("Pinger closed.");
   return true;
 }
 protected void beginProcessing() throws IOException {
     //out.flush();
     PipedInputStream pi = BigPipedInputStream.getInstance();
     PipedOutputStream po = new PipedOutputStream(pi);
     // Run in the client thread pool, as there should be an unused thread
     // there after the accept().
     // Overridden in I2PTunnelHTTPServer, where it does not use the client pool.
     try {
         I2PTunnelClientBase.getClientExecutor().execute(new Pusher(pi, out));
     } catch (RejectedExecutionException ree) {
         // shouldn't happen
         throw ree;
     }
     out = po;
 }