use of lucee.runtime.config.RemoteClientImpl in project Lucee by lucee.
the class Admin method doVerifyRemoteClient.
private void doVerifyRemoteClient() throws PageException {
// SNSN
/*
* SerialNumber sn = config.getSerialNumber(); if(sn.getVersion()==SerialNumber.VERSION_COMMUNITY) throw new
* SecurityException("can not verify remote client with "+sn.getStringVersion()+" version of Lucee");
*/
ProxyData pd = null;
String proxyServer = getString("proxyServer", null);
if (!StringUtil.isEmpty(proxyServer)) {
String proxyUsername = getString("proxyUsername", null);
String proxyPassword = getString("proxyPassword", null);
int proxyPort = getInt("proxyPort", -1);
pd = new ProxyDataImpl();
pd.setServer(proxyServer);
if (!StringUtil.isEmpty(proxyUsername))
pd.setUsername(proxyUsername);
if (!StringUtil.isEmpty(proxyPassword))
pd.setPassword(proxyPassword);
if (proxyPort != -1)
pd.setPort(proxyPort);
}
RemoteClient client = new RemoteClientImpl(getString("admin", action, "label"), type == TYPE_WEB ? "web" : "server", getString("admin", action, "url"), getString("serverUsername", null), getString("serverPassword", null), getString("admin", action, "adminPassword"), pd, getString("admin", action, "securityKey"), getString("admin", action, "usage"));
Struct attrColl = new StructImpl();
attrColl.setEL("action", "connect");
try {
new RemoteClientTask(null, client, attrColl, getCallerId(), "synchronisation").execute(config);
} catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
throw Caster.toPageException(t);
}
}
Aggregations