// See if not set by configuration, if there are defaults
// in order from the Endpoint, Service, or Bus.
if (this.clientSidePolicy == null) {
clientSidePolicy = endpointInfo.getTraversedExtensor(
new HTTPClientPolicy(), HTTPClientPolicy.class);
}
if (this.authorizationPolicy == null) {
authorizationPolicy = endpointInfo.getTraversedExtensor(
new AuthorizationPolicy(), AuthorizationPolicy.class);
}
if (this.proxyAuthorizationPolicy == null) {
proxyAuthorizationPolicy = endpointInfo.getTraversedExtensor(
new ProxyAuthorizationPolicy(), ProxyAuthorizationPolicy.class);
}
if (this.tlsClientParameters == null) {
tlsClientParameters = endpointInfo.getTraversedExtensor(
null, TLSClientParameters.class);
}
if (this.trustDecider == null) {
trustDecider = endpointInfo.getTraversedExtensor(
null, MessageTrustDecider.class);
}
if (this.authSupplier == null) {
authSupplier = endpointInfo.getTraversedExtensor(
null, HttpAuthSupplier.class);
}
if (trustDecider == null) {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE,
"No Trust Decider configured for Conduit '"
+ getConduitName() + "'");
}
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Message Trust Decider of class '"
+ trustDecider.getClass().getName()
+ "' with logical name of '"
+ trustDecider.getLogicalName()
+ "' has been configured for Conduit '"
+ getConduitName()
+ "'");
}
}
if (authSupplier == null) {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE,
"No Auth Supplier configured for Conduit '"
+ getConduitName() + "'");
}
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "HttpAuthSupplier of class '"
+ authSupplier.getClass().getName()
+ "' with logical name of '"
+ authSupplier.getLogicalName()
+ "' has been configured for Conduit '"
+ getConduitName()
+ "'");
}
}
if (this.tlsClientParameters != null) {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Conduit '" + getConduitName()
+ "' has been configured for TLS "
+ "keyManagers " + Arrays.toString(tlsClientParameters.getKeyManagers())
+ "trustManagers " + Arrays.toString(tlsClientParameters.getTrustManagers())
+ "secureRandom " + tlsClientParameters.getSecureRandom()
+ "Disable Common Name (CN) Check: " + tlsClientParameters.isDisableCNCheck());
}
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Conduit '" + getConduitName()
+ "' has been configured for plain http.");
}
}
// Retrieve system properties (if any)
String proxyHost = System.getProperty(HTTP_PROXY_HOST);
if (proxyHost != null) {
// System is configured with a proxy, use it
systemProxyConfiguration = new HTTPClientPolicy();
systemProxyConfiguration.setProxyServer(proxyHost);
systemProxyConfiguration.setProxyServerType(ProxyServerType.HTTP);
// 8080 is the default proxy port value as pert some documentation
String proxyPort = System.getProperty(HTTP_PROXY_PORT, "8080");