Package com.adito.webforwards

Examples of com.adito.webforwards.ReplacementProxyWebForward


        this.destinationURL = webForward.getDestinationURL();
        this.category = webForward.getCategory();
        this.autoStart = webForward.isAutoStart();
       
        if (this.type == WebForward.TYPE_REPLACEMENT_PROXY) {
            ReplacementProxyWebForward spwf = (ReplacementProxyWebForward) webForward;
            this.restrictToHosts = spwf.getRestrictToHosts();
            this.encoding = spwf.getEncoding();
            this.authenticationUsername = spwf.getAuthenticationUsername();
            this.authenticationPassword = spwf.getAuthenticationPassword();
            this.preferredAuthenticationScheme = spwf.getPreferredAuthenticationScheme();
            this.formParameters = spwf.getFormParameters();
            this.formType = spwf.getFormType();
        } else if (this.type == WebForward.TYPE_PATH_BASED_REVERSE_PROXY || this.type == WebForward.TYPE_HOST_BASED_REVERSE_PROXY) {
            ReverseProxyWebForward rpwf = (ReverseProxyWebForward) webForward;
            this.paths = rpwf.getPaths();
            this.activeDNS = rpwf.getActiveDNS();
            this.customHeaders = rpwf.getCustomHeaders();
View Full Code Here


          throws Exception {
    // Setup the Replacement proxy
    LaunchSession launchSession = LaunchSessionFactory.getInstance()
            .getLaunchSession(request.getParameter(LaunchSession.LAUNCH_ID));
    launchSession.checkAccessRights(null, getSessionInfo(request));
    ReplacementProxyWebForward f = (ReplacementProxyWebForward) launchSession.getResource();

    VariableReplacement r = new VariableReplacement();
    r.setServletRequest(request);
    r.setLaunchSession(launchSession);
    String destinationURL = r.replace(f.getDestinationURL());

    CoreEvent evt = new ResourceAccessEvent(this,
                        WebForwardEventConstants.WEB_FORWARD_STARTED,
            f,
            launchSession.getPolicy(),
            this.getSessionInfo(request),
            CoreEvent.STATE_SUCCESSFUL).addAttribute(WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_TYPE,
      ((WebForwardTypeItem) WebForwardTypes.WEB_FORWARD_TYPES.get(f.getType())).getName())
            .addAttribute(WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_URL, destinationURL);

    CoreServlet.getServlet().fireCoreEvent(evt);

    response.sendRedirect("/replacementProxyEngine?" + LaunchSession.LONG_LAUNCH_ID
View Full Code Here

TOP

Related Classes of com.adito.webforwards.ReplacementProxyWebForward

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.