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

public class ConfigPeerHandlerextends FormHandler
Handler for peer configuration.
  • Field Details

    • _peer

      private String _peer
      Base64 of the peer being configured.
    • _speed

      private String _speed
      Speed limit asked for, in kB/s.
    • _capacity

      private String _capacity
      Capacity limit asked for, in kB/s.
  • Constructor Details

    • ConfigPeerHandler

      public ConfigPeerHandler()
      Constructs the handler.
  • 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
    • getHash

      private Hash getHash()
      Parses the peer's hash from the form.
      Returns:
      the peer's hash, null if it is not valid
    • setPeer

      public void setPeer(String peer)
      Set the peer hash.
      Parameters:
      peer - the base64 router hash to filter on
    • setSpeed

      public void setSpeed(String bonus)
      Set the speed bonus.
      Parameters:
      bonus - the speed bonus value
    • setCapacity

      public void setCapacity(String bonus)
      Set the capacity bonus.
      Parameters:
      bonus - the capacity bonus value