## net.i2p.i2ptunnel
Class TunnelController

    java.lang.Object
      net.i2p.i2ptunnel.TunnelController

All Implemented Interfaces:
  Logging

public class TunnelController
extends java.lang.Object
implements Logging

Coordinate the runtime operation and configuration of a tunnel. These objects are bundled together under a TunnelControllerGroup where the entire group is stored / loaded from a single config file.

Constructor Summary
`TunnelController(java.util.Properties config, java.lang.String prefix)` Create a new controller for a tunnel out of the specific config options.
`TunnelController(java.util.Properties config, java.lang.String prefix, boolean createKey)`

Method Summary
`java.util.List` `clearMessages()` Pull off any messages that the I2PTunnel has produced
`java.lang.String` `getClientOptions()`
`java.util.Properties` `getConfig(java.lang.String prefix)`
`java.lang.String` `getDescription()`
`java.lang.String` `getI2CPHost()`
`java.lang.String` `getI2CPPort()`
`boolean` `getIsRunning()`
`boolean` `getIsStarting()`
`java.lang.String` `getListenOnInterface()`
`java.lang.String` `getListenPort()`
`java.lang.String` `getMyDestination()`
`java.lang.String` `getName()`
`java.lang.String` `getPrivKeyFile()`
`java.lang.String` `getProxyList()`
`java.lang.String` `getSharedClient()`
`java.lang.String` `getSpoofedHost()`
`boolean` `getStartOnLoad()`
`void` `getSummary(java.lang.StringBuffer buf)`
`java.lang.String` `getTargetDestination()`
`java.lang.String` `getTargetHost()`
`java.lang.String` `getTargetPort()`
`java.lang.String` `getType()`
`void` `log(java.lang.String s)`
`void` `restartTunnel()`
`void` `setConfig(java.util.Properties config, java.lang.String prefix)`
`void` `startTunnel()` Start up the tunnel (if it isn't already running)
`void` `startTunnelBackground()`
`void` `stopTunnel()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TunnelController

    public TunnelController(java.util.Properties config,
                            java.lang.String prefix)

  Create a new controller for a tunnel out of the specific config options. The config may contain a large number of options - only ones that begin in the prefix should be used (and, in turn, that prefix should be stripped off before being interpreted by this controller)

Parameters:
  `config` - original key=value mapping
  `prefix` - beginning of key values that are relevent to this tunnel

### TunnelController

    public TunnelController(java.util.Properties config,
                            java.lang.String prefix,
                            boolean createKey)

Parameters:
  `createKey` - for servers, whether we want to create a brand new destination with private keys at the location specified or not (does not overwrite existing ones)

Method Detail

### startTunnelBackground

    public void startTunnelBackground()

### startTunnel

    public void startTunnel()

  Start up the tunnel (if it isn't already running)

### stopTunnel

    public void stopTunnel()

### restartTunnel

    public void restartTunnel()

### setConfig

    public void setConfig(java.util.Properties config,
                          java.lang.String prefix)

### getConfig

    public java.util.Properties getConfig(java.lang.String prefix)

### getType

    public java.lang.String getType()

### getName

    public java.lang.String getName()

### getDescription

    public java.lang.String getDescription()

### getI2CPHost

    public java.lang.String getI2CPHost()

### getI2CPPort

    public java.lang.String getI2CPPort()

### getClientOptions

    public java.lang.String getClientOptions()

### getListenOnInterface

    public java.lang.String getListenOnInterface()

### getTargetHost

    public java.lang.String getTargetHost()

### getTargetPort

    public java.lang.String getTargetPort()

### getSpoofedHost

    public java.lang.String getSpoofedHost()

### getPrivKeyFile

    public java.lang.String getPrivKeyFile()

### getListenPort

    public java.lang.String getListenPort()

### getTargetDestination

    public java.lang.String getTargetDestination()

### getProxyList

    public java.lang.String getProxyList()

### getSharedClient

    public java.lang.String getSharedClient()

### getStartOnLoad

    public boolean getStartOnLoad()

### getMyDestination

    public java.lang.String getMyDestination()

### getIsRunning

    public boolean getIsRunning()

### getIsStarting

    public boolean getIsStarting()

### getSummary

    public void getSummary(java.lang.StringBuffer buf)

### log

    public void log(java.lang.String s)

  Specified by:
    `log` in interface `Logging`

### clearMessages

    public java.util.List clearMessages()

  Pull off any messages that the I2PTunnel has produced

  Returns:
    list of messages pulled off (each is a String, earliest first)