Examples of HttpContext


Examples of org.jboss.arquillian.spi.client.protocol.metadata.HTTPContext

        return xpath.evaluate("/map/entry[@key = 'message']/@value", new InputSource(new StringReader(xmlResponse)));
    }

    private ProtocolMetaData parseForProtocolMetaData(String xmlResponse) throws XPathExpressionException {
        final ProtocolMetaData protocolMetaData = new ProtocolMetaData();
        final HTTPContext httpContext = new HTTPContext(this.configuration.getRemoteServerAddress(),
                this.configuration.getRemoteServerHttpPort());

        final XPath xpath = XPathFactory.newInstance().newXPath();

        NodeList servlets = (NodeList) xpath.evaluate("/map/entry[@key = 'properties']/map/entry[@value = 'Servlet']",
                new InputSource(new StringReader(xmlResponse)), XPathConstants.NODESET);

        for (int i = 0; i < servlets.getLength(); i++) {
            httpContext.add(new Servlet(servlets.item(i).getAttributes().getNamedItem("key").getNodeValue(), this.deploymentName));
        }

        protocolMetaData.addContext(httpContext);
        return protocolMetaData;
    }
View Full Code Here

Examples of org.jboss.com.sun.net.httpserver.HttpContext

    }

    public void start(HttpServer httpServer, SecurityRealm securityRealm) {
        // The SubjectAssociationHandler wraps all calls to this HttpHandler to ensure the Subject has been associated
        // with the security context.
        HttpContext context = httpServer.createContext(DOMAIN_API_CONTEXT, new SubjectAssociationHandler(this));
        // Once there is a trust store we can no longer rely on users being defined so skip
        // any redirects.
        if (authenticator != null) {
            context.setAuthenticator(authenticator);
            List<Filter> filters = context.getFilters();
            if (securityRealm.hasTrustStore() == false) {
                DomainCallbackHandler callbackHandler = securityRealm.getCallbackHandler();
                filters.add(new RealmReadinessFilter(callbackHandler, ErrorHandler.getRealmRedirect()));
            }
        }
View Full Code Here

Examples of org.jboss.identity.federation.web.core.HTTPContext

            SAML2HandlerResponse response ) throws ProcessingException
      {
         //Handler a log out response from IDP
         StatusResponseType statusResponseType = (StatusResponseType) request.getSAML2Object();
        
         HTTPContext httpContext = (HTTPContext) request.getContext();
         HttpServletRequest servletRequest = httpContext.getRequest();
         HttpSession session = servletRequest.getSession(false);
        
         //TODO: Deal with partial logout report
        
         StatusType statusType = statusResponseType.getStatus();
View Full Code Here

Examples of org.jboss.wsf.spi.http.HttpContext

   /** Create an HTTP context */
   public HttpContext createContext(String contextRoot)
   {
      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      HttpContext httpContext = spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
      return httpContext;
   }
View Full Code Here

Examples of org.mortbay.http.HttpContext

            servletMap = lpath.substring(idx);
        }
        final String smap = servletMap;
       
       
        HttpContext context = server.getContext(contextName);
        try {
            context.start();
        } catch (Exception e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

        if ("".equals(smap) && "".equals(contextName)) {
            handler.setName("/");
        } else {
            handler.setName(smap);
        }
        context.addHandler(handler);
        try {
            handler.start();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
View Full Code Here

Examples of org.mortbay.http.HttpContext

        }

        boolean found = false;
        // REVISIT: how come server can be null?
        if (server != null) {
            HttpContext context = server.getContext(contextName);
            for (HttpHandler handler : context.getHandlers()) {
                if (servletMap.equals(handler.getName())) {
                    try {
                        handler.stop();
                    } catch (InterruptedException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    context.removeHandler(handler);
                    found = true;
                }
            }
        }
        if (!found) {
View Full Code Here

Examples of org.mortbay.http.HttpContext

        }
       
        HttpHandler ret = null;
        // REVISIT: how come server can be null?
        if (server != null) {
            HttpContext context = server.getContext(contextName);
            for (HttpHandler handler : context.getHandlers()) {
                if (servletMap.equals(handler.getName())) {
                    ret = handler;
                    break;
                }
            }
View Full Code Here

Examples of org.mortbay.http.HttpContext

        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
       
        HttpContext context = server.getContext("http://localhost:27220/test");
        endpoint.publish(context);
        assertTrue(endpoint.isPublished());
       
        listener.stop();
        server.stop(true);
View Full Code Here

Examples of org.mortbay.http.HttpContext

            listener.setPoolName("P2");
            insecureServer.addListener(listener);
        }
       
        // Create the webapp
        HttpContext context = new HttpContext();
        context.setContextPath("/");
        context.setResourceBase("./dummy/");
        context.addHandler(new HTTPRedirectHandler());
        insecureServer.addContext(context);

        // Configure the server
        insecureServer.setRequestsPerGC(2000);
View Full Code Here

Examples of org.mortbay.http.HttpContext

     * @see com.adito.boot.Context#addWebApp(java.lang.String,
     *      java.lang.String)
     */
    public void addWebApp(String path, String warFile) throws Exception {
        log.info("Adding webapp '" + path + "' using path / war '" + warFile + "'");
        HttpContext context = server.addWebApplication(path, warFile);
        context.start();
    }
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.