|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.karb.hitcryptoproxy.Configuration
public class Configuration
Convenient class to access the properties
| 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 |
|---|
public Configuration(java.util.Properties props)
props - the given properties| Method Detail |
|---|
public java.lang.String getPublicKey()
public int getThreadPoolSize()
public int getProxyPort(Configuration.Mode mode)
mode - the given mode
public int getPrimaryPort(Configuration.Mode mode)
mode - the given mode
public int getBackupPort(Configuration.Mode mode)
mode - the given mode
public java.lang.String getPrimaryServer(Configuration.Mode mode)
mode - the given mode
public java.lang.String getBackupServer(Configuration.Mode mode)
mode - the given mode
public java.util.List<Configuration.Address> getAddresses(Configuration.Mode mode)
mode - the given mode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||