this("0.0.0.0", 0);
}
public EmbeddedWebServer(String host, int port) {
server = new Server();
final AccumuloConfiguration conf = Monitor.getSystemConfiguration();
if (EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTORE)) || EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTOREPASS))
|| EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTORE)) || EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS))) {
connector = new SelectChannelConnector();
usingSsl = false;
} else {
SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setKeyStorePath(conf.get(Property.MONITOR_SSL_KEYSTORE));
sslContextFactory.setKeyStorePassword(conf.get(Property.MONITOR_SSL_KEYSTOREPASS));
sslContextFactory.setTrustStore(conf.get(Property.MONITOR_SSL_TRUSTSTORE));
sslContextFactory.setTrustStorePassword(conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS));
final String includedCiphers = conf.get(Property.MONITOR_SSL_INCLUDE_CIPHERS);
if (!Property.MONITOR_SSL_INCLUDE_CIPHERS.getDefaultValue().equals(includedCiphers)) {
sslContextFactory.setIncludeCipherSuites(StringUtils.split(includedCiphers, ','));
}
final String excludedCiphers = conf.get(Property.MONITOR_SSL_EXCLUDE_CIPHERS);
if (!Property.MONITOR_SSL_EXCLUDE_CIPHERS.getDefaultValue().equals(excludedCiphers)) {
sslContextFactory.setExcludeCipherSuites(StringUtils.split(excludedCiphers, ','));
}
connector = new SslSelectChannelConnector(sslContextFactory);