6.5.2. Outside OpenShift 外の Hot Rod 設定ビルダー
OpenShift の外部で実行されている Hot Rod クライアントの設定 Bean:
ConfigurationBuilder builder = new ConfigurationBuilder(); builder.addServer() // Connection .host("${HOTROD_ROUTE_HOSTNAME}").port(443) // Use BASIC client intelligence. .clientIntelligence(ClientIntelligence.BASIC) .security() // Authentication .authentication().enable() .username("${USERNAME}") .password("${PASSWORD}") .serverName("${APPLICATION_NAME}") .saslMechanism("DIGEST-MD5") .saslQop(SaslQop.AUTH) // Encryption .ssl() .sniHostName("${HOTROD_ROUTE_HOSTNAME}") .trustStorePath(path/to/tls.crt);
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.addServer()
// Connection
.host("${HOTROD_ROUTE_HOSTNAME}").port(443)
// Use BASIC client intelligence.
.clientIntelligence(ClientIntelligence.BASIC)
.security()
// Authentication
.authentication().enable()
.username("${USERNAME}")
.password("${PASSWORD}")
.serverName("${APPLICATION_NAME}")
.saslMechanism("DIGEST-MD5")
.saslQop(SaslQop.AUTH)
// Encryption
.ssl()
.sniHostName("${HOTROD_ROUTE_HOSTNAME}")
.trustStorePath(path/to/tls.crt);