Exemple #1
0
 /**
  * tunnel.getOptions must contain "command".
  *
  * @throws IllegalArgumentException if it doesn't
  */
 public I2Ping(Logging l, boolean ownDest, EventDispatcher notifyThis, I2PTunnel tunnel) {
   super(-1, ownDest, l, notifyThis, "I2Ping", tunnel);
   if (!tunnel.getClientOptions().containsKey(PROP_COMMAND)) {
     // todo clean up
     throw new IllegalArgumentException("Options does not contain " + PROP_COMMAND);
   }
 }
 /**
  * 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);
 }