## net.i2p.router
Class TunnelPoolSettings

    java.lang.Object
      net.i2p.router.TunnelPoolSettings

public class TunnelPoolSettings
extends java.lang.Object

Wrap up the settings for a pool of tunnels (duh)

Field Summary
`static boolean` `DEFAULT_ALLOW_ZERO_HOP`
`static int` `DEFAULT_BACKUP_QUANTITY`
`static int` `DEFAULT_DURATION`
`static int` `DEFAULT_LENGTH`
`static int` `DEFAULT_LENGTH_VARIANCE`
`static int` `DEFAULT_QUANTITY`
`static int` `DEFAULT_REBUILD_PERIOD`
`static java.lang.String` `PREFIX_DEFAULT` prefix used to override the router's defaults for clients
`static java.lang.String` `PREFIX_INBOUND_EXPLORATORY` prefix used to configure the inbound exploratory pool
`static java.lang.String` `PREFIX_OUTBOUND_EXPLORATORY` prefix used to configure the outbound exploratory pool
`static java.lang.String` `PROP_ALLOW_ZERO_HOP`
`static java.lang.String` `PROP_BACKUP_QUANTITY`
`static java.lang.String` `PROP_DURATION`
`static java.lang.String` `PROP_LENGTH`
`static java.lang.String` `PROP_LENGTH_VARIANCE`
`static java.lang.String` `PROP_NICKNAME`
`static java.lang.String` `PROP_QUANTITY`
`static java.lang.String` `PROP_REBUILD_PERIOD`

Constructor Summary
`TunnelPoolSettings()`

Method Summary
`boolean` `getAllowZeroHop()` if there are no tunnels to build with, will this pool allow 0 hop tunnels?
`int` `getBackupQuantity()` how many backup tunnels should be kept waiting in the wings
`Hash` `getDestination()` what destination is this a tunnel for (or null if none)
`java.lang.String` `getDestinationNickname()` what user supplied name was given to the client connected (can be null)
`int` `getDuration()`
`int` `getLength()` how many remote hops should be in the tunnel
`int` `getLengthOverride()`
`int` `getLengthVariance()` how should the length be varied.
`int` `getQuantity()` how many tunnels should be available at all times
`int` `getRebuildPeriod()` how long before tunnel expiration should new tunnels be built
`java.util.Properties` `getUnknownOptions()`
`boolean` `isExploratory()` is this an exploratory tunnel (or a client tunnel)
`boolean` `isInbound()` is this an inbound tunnel?
`void` `readFromProperties(java.lang.String prefix, java.util.Properties props)`
`void` `setAllowZeroHop(boolean ok)`
`void` `setBackupQuantity(int quantity)`
`void` `setDestination(Hash dest)`
`void` `setDestinationNickname(java.lang.String name)`
`void` `setDuration(int ms)`
`void` `setIsExploratory(boolean isExploratory)`
`void` `setIsInbound(boolean isInbound)`
`void` `setLength(int length)`
`void` `setLengthOverride(int variance)`
`void` `setLengthVariance(int variance)`
`void` `setQuantity(int quantity)`
`void` `setRebuildPeriod(int periodMs)`
`java.lang.String` `toString()`
`void` `writeToProperties(java.lang.String prefix, java.util.Properties props)`

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

Field Detail

### PREFIX_DEFAULT

    public static final java.lang.String PREFIX_DEFAULT

  prefix used to override the router's defaults for clients

  See Also:
    Constant Field Values

### PREFIX_INBOUND_EXPLORATORY

    public static final java.lang.String PREFIX_INBOUND_EXPLORATORY

  prefix used to configure the inbound exploratory pool

  See Also:
    Constant Field Values

### PREFIX_OUTBOUND_EXPLORATORY

    public static final java.lang.String PREFIX_OUTBOUND_EXPLORATORY

  prefix used to configure the outbound exploratory pool

  See Also:
    Constant Field Values

### PROP_NICKNAME

    public static final java.lang.String PROP_NICKNAME

See Also:
  Constant Field Values

### PROP_QUANTITY

    public static final java.lang.String PROP_QUANTITY

See Also:
  Constant Field Values

### PROP_BACKUP_QUANTITY

    public static final java.lang.String PROP_BACKUP_QUANTITY

See Also:
  Constant Field Values

### PROP_REBUILD_PERIOD

    public static final java.lang.String PROP_REBUILD_PERIOD

See Also:
  Constant Field Values

### PROP_DURATION

    public static final java.lang.String PROP_DURATION

See Also:
  Constant Field Values

### PROP_LENGTH

    public static final java.lang.String PROP_LENGTH

See Also:
  Constant Field Values

### PROP_LENGTH_VARIANCE

    public static final java.lang.String PROP_LENGTH_VARIANCE

See Also:
  Constant Field Values

### PROP_ALLOW_ZERO_HOP

    public static final java.lang.String PROP_ALLOW_ZERO_HOP

See Also:
  Constant Field Values

### DEFAULT_QUANTITY

    public static final int DEFAULT_QUANTITY

See Also:
  Constant Field Values

### DEFAULT_BACKUP_QUANTITY

    public static final int DEFAULT_BACKUP_QUANTITY

See Also:
  Constant Field Values

### DEFAULT_REBUILD_PERIOD

    public static final int DEFAULT_REBUILD_PERIOD

See Also:
  Constant Field Values

### DEFAULT_DURATION

    public static final int DEFAULT_DURATION

See Also:
  Constant Field Values

### DEFAULT_LENGTH

    public static final int DEFAULT_LENGTH

See Also:
  Constant Field Values

### DEFAULT_LENGTH_VARIANCE

    public static final int DEFAULT_LENGTH_VARIANCE

See Also:
  Constant Field Values

### DEFAULT_ALLOW_ZERO_HOP

    public static final boolean DEFAULT_ALLOW_ZERO_HOP

See Also:
  Constant Field Values

Constructor Detail

### TunnelPoolSettings

    public TunnelPoolSettings()

Method Detail

### getQuantity

    public int getQuantity()

  how many tunnels should be available at all times

### setQuantity

    public void setQuantity(int quantity)

### getBackupQuantity

    public int getBackupQuantity()

  how many backup tunnels should be kept waiting in the wings

### setBackupQuantity

    public void setBackupQuantity(int quantity)

### getRebuildPeriod

    public int getRebuildPeriod()

  how long before tunnel expiration should new tunnels be built

### setRebuildPeriod

    public void setRebuildPeriod(int periodMs)

### getLength

    public int getLength()

  how many remote hops should be in the tunnel

### setLength

    public void setLength(int length)

### getAllowZeroHop

    public boolean getAllowZeroHop()

  if there are no tunnels to build with, will this pool allow 0 hop tunnels?

### setAllowZeroHop

    public void setAllowZeroHop(boolean ok)

### getLengthVariance

    public int getLengthVariance()

  how should the length be varied. if negative, this randomly skews from (length - variance) to (length + variance), or if positive, from length to (length + variance), inclusive.

### setLengthVariance

    public void setLengthVariance(int variance)

### getLengthOverride

    public int getLengthOverride()

### setLengthOverride

    public void setLengthOverride(int variance)

### isInbound

    public boolean isInbound()

  is this an inbound tunnel?

### setIsInbound

    public void setIsInbound(boolean isInbound)

### isExploratory

    public boolean isExploratory()

  is this an exploratory tunnel (or a client tunnel)

### setIsExploratory

    public void setIsExploratory(boolean isExploratory)

### getDuration

    public int getDuration()

### setDuration

    public void setDuration(int ms)

### getDestination

    public Hash getDestination()

  what destination is this a tunnel for (or null if none)

### setDestination

    public void setDestination(Hash dest)

### getDestinationNickname

    public java.lang.String getDestinationNickname()

  what user supplied name was given to the client connected (can be null)

### setDestinationNickname

    public void setDestinationNickname(java.lang.String name)

### getUnknownOptions

    public java.util.Properties getUnknownOptions()

### readFromProperties

    public void readFromProperties(java.lang.String prefix,
                                   java.util.Properties props)

### writeToProperties

    public void writeToProperties(java.lang.String prefix,
                                  java.util.Properties props)

### toString

    public java.lang.String toString()