Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.karb.hitcryptoproxy
Class Configuration

    java.lang.Object
      de.karb.hitcryptoproxy.Configuration

    public class Configuration

extends java.lang.Object

Convenient class to access the properties

Author:
  Schildmann@karb.de

Nested Class Summary
`static class` | `Configuration.Address` Helper class that holds a server address and port
`static class` | `Configuration.Mode` There are two modes: Production and Test

Constructor Summary
`Configuration(java.util.Properties props)` Constructor

Method Summary
`java.util.List<Configuration.Address>` | `getAddresses(Configuration.Mode mode)` Constructs a list of addresses for all combinations of the primary and backup server and the primary and backup port for the given mode
`int` | `getBackupPort(Configuration.Mode mode)` Returns the backup port for the given mode
`java.lang.String` | `getBackupServer(Configuration.Mode mode)` Returns the address of the backup server for the given mode
`int` | `getPrimaryPort(Configuration.Mode mode)` Returns the primary port for the given mode
`java.lang.String` | `getPrimaryServer(Configuration.Mode mode)` Returns the address of the primary server for the given mode
`int` | `getProxyPort(Configuration.Mode mode)` Returns the port of the proxy for the given mode
`java.lang.String` | `getPublicKey()` Returns the public key
`int` | `getThreadPoolSize()` Returns the threadpool size

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

Constructor Detail

### Configuration

    public Configuration(java.util.Properties props)

  Constructor

  Parameters:
    `props` - the given properties

Method Detail

### getPublicKey

    public java.lang.String getPublicKey()

  Returns the public key

  Returns:
    public key

### getThreadPoolSize

    public int getThreadPoolSize()

  Returns the threadpool size

  Returns:
    threadpool size

### getProxyPort

    public int getProxyPort(Configuration.Mode mode)

  Returns the port of the proxy for the given mode

  Parameters:
    `mode` - the given mode
  Returns:
    port

### getPrimaryPort

    public int getPrimaryPort(Configuration.Mode mode)

  Returns the primary port for the given mode

  Parameters:
    `mode` - the given mode
  Returns:
    port

### getBackupPort

    public int getBackupPort(Configuration.Mode mode)

  Returns the backup port for the given mode

  Parameters:
    `mode` - the given mode
  Returns:
    port

### getPrimaryServer

    public java.lang.String getPrimaryServer(Configuration.Mode mode)

  Returns the address of the primary server for the given mode

  Parameters:
    `mode` - the given mode
  Returns:
    address

### getBackupServer

    public java.lang.String getBackupServer(Configuration.Mode mode)

  Returns the address of the backup server for the given mode

  Parameters:
    `mode` - the given mode
  Returns:
    address

### getAddresses

    public java.util.List<Configuration.Address> getAddresses(Configuration.Mode mode)

  Constructs a list of addresses for all combinations of the primary and backup server and the primary and backup port for the given mode

  Parameters:
    `mode` - the given mode
  Returns:
    the list of addresses

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD