Package bftsmart.reconfiguration.util
Class Configuration
- java.lang.Object
-
- bftsmart.reconfiguration.util.Configuration
-
- Direct Known Subclasses:
TOMConfiguration
public class Configuration extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
autoConnectLimit
protected boolean
channelsBlocking
protected java.lang.String
configHome
protected java.util.Map<java.lang.String,java.lang.String>
configs
static java.lang.String
DEFAULT_HASH
static java.lang.String
DEFAULT_HASH_PROVIDER
static java.lang.String
DEFAULT_KEYLOADER
static java.lang.String
DEFAULT_SECRETKEY
static java.lang.String
DEFAULT_SECRETKEY_PROVIDER
static java.lang.String
DEFAULT_SIGNATURE
static java.lang.String
DEFAULT_SIGNATURE_PROVIDER
protected boolean
defaultKeys
protected java.lang.String
hashAlgorithm
protected java.lang.String
hashAlgorithmProvider
protected HostsConfig
hosts
protected static java.lang.String
hostsFileName
protected KeyLoader
keyLoader
protected int
processId
protected java.lang.String
secretKeyAlgorithm
protected java.lang.String
secretKeyAlgorithmProvider
protected java.lang.String
signatureAlgorithm
protected java.lang.String
signatureAlgorithmProvider
protected boolean
useReadOnlyRequests
-
Constructor Summary
Constructors Constructor Description Configuration(int procId, KeyLoader loader)
Configuration(int procId, java.lang.String configHomeParam, KeyLoader loader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHostInfo(int id, java.lang.String host, int port, int portRR)
int
getAutoConnectLimit()
java.lang.String
getConfigHome()
java.lang.String
getHashAlgorithm()
java.lang.String
getHashAlgorithmProvider()
java.lang.String
getHost(int id)
java.net.InetSocketAddress
getLocalAddress(int id)
int
getPort(int id)
java.security.PrivateKey
getPrivateKey()
int
getProcessId()
java.util.Map<java.lang.String,java.lang.String>
getProperties()
java.lang.String
getProperty(java.lang.String key)
java.security.PublicKey
getPublicKey()
java.security.PublicKey
getPublicKey(int id)
java.net.InetSocketAddress
getRemoteAddress(int id)
java.lang.String
getSecretKeyAlgorithm()
java.lang.String
getSecretKeyAlgorithmProvider()
int
getServerToServerPort(int id)
java.net.InetSocketAddress
getServerToServerRemoteAddress(int id)
java.lang.String
getSignatureAlgorithm()
java.lang.String
getSignatureAlgorithmProvider()
protected void
init()
boolean
isHostSetted(int id)
void
setProcessId(int processId)
boolean
useBlockingChannels()
boolean
useDefaultKeys()
boolean
useReadOnlyRequests()
-
-
-
Field Detail
-
processId
protected int processId
-
channelsBlocking
protected boolean channelsBlocking
-
autoConnectLimit
protected int autoConnectLimit
-
configs
protected java.util.Map<java.lang.String,java.lang.String> configs
-
hosts
protected HostsConfig hosts
-
keyLoader
protected KeyLoader keyLoader
-
DEFAULT_SECRETKEY
public static final java.lang.String DEFAULT_SECRETKEY
- See Also:
- Constant Field Values
-
DEFAULT_SECRETKEY_PROVIDER
public static final java.lang.String DEFAULT_SECRETKEY_PROVIDER
- See Also:
- Constant Field Values
-
DEFAULT_SIGNATURE
public static final java.lang.String DEFAULT_SIGNATURE
- See Also:
- Constant Field Values
-
DEFAULT_SIGNATURE_PROVIDER
public static final java.lang.String DEFAULT_SIGNATURE_PROVIDER
- See Also:
- Constant Field Values
-
DEFAULT_KEYLOADER
public static final java.lang.String DEFAULT_KEYLOADER
- See Also:
- Constant Field Values
-
DEFAULT_HASH
public static final java.lang.String DEFAULT_HASH
- See Also:
- Constant Field Values
-
DEFAULT_HASH_PROVIDER
public static final java.lang.String DEFAULT_HASH_PROVIDER
- See Also:
- Constant Field Values
-
secretKeyAlgorithm
protected java.lang.String secretKeyAlgorithm
-
secretKeyAlgorithmProvider
protected java.lang.String secretKeyAlgorithmProvider
-
signatureAlgorithm
protected java.lang.String signatureAlgorithm
-
signatureAlgorithmProvider
protected java.lang.String signatureAlgorithmProvider
-
hashAlgorithm
protected java.lang.String hashAlgorithm
-
hashAlgorithmProvider
protected java.lang.String hashAlgorithmProvider
-
configHome
protected java.lang.String configHome
-
hostsFileName
protected static java.lang.String hostsFileName
-
defaultKeys
protected boolean defaultKeys
-
useReadOnlyRequests
protected boolean useReadOnlyRequests
-
-
Method Detail
-
init
protected void init()
-
getConfigHome
public java.lang.String getConfigHome()
-
useDefaultKeys
public boolean useDefaultKeys()
-
isHostSetted
public final boolean isHostSetted(int id)
-
useBlockingChannels
public final boolean useBlockingChannels()
-
useReadOnlyRequests
public final boolean useReadOnlyRequests()
-
getAutoConnectLimit
public final int getAutoConnectLimit()
-
getSecretKeyAlgorithm
public final java.lang.String getSecretKeyAlgorithm()
-
getSignatureAlgorithm
public final java.lang.String getSignatureAlgorithm()
-
getHashAlgorithm
public final java.lang.String getHashAlgorithm()
-
getSecretKeyAlgorithmProvider
public final java.lang.String getSecretKeyAlgorithmProvider()
-
getSignatureAlgorithmProvider
public final java.lang.String getSignatureAlgorithmProvider()
-
getHashAlgorithmProvider
public final java.lang.String getHashAlgorithmProvider()
-
getProperty
public final java.lang.String getProperty(java.lang.String key)
-
getProperties
public final java.util.Map<java.lang.String,java.lang.String> getProperties()
-
getRemoteAddress
public final java.net.InetSocketAddress getRemoteAddress(int id)
-
getServerToServerRemoteAddress
public final java.net.InetSocketAddress getServerToServerRemoteAddress(int id)
-
getLocalAddress
public final java.net.InetSocketAddress getLocalAddress(int id)
-
getHost
public final java.lang.String getHost(int id)
-
getPort
public final int getPort(int id)
-
getServerToServerPort
public final int getServerToServerPort(int id)
-
getProcessId
public final int getProcessId()
-
setProcessId
public final void setProcessId(int processId)
-
addHostInfo
public final void addHostInfo(int id, java.lang.String host, int port, int portRR)
-
getPublicKey
public java.security.PublicKey getPublicKey()
-
getPublicKey
public java.security.PublicKey getPublicKey(int id)
-
getPrivateKey
public java.security.PrivateKey getPrivateKey()
-
-