Tabnine Logo
ProxySettings.setEnabled
Code IndexAdd Tabnine to your IDE (free)

How to use
setEnabled
method
in
uk.gov.nationalarchives.droid.core.interfaces.signature.ProxySettings

Best Java code snippets using uk.gov.nationalarchives.droid.core.interfaces.signature.ProxySettings.setEnabled (Showing top 4 results out of 315)

origin: digital-preservation/droid

/**
 * {@inheritDoc}
 */
@Override
public void configurationChanged(ConfigurationEvent event) {
  final String propertyName = event.getPropertyName();
  if (propertyName.startsWith("update.proxy")) {
    DroidGlobalProperty property = DroidGlobalProperty.forName(propertyName);
    switch (property) {
      case UPDATE_PROXY_HOST: 
        setProxyHost((String) event.getPropertyValue());
        break;
      case UPDATE_PROXY_PORT:
        setProxyPort((Integer) event.getPropertyValue());
        break;
      case UPDATE_USE_PROXY:
        setEnabled((Boolean) event.getPropertyValue());
        break;
      default:
        log.error(String.format("Invalid proxy setting [%s]", propertyName));
    }
    
    notifyProxySubscribers();
  }            
}
 
origin: digital-preservation/droid

/**
 * Initailisation post-construct.
 */
public void init() {
  config.getProperties().addConfigurationListener(proxySettings);
  Configuration configuration = config.getProperties();
  
  proxySettings = new ProxySettings();
  proxySettings.setEnabled(configuration.getBoolean(DroidGlobalProperty.UPDATE_USE_PROXY.getName()));
  proxySettings.setProxyHost(configuration.getString(DroidGlobalProperty.UPDATE_PROXY_HOST.getName()));
  proxySettings.setProxyPort(configuration.getInt(DroidGlobalProperty.UPDATE_PROXY_PORT.getName()));
  proxySettings.setEnabled(configuration.getBoolean(DroidGlobalProperty.UPDATE_USE_PROXY.getName()));
  
  config.getProperties().addConfigurationListener(proxySettings);
  
  for (SignatureUpdateService subscriber : signatureUpdateServices.values()) {
    subscriber.init(config);
    proxySettings.addProxySubscriber(subscriber);
    config.getProperties().addConfigurationListener(subscriber);
  }
  
  proxySettings.notifyProxySubscribers();
}
 
origin: uk.gov.nationalarchives/droid-core-interfaces

/**
 * {@inheritDoc}
 */
@Override
public void configurationChanged(ConfigurationEvent event) {
  final String propertyName = event.getPropertyName();
  if (propertyName.startsWith("update.proxy")) {
    DroidGlobalProperty property = DroidGlobalProperty.forName(propertyName);
    switch (property) {
      case UPDATE_PROXY_HOST: 
        setProxyHost((String) event.getPropertyValue());
        break;
      case UPDATE_PROXY_PORT:
        setProxyPort((Integer) event.getPropertyValue());
        break;
      case UPDATE_USE_PROXY:
        setEnabled((Boolean) event.getPropertyValue());
        break;
      default:
        log.error(String.format("Invalid proxy setting [%s]", propertyName));
    }
    
    notifyProxySubscribers();
  }            
}
 
origin: uk.gov.nationalarchives/droid-results

/**
 * Initailisation post-construct.
 */
public void init() {
  config.getProperties().addConfigurationListener(proxySettings);
  Configuration configuration = config.getProperties();
  
  proxySettings = new ProxySettings();
  proxySettings.setEnabled(configuration.getBoolean(DroidGlobalProperty.UPDATE_USE_PROXY.getName()));
  proxySettings.setProxyHost(configuration.getString(DroidGlobalProperty.UPDATE_PROXY_HOST.getName()));
  proxySettings.setProxyPort(configuration.getInt(DroidGlobalProperty.UPDATE_PROXY_PORT.getName()));
  proxySettings.setEnabled(configuration.getBoolean(DroidGlobalProperty.UPDATE_USE_PROXY.getName()));
  
  config.getProperties().addConfigurationListener(proxySettings);
  
  for (SignatureUpdateService subscriber : signatureUpdateServices.values()) {
    subscriber.init(config);
    proxySettings.addProxySubscriber(subscriber);
    config.getProperties().addConfigurationListener(subscriber);
  }
  
  proxySettings.notifyProxySubscribers();
}
 
uk.gov.nationalarchives.droid.core.interfaces.signatureProxySettingssetEnabled

Popular methods of ProxySettings

  • <init>
  • getProxyHost
  • getProxyPort
  • isEnabled
  • notifyProxySubscribers
    Notifies all proxy subscribers of a proxy setting change.
  • setProxyHost
  • setProxyPort
  • addProxySubscriber
    Adds a service that subscribes to these proxy settings.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • getApplicationContext (Context)
  • startActivity (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now