net.i2p.i2ptunnel
Class WebEditPageHelper

java.lang.Object
  extended bynet.i2p.i2ptunnel.WebEditPageHelper

public class WebEditPageHelper
extends java.lang.Object

UUUUuuuuuugly glue code to handle bean interaction from the web, process that data, and spit out the results (or the form requested). The basic usage is to set any of the fields with data then query the bean via getActionResults() which triggers the request processing (taking all the provided data, doing what needs to be done) and returns the results of those activites. Then a subsequent call to getEditForm() generates the HTML form to either edit the currently selected tunnel (if specified) or add a new one. This functionality is delegated to the WebEditPageFormGenerator.


Constructor Summary
WebEditPageHelper()
           
 
Method Summary
 java.lang.String getActionResults()
          Process the form and display any resulting messages
 java.lang.String getEditForm()
          Generate an HTML form to edit / create a tunnel according to the specified fields
(package private)  java.lang.String getNum()
           
(package private)  TunnelController getTunnelController()
          Retrieve the tunnel pointed to by the current id
(package private)  java.lang.String getType()
           
 void setAction(java.lang.String action)
          Used for form submit - either "Save" or Remove"
 void setClientHost(java.lang.String host)
          I2CP host the router is on
 void setClientPort(java.lang.String port)
          I2CP port the router is on
 void setConnectDelay(java.lang.String moo)
           
 void setCustomOptions(java.lang.String customOptions)
          what I2P session overrides should be used
 void setDescription(java.lang.String description)
          one line description
 void setName(java.lang.String name)
          Short name of the tunnel
 void setNonce(java.lang.String nonce)
           
 void setNum(java.lang.String id)
          Which particular tunnel should be edited (index into the current TunnelControllerGroup's getControllers() list).
 void setPort(java.lang.String port)
          what port should this client/httpclient listen on
 void setPrivKeyFile(java.lang.String file)
          What filename is this server tunnel's private keys stored in
 void setPrivKeyGenerate(java.lang.String moo)
          If called with any value, we want to generate a new destination for this server tunnel.
 void setProfile(java.lang.String profile)
           
 void setProxyList(java.lang.String proxyList)
          what HTTP outproxies should be used (httpclient specific)
 void setReachableBy(java.lang.String reachableBy)
          what interface should this client/httpclient listen on (unless overridden by the setReachableByOther() field)
 void setReachableByOther(java.lang.String reachableByOther)
          If specified, defines the exact IP interface to listen for requests on (in the case of client/httpclient tunnels)
 void setRemoveConfirm(java.lang.String moo)
          If called with any value (and the form submitted with action=Remove), we really do want to stop and remove the tunnel.
 void setSpoofedHost(java.lang.String host)
          What host does this http server tunnel spoof
 void setStartOnLoad(java.lang.String moo)
          If called with any value, we want this tunnel to start whenever it is loaded (aka right now and whenever the router is started up)
 void setTargetDestination(java.lang.String dest)
          What peer does this client tunnel point at
 void setTargetHost(java.lang.String host)
          What host does this server tunnel point at
 void setTargetPort(java.lang.String port)
          What port does this server tunnel point at
 void setTunnelCount(java.lang.String tunnelCount)
          how many parallel inbound tunnels to use
 void setTunnelDepth(java.lang.String tunnelDepth)
          how many hops to use for inbound tunnels
 void setType(java.lang.String type)
          What type of tunnel (httpclient, client, or server).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebEditPageHelper

public WebEditPageHelper()
Method Detail

setNonce

public void setNonce(java.lang.String nonce)

setAction

public void setAction(java.lang.String action)
Used for form submit - either "Save" or Remove"


setType

public void setType(java.lang.String type)
What type of tunnel (httpclient, client, or server). This is required when adding a new tunnel.


setNum

public void setNum(java.lang.String id)
Which particular tunnel should be edited (index into the current TunnelControllerGroup's getControllers() list). This is required when editing a tunnel, but not when adding a new one.


getType

java.lang.String getType()

getNum

java.lang.String getNum()

setName

public void setName(java.lang.String name)
Short name of the tunnel


setDescription

public void setDescription(java.lang.String description)
one line description


setClientHost

public void setClientHost(java.lang.String host)
I2CP host the router is on


setClientPort

public void setClientPort(java.lang.String port)
I2CP port the router is on


setTunnelDepth

public void setTunnelDepth(java.lang.String tunnelDepth)
how many hops to use for inbound tunnels


setTunnelCount

public void setTunnelCount(java.lang.String tunnelCount)
how many parallel inbound tunnels to use


setCustomOptions

public void setCustomOptions(java.lang.String customOptions)
what I2P session overrides should be used


setProxyList

public void setProxyList(java.lang.String proxyList)
what HTTP outproxies should be used (httpclient specific)


setPort

public void setPort(java.lang.String port)
what port should this client/httpclient listen on


setReachableBy

public void setReachableBy(java.lang.String reachableBy)
what interface should this client/httpclient listen on (unless overridden by the setReachableByOther() field)


setReachableByOther

public void setReachableByOther(java.lang.String reachableByOther)
If specified, defines the exact IP interface to listen for requests on (in the case of client/httpclient tunnels)


setTargetDestination

public void setTargetDestination(java.lang.String dest)
What peer does this client tunnel point at


setTargetHost

public void setTargetHost(java.lang.String host)
What host does this server tunnel point at


setTargetPort

public void setTargetPort(java.lang.String port)
What port does this server tunnel point at


setSpoofedHost

public void setSpoofedHost(java.lang.String host)
What host does this http server tunnel spoof


setPrivKeyFile

public void setPrivKeyFile(java.lang.String file)
What filename is this server tunnel's private keys stored in


setPrivKeyGenerate

public void setPrivKeyGenerate(java.lang.String moo)
If called with any value, we want to generate a new destination for this server tunnel. This won't cause any existing private keys to be overwritten, however.


setRemoveConfirm

public void setRemoveConfirm(java.lang.String moo)
If called with any value (and the form submitted with action=Remove), we really do want to stop and remove the tunnel.


setStartOnLoad

public void setStartOnLoad(java.lang.String moo)
If called with any value, we want this tunnel to start whenever it is loaded (aka right now and whenever the router is started up)


setConnectDelay

public void setConnectDelay(java.lang.String moo)

setProfile

public void setProfile(java.lang.String profile)

getActionResults

public java.lang.String getActionResults()
Process the form and display any resulting messages


getEditForm

public java.lang.String getEditForm()
Generate an HTML form to edit / create a tunnel according to the specified fields


getTunnelController

TunnelController getTunnelController()
Retrieve the tunnel pointed to by the current id