java.lang.Object
net.i2p.router.web.FormHandler
net.i2p.router.web.helpers.ConfigTunnelsHandler

public class ConfigTunnelsHandlerextends FormHandler
Handler to deal with form submissions from the tunnel config form and act upon the values.
  • Field Details

    • _shouldSave

      private boolean _shouldSave
      Set when the form was submitted for saving.
  • Constructor Details

    • ConfigTunnelsHandler

      public ConfigTunnelsHandler()
      Creates a handler; the container calls it with no arguments before each submission.
  • Method Details

    • processForm

      protected void processForm()
      Description copied from class: FormHandler
      Implement this to perform the final processing (in turn, adding formNotice and formError messages, etc)

      Will only be called if _action is non-null and the nonce is valid.

      Specified by:
      processForm in class FormHandler
    • setShouldsave

      public void setShouldsave(String moo)
      Set whether the form should trigger a save.
      Parameters:
      moo - the form value to check for save trigger
    • saveChanges

      private void saveChanges()
      The user made changes to the network config and wants to save them, so lets go ahead and do so.
    • getInt

      private static final int getInt(Object val)
      Reads an integer out of a form value.
      Parameters:
      val - the value to read
      Returns:
      the number, 0 if it is not a number