Package com.subgraph.vega.api.http.proxy

Examples of com.subgraph.vega.api.http.proxy.IHttpProxyListenerConfig


      }
    }

    // create listeners for any new addresses
    for (int idx = 0; idx < listenerConfigs.length; idx++) {
      final IHttpProxyListenerConfig config = listenerConfigs[idx];
      final String key = config.toString();
      if (listenerConfigMap.get(key) == null) {
        listenerConfigMap.put(key, config);
        if (isRunning != false) {
          startListener(config);
        }
View Full Code Here


    listenerList.clear();
    if (prefListeners != null) {
      final String[] listeners = prefListeners.split(SEPARATOR_LISTENER);
      for (int listenerIdx = 0; listenerIdx < listeners.length; listenerIdx++) {
        final String[] listenerInfo = listeners[listenerIdx].split(SEPARATOR_ADDRESS_PORT);
        IHttpProxyListenerConfig listenerConfig;
        try {
          listenerConfig = Activator.getDefault().getProxyService().createListenerConfig();
          InetAddress inetAddress = InetAddress.getByName(listenerInfo[0].substring(1, listenerInfo[0].length() - 1));
          listenerConfig.setInetAddress(inetAddress);
          listenerConfig.setPort(Integer.parseInt(listenerInfo[1]));
          listenerList.add(listenerConfig);
        } catch (Exception e) {
          // REVISIT: should log this
          continue;
        }
View Full Code Here

  }

  private String getPreferencesString() {
    final StringBuilder sb = new StringBuilder();
    for (int idx = 0; idx < listenerList.size(); idx++) {
      IHttpProxyListenerConfig listenerConfig = listenerList.get(idx);
      if (idx != 0) {
        sb.append(SEPARATOR_LISTENER);
      }
      sb.append("[");
      sb.append(listenerConfig.getInetAddress().getHostAddress());
      sb.append("]");
      sb.append(SEPARATOR_ADDRESS_PORT);
      sb.append(Integer.toString(listenerConfig.getPort()));
    }
    return sb.toString();
  }
View Full Code Here

   
    return rootControl;
  }
 
  public IHttpProxyListenerConfig getConfig() {
    final IHttpProxyListenerConfig listenerConfig = Activator.getDefault().getProxyService().createListenerConfig();
    listenerConfig.setInetAddress(inetAddress);
    listenerConfig.setPort(portNum);
    return listenerConfig;
  }
View Full Code Here

TOP

Related Classes of com.subgraph.vega.api.http.proxy.IHttpProxyListenerConfig

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.