use of org.glassfish.loadbalancer.admin.cli.connection.ConnectionManager in project Payara by payara.
the class ApplyHttpLbChanges method process.
public void process() throws Exception {
ConnectionManager _connectionManager = null;
LoadBalancer lb = LbConfigHelper.getLoadBalancer(domain, lbName);
String lbHost = lb.getDeviceHost();
String lbPort = lb.getDevicePort();
String lbProxyHost = null;
String lbProxyPort = null;
Property lbProxyHostProperty = lb.getProperty(SSL_PROXY_HOST_PROPERTY);
if (lbProxyHostProperty != null) {
lbProxyHost = lbProxyHostProperty.getValue();
Property lbProxyPortProperty = lb.getProperty(SSL_PROXY_PORT_PROPERTY);
if (lbProxyPortProperty != null) {
lbProxyPort = lbProxyPortProperty.getValue();
}
}
boolean isSec = true;
Property isSecProperty = lb.getProperty(IS_SECURE_PROPERTY);
if (isSecProperty != null) {
isSec = Boolean.getBoolean(isSecProperty.getValue());
}
_connectionManager = new ConnectionManager(lbHost, lbPort, lbProxyHost, lbProxyPort, lbName, isSec);
if (ping != null && Boolean.valueOf(ping).booleanValue()) {
ping(_connectionManager);
} else {
publish(_connectionManager, domain, lb.getLbConfigName());
}
}
Aggregations