Search in sources :

Example 1 with RemoteClientTask

use of lucee.runtime.spooler.remote.RemoteClientTask 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);
    }
}
Also used : ProxyData(lucee.runtime.net.proxy.ProxyData) StructImpl(lucee.runtime.type.StructImpl) RemoteClientImpl(lucee.runtime.config.RemoteClientImpl) RemoteClient(lucee.runtime.config.RemoteClient) ProxyDataImpl(lucee.runtime.net.proxy.ProxyDataImpl) Struct(lucee.runtime.type.Struct) RemoteClientTask(lucee.runtime.spooler.remote.RemoteClientTask)

Aggregations

RemoteClient (lucee.runtime.config.RemoteClient)1 RemoteClientImpl (lucee.runtime.config.RemoteClientImpl)1 ProxyData (lucee.runtime.net.proxy.ProxyData)1 ProxyDataImpl (lucee.runtime.net.proxy.ProxyDataImpl)1 RemoteClientTask (lucee.runtime.spooler.remote.RemoteClientTask)1 Struct (lucee.runtime.type.Struct)1 StructImpl (lucee.runtime.type.StructImpl)1