Examples of ForwardProxy


Examples of com.alu.e3.data.model.sub.ForwardProxy

  }

  public static final ForwardProxy toDataModel(com.alu.e3.prov.restapi.model.ForwardProxy forwardProxy) {
    if (forwardProxy==null) return null;

    ForwardProxy fp = new ForwardProxy();
    fp.setProxyHost(forwardProxy.getProxyHost());
    fp.setProxyPass(forwardProxy.getProxyPass());
    fp.setProxyPort(forwardProxy.getProxyPort());
    fp.setProxyUser(forwardProxy.getProxyUser());

    return fp;   
  }
View Full Code Here

Examples of com.alu.e3.data.model.sub.ForwardProxy

 
  @Test
  public void localProxySet() {
    Api api = newApi(null);
   
    ForwardProxy localProxy = new ForwardProxy();
    localProxy.setProxyHost("host1");
    localProxy.setProxyPass("pass1");
    localProxy.setProxyPort("port1");
    localProxy.setProxyUser("user1");
    api.setForwardProxy(localProxy);
   
    dataManager.addApi(api);
    targetHostManager.registerAPI(api.getId());
   
View Full Code Here

Examples of com.alu.e3.data.model.sub.ForwardProxy

        if (LOG.isDebugEnabled())
          LOG.debug("Proxy password was not set");
        return;
      }
     
      ForwardProxy proxy = new ForwardProxy();
      proxy.setProxyHost(proxyHost);
      proxy.setProxyPort(proxyPort);
      proxy.setProxyUser(proxyUser);
      proxy.setProxyPass(proxyPass);
     
      dataManager.putSettingString(E3Constant.GLOBAL_PROXY_SETTINGS, proxy.serialize());
    }
  }
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.ForwardProxy

  protected final Action newSetAction() {
    return new Action() {

      @Override
      protected Object doAction(Object... params) {
        ForwardProxy proxy = (ForwardProxy) params[0];

        if(proxy == null) {
        }       
                       
        dataManager.putSettingString(E3Constant.GLOBAL_PROXY_SETTINGS, BeanConverterUtil.toDataModel(proxy).serialize());
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.ForwardProxy

      @Override
      protected Object doAction(Object... params) {       

        ProxyResponse response = new ProxyResponse(BasicResponse.SUCCESS);
        String serializedProxy = dataManager.getSettingString(E3Constant.GLOBAL_PROXY_SETTINGS);
        ForwardProxy proxy = null;
        if (serializedProxy != null) {
          proxy = BeanConverterUtil.fromDataModel(com.alu.e3.data.model.sub.ForwardProxy.deserialize(serializedProxy));
        }
        if (proxy == null) {
          proxy = new ForwardProxy();
        }
        response.setProxy(proxy);
        return response;
      }
    };
View Full Code Here

Examples of org.megatome.frame2.front.ForwardProxy

    EventConfigReader reader = getReader("org/megatome/frame2/front/config/globalForward-Single-config.xml"); //$NON-NLS-1$

    Map<String, Forward> forwards = reader.getGlobalHTMLForwards();
    assertTrue(forwards.size() == 1);
    Forward forward = forwards.get(name);
    ForwardProxy proxy = new ForwardProxy(forward);
    assertTrue(proxy.isEventType());
    assertEquals(forward.getName(), name);
    assertEquals(forward.getType(), ForwardType.EVENT);
    assertEquals(forward.getPath(), path);

  }
View Full Code Here

Examples of org.megatome.frame2.front.ForwardProxy

    Map<String, Forward> forwards = reader.getGlobalHTMLForwards();
    assertTrue(forwards.size() == 3);

    Forward forward = forwards.get("xx1"); //$NON-NLS-1$
    ForwardProxy proxy = new ForwardProxy(forward);
    assertFalse(proxy.isEventType());
    assertEquals(forward.getName(), "xx1"); //$NON-NLS-1$
    assertEquals(forward.getType(), ForwardType.HTMLRESOURCE);
    assertEquals(forward.getPath(), "xxxpath1"); //$NON-NLS-1$

    forward = forwards.get("xx2"); //$NON-NLS-1$
    proxy = new ForwardProxy(forward);
    assertTrue(proxy.isEventType());
    assertEquals(forward.getName(), "xx2"); //$NON-NLS-1$
    assertEquals(forward.getType(), ForwardType.EVENT);
    assertEquals(forward.getPath(), "xxxpath2"); //$NON-NLS-1$

    forward = forwards.get("xx3"); //$NON-NLS-1$
    proxy = new ForwardProxy(forward);
    assertFalse(proxy.isEventType());
    assertEquals(forward.getName(), "xx3"); //$NON-NLS-1$
    assertEquals(forward.getType(), ForwardType.HTMLRESOURCE);
    assertEquals(forward.getPath(), "xxxpath3"); //$NON-NLS-1$

  }
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.