Package org.parosproxy.paros.core.proxy

Examples of org.parosproxy.paros.core.proxy.ProxyParam


       
  }
 
  public void initParam(Object obj) {
      OptionsParam optionsParam = (OptionsParam) obj;
      ProxyParam proxyParam = optionsParam.getProxyParam();
     
      // set Local Proxy parameters
      txtProxyIp.setText(proxyParam.getProxyIp());
      txtProxyPort.setText(Integer.toString(proxyParam.getProxyPort()));
     
      // set reverse proxy param
        txtReverseProxyIp.setText(proxyParam.getReverseProxyIp());
        txtReverseProxyHttpPort.setText(Integer.toString(proxyParam.getReverseProxyHttpPort()));
        txtReverseProxyHttpsPort.setText(Integer.toString(proxyParam.getReverseProxyHttpsPort()));

        chkReverseProxy.setSelected(proxyParam.isUseReverseProxy());
        setReverseProxyEnabled(proxyParam.isUseReverseProxy());
  }
View Full Code Here


  }

 
  public void saveParam(Object obj) throws Exception  {
      OptionsParam optionsParam = (OptionsParam) obj;
      ProxyParam proxyParam = optionsParam.getProxyParam();
      int proxyPort = 0;
      int reverseProxyHttpPort = 0;
      int reverseProxyHttpsPort = 0;
     
      try {
          proxyPort = Integer.parseInt(txtProxyPort.getText());
      } catch (NumberFormatException nfe) {
          txtProxyPort.requestFocus();
          throw new Exception("Invalid proxy port number.");
      }

      try {
          reverseProxyHttpPort = Integer.parseInt(txtReverseProxyHttpPort.getText());
      } catch (NumberFormatException nfe) {
          txtReverseProxyHttpPort.requestFocus();
          throw new Exception("Invalid reverse proxy port number.");
      }

      try {
          reverseProxyHttpsPort = Integer.parseInt(txtReverseProxyHttpsPort.getText());
      } catch (NumberFormatException nfe) {
          txtReverseProxyHttpsPort.requestFocus();
          throw new Exception("Invalid reverse proxy port number.");
      }

     
     
      proxyParam.setProxyIp(txtProxyIp.getText());
      proxyParam.setProxyPort(proxyPort);

      proxyParam.setReverseProxyIp(txtReverseProxyIp.getText());
      proxyParam.setReverseProxyHttpPort(reverseProxyHttpPort);
      proxyParam.setReverseProxyHttpsPort(reverseProxyHttpsPort);
      proxyParam.setUseReverseProxy(getChkReverseProxy().isSelected());
     
  }
View Full Code Here

  }

  public void initParam(Object obj) {
    OptionsParam optionsParam = (OptionsParam) obj;
    ProxyParam proxyParam = optionsParam.getProxyParam();

    // Set local proxy parameters
    txtProxyIp.setText(proxyParam.getProxyIp());
    txtProxyPort.setText(Integer.toString(proxyParam.getProxyPort()));

    // Set reverse proxy parameters
    txtReverseProxyIp.setText(proxyParam.getReverseProxyIp());
    txtReverseProxyHttpPort.setText(Integer.toString(proxyParam.getReverseProxyHttpPort()));
    txtReverseProxyHttpsPort.setText(Integer.toString(proxyParam.getReverseProxyHttpsPort()));

    chkReverseProxy.setSelected(proxyParam.isUseReverseProxy());
    setReverseProxyEnabled(proxyParam.isUseReverseProxy());
  }
View Full Code Here

  }

  public void saveParam(Object obj) throws Exception {
    OptionsParam optionsParam = (OptionsParam) obj;
    ProxyParam proxyParam = optionsParam.getProxyParam();
   
    int proxyPort = 0;
    int reverseProxyHttpPort = 0;
    int reverseProxyHttpsPort = 0;

    try {
      proxyPort = Integer.parseInt(txtProxyPort.getText());
    } catch (NumberFormatException nfe) {
      txtProxyPort.requestFocus();
      throw new Exception("Invalid proxy port number.");
    }

    try {
      reverseProxyHttpPort = Integer.parseInt(txtReverseProxyHttpPort.getText());
    } catch (NumberFormatException nfe) {
      txtReverseProxyHttpPort.requestFocus();
      throw new Exception("Invalid reverse proxy port number.");
    }

    try {
      reverseProxyHttpsPort = Integer.parseInt(txtReverseProxyHttpsPort.getText());
    } catch (NumberFormatException nfe) {
      txtReverseProxyHttpsPort.requestFocus();
      throw new Exception("Invalid reverse proxy port number.");
    }

    proxyParam.setProxyIp(txtProxyIp.getText());
    proxyParam.setProxyPort(proxyPort);
    proxyParam.setReverseProxyIp(txtReverseProxyIp.getText());
    proxyParam.setReverseProxyHttpPort(reverseProxyHttpPort);
    proxyParam.setReverseProxyHttpsPort(reverseProxyHttpsPort);
    proxyParam.setUseReverseProxy(getChkReverseProxy().isSelected());

  }
View Full Code Here

TOP

Related Classes of org.parosproxy.paros.core.proxy.ProxyParam

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.