Package org.fao.geonet.utils

Examples of org.fao.geonet.utils.ProxyInfo


      throw new OperationAbortedEx("Parameters saved but cannot restart Lucene Index Optimizer: "+e.getMessage());
    }

        try {
        // Load proxy information into Jeeves
        ProxyInfo pi = JeevesProxyInfo.getInstance();
        boolean useProxy = settingMan.getValueAsBool(SettingManager.SYSTEM_PROXY_USE, false);
        if (useProxy) {
          String  proxyHost      = settingMan.getValue(SettingManager.SYSTEM_PROXY_HOST);
          String  proxyPort      = settingMan.getValue(SettingManager.SYSTEM_PROXY_PORT);
          String  username       = settingMan.getValue(SettingManager.SYSTEM_PROXY_USERNAME);
          String  password       = settingMan.getValue(SettingManager.SYSTEM_PROXY_PASSWORD);
          pi.setProxyInfo(proxyHost, Integer.valueOf(proxyPort), username, password);
        }
      } catch (Exception e) {
            e.printStackTrace();
            throw new OperationAbortedEx("Parameters saved but cannot set proxy information: " + e.getMessage());
        }
View Full Code Here


        metadataNotifierControl = new MetadataNotifierControl(context);
        metadataNotifierControl.runOnce();

        //--- load proxy information from settings into Jeeves for observers such
        //--- as jeeves.utils.XmlResolver to use
        ProxyInfo pi = JeevesProxyInfo.getInstance();
        boolean useProxy = settingMan.getValueAsBool("system/proxy/use", false);
        if (useProxy) {
            String proxyHost = settingMan.getValue("system/proxy/host");
            String proxyPort = settingMan.getValue("system/proxy/port");
            String username = settingMan.getValue("system/proxy/username");
            String password = settingMan.getValue("system/proxy/password");
            pi.setProxyInfo(proxyHost, Integer.valueOf(proxyPort), username, password);
        }

        //
        // db heartbeat configuration -- for failover to readonly database
        //
View Full Code Here

  //---------------------------------------------------------------------------

  public synchronized static ProxyInfo getInstance() {
 
    if (proxyInfo == null) {
      proxyInfo = new ProxyInfo();
      // NOTE: Add new classes that observe ProxyInfo here
      proxyInfo.addObserver(ResolverWrapper.getInstance());
    }
    return proxyInfo;
  }
View Full Code Here

TOP

Related Classes of org.fao.geonet.utils.ProxyInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.