Package org.wiztools.restclient

Examples of org.wiztools.restclient.ProxyConfig.acquire()


        String username = jtf_username.getText();
        char[] password = jpf_password.getPassword();
       
        // Setting proxy object
        ProxyConfig proxy = ProxyConfig.getInstance();
        proxy.acquire();
        if(enabled){
            proxy.setEnabled(true);
            proxy.setHost(host);
            proxy.setPort(port);
           
View Full Code Here


    }
   
    private void setUIFromCache(){
        ProxyConfig proxy = ProxyConfig.getInstance();
       
        proxy.acquire();
        jcb_enable.setSelected(proxy.isEnabled());
        jtf_host.setText(proxy.getHost());
        jtf_port.setText("" + proxy.getPort());
        jcb_auth_enable.setSelected(proxy.isAuthEnabled());
        jtf_username.setText(proxy.getUsername());
View Full Code Here

    @Override
    public void initOptions() {
        IGlobalOptions options = Implementation.of(IGlobalOptions.class);
        ProxyConfig proxy = ProxyConfig.getInstance();
       
        proxy.acquire();
        try{
            proxy.setEnabled(Boolean.valueOf(options.getProperty(PROP_PREFIX + "is_enabled")));
            proxy.setHost(options.getProperty(PROP_PREFIX + "host"));
            proxy.setPort(Integer.parseInt(options.getProperty(PROP_PREFIX + "port")));
            proxy.setAuthEnabled(Boolean.valueOf(options.getProperty(PROP_PREFIX + "is_auth_enabled")));
View Full Code Here

    @Override
    public void shutdownOptions() {
        IGlobalOptions options = Implementation.of(IGlobalOptions.class);
        ProxyConfig proxy = ProxyConfig.getInstance();
       
        proxy.acquire();
        options.setProperty(PROP_PREFIX + "is_enabled", String.valueOf(proxy.isEnabled()));
        options.setProperty(PROP_PREFIX + "host", proxy.getHost());
        options.setProperty(PROP_PREFIX + "port", String.valueOf(proxy.getPort()));
        options.setProperty(PROP_PREFIX + "is_auth_enabled", String.valueOf(proxy.isAuthEnabled()));
        options.setProperty(PROP_PREFIX + "username", proxy.getUsername());
View Full Code Here

        String username = jtf_username.getText();
        char[] password = jpf_password.getPassword();
       
        // Setting proxy object
        ProxyConfig proxy = ProxyConfig.getInstance();
        proxy.acquire();
        if(enabled){
            proxy.setEnabled(true);
            proxy.setHost(host);
            proxy.setPort(port);
           
View Full Code Here

    }
   
    private void setUIFromCache(){
        ProxyConfig proxy = ProxyConfig.getInstance();
       
        proxy.acquire();
        jcb_enable.setSelected(proxy.isEnabled());
        jtf_host.setText(proxy.getHost());
        jtf_port.setText("" + proxy.getPort());
        jcb_auth_enable.setSelected(proxy.isAuthEnabled());
        jtf_username.setText(proxy.getUsername());
View Full Code Here

    @Override
    public void initOptions() {
        ProxyConfig proxy = ProxyConfig.getInstance();
       
        proxy.acquire();
        setUIFromCache();
        proxy.release();
    }

    @Override
View Full Code Here

    @Override
    public void shutdownOptions() {
        ProxyConfig proxy = ProxyConfig.getInstance();
       
        proxy.acquire();
        proxy.write();
        proxy.release();
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.