public class JolokiaServerConfig extends Object
Constructor and Description |
---|
JolokiaServerConfig(Map<String,String> pConfig)
Constructor which prepares the server configuration from a map
of given config options (key: option name, value: option value).
|
Modifier and Type | Method and Description |
---|---|
InetAddress |
getAddress()
Address to bind to, which is either used from the configuration option
"host" or by default from
InetAddress.getLocalHost() |
com.sun.net.httpserver.Authenticator |
getAuthenticator()
Return a basic authenticator if user or password is given in the configuration.
|
int |
getBacklog()
Backlog of the HTTP server, which is the number of requests to keep before throwing them away
|
String |
getCaCert()
Get a path to a CA PEM file which is used to verify client certificates.
|
List<String> |
getClientPrincipals() |
String |
getContextPath()
Context path under which the agent is reachable.
|
protected Map<String,String> |
getDefaultConfig(Map<String,String> pConfig) |
String |
getExecutor()
Executor to use as provided by the 'executor' option or "single" as default
|
boolean |
getExtendedClientCheck() |
Configuration |
getJolokiaConfig()
Get the Jolokia runtime configuration
|
String |
getKeyManagerAlgorithm() |
String |
getKeystore()
Name of the keystore for 'https', if any
|
char[] |
getKeystorePassword()
Password for keystore if a keystore is used.
|
String |
getKeyStoreType() |
int |
getPort()
Port for the server to listen to
|
String |
getProtocol()
Protocol to use
|
String |
getSecureSocketProtocol() |
String |
getServerCert()
Get the path to a server cert which is presented clients when using TLS.
|
String |
getServerKey()
Get the path to a the cert which has the private server key.
|
String |
getServerKeyAlgorithm()
The algorithm to use for extracting the private server key.
|
String[] |
getSSLCipherSuites()
The list of enabled SSL / TLS cipher suites
|
String[] |
getSSLProtocols()
The list of enabled SSL / TLS protocols to serve with
|
String |
getThreadNamePrefix()
Thread name prefix that executor will use while creating new thread(s).
|
int |
getThreadNr()
Thread number to use when executor model is "fixed"
|
String |
getTrustManagerAlgorithm() |
protected void |
init(Map<String,String> pConfig)
Initialize the configuration with the given map
|
protected void |
initConfigAndValidate(Map<String,String> agentConfig) |
protected void |
prepareDetectorOptions(Map<String,String> pConfig) |
protected Map<String,String> |
readPropertiesFromInputStream(InputStream pIs,
String pLabel) |
void |
updateHTTPSSettingsFromContext(SSLContext sslContext)
Filter the list of protocols and ciphers to those supported by the given SSLContext
|
boolean |
useHttps()
Whether or not to use https as the procol
|
boolean |
useSslClientAuthentication()
When the protocol is 'https' then this property indicates whether SSL client certificate
authentication should be used or not
|
public JolokiaServerConfig(Map<String,String> pConfig)
getDefaultConfig(Map)
).
The given configuration consist of two parts: Any global options
as defined in ConfigKey
are used for setting up the agent.
All other options are taken for preparing the HTTP server under
which the agent is served. The known properties are described in
the reference manual.
All other options are ignored.pConfig
- the configuration options to use.protected void init(Map<String,String> pConfig)
pConfig
- map holding the configuration in string representation. A reference to the map will be keptpublic Configuration getJolokiaConfig()
public String getProtocol()
public boolean useHttps()
public InetAddress getAddress()
InetAddress.getLocalHost()
public int getPort()
public com.sun.net.httpserver.Authenticator getAuthenticator()
public int getBacklog()
public String getContextPath()
public String getExecutor()
public String getThreadNamePrefix()
public int getThreadNr()
public boolean useSslClientAuthentication()
public String getKeystore()
public char[] getKeystorePassword()
public String getCaCert()
getKeystore()
is not set.public String getServerCert()
getKeystore()
is not set.public String getServerKey()
getKeystore()
is not set.public String getServerKeyAlgorithm()
public String[] getSSLProtocols()
public String[] getSSLCipherSuites()
public void updateHTTPSSettingsFromContext(SSLContext sslContext)
sslContext
- the SSLContext to pull information fromprotected Map<String,String> readPropertiesFromInputStream(InputStream pIs, String pLabel)
public String getSecureSocketProtocol()
public String getKeyManagerAlgorithm()
public String getTrustManagerAlgorithm()
public String getKeyStoreType()
public boolean getExtendedClientCheck()
Copyright © 2019. All rights reserved.