Package com.sun.grizzly.config

Examples of com.sun.grizzly.config.ContextRootInfo


                    _logger.log(Level.FINE, "", e);
                }
            }

            if (md.context != null && md.context instanceof ContextRootInfo) {
                ContextRootInfo r = (ContextRootInfo) md.context;
                if (!(r.getAdapter() instanceof ContainerMapper)) {
                    new BindException("Port " + port + " is already used by Container: "
                            + r.getAdapter() +
                            " and will not get started.").printStackTrace();
                    return null;
                }
            }
        }
View Full Code Here


                    _logger.log(Level.FINE, "", e);
                }
            }

            if (md.context != null && md.context instanceof ContextRootInfo) {
                ContextRootInfo r = (ContextRootInfo) md.context;
                if (!(r.getAdapter() instanceof ContainerMapper)) {
                    new BindException("Port " + port + " is already used by Container: "
                            + r.getAdapter() +
                            " and will not get started.").printStackTrace();
                    return null;
                }
            }
        }
View Full Code Here

                    _logger.log(Level.FINE, "", e);
                }
            }

            if (md.context != null && md.context instanceof ContextRootInfo) {
                ContextRootInfo r = (ContextRootInfo) md.context;
                if (!(r.getAdapter() instanceof ContainerMapper)) {
                    new BindException("Port " + port + " is already used by Container: "
                            + r.getAdapter() +
                            " and will not get started.").printStackTrace();
                    return null;
                }
            }
        }
View Full Code Here

     */
    protected synchronized void configureMapper() {
        mapper.setDefaultHostName(defaultHostName);
        mapper.addHost(defaultHostName,new String[]{},null);
        mapper.addContext(defaultHostName,ROOT,
                new ContextRootInfo(this,null),
                new String[]{"index.html","index.htm"},null);
        // Container deployed have the right to override the default setting.
        Mapper.setAllowReplacement(true);
    }
View Full Code Here

            if (adapter == null || adapter instanceof ContainerMapper) {
                super.service(req, res);
            } else {
                req.setNote(MAPPED_ADAPTER, adapter);

                ContextRootInfo contextRootInfo = null;
                if (mappingData.context != null && mappingData.context instanceof ContextRootInfo) {
                    contextRootInfo = (ContextRootInfo) mappingData.context;
                }

                if (contextRootInfo == null){
                    adapter.service(req, res);
                } else {
                    ClassLoader cl = null;
                    if (contextRootInfo.getContainer() instanceof ApplicationContainer){
                        cl = ((ApplicationContainer)contextRootInfo.getContainer()).getClassLoader();
                    }
                    hk2Dispatcher.dispath(adapter, cl, req, res);
                }
            }
        } catch (Exception ex) {
View Full Code Here

               
                Adapter adapter = this;
                if (match) {
                    adapter = grizzlyService.habitat.getComponent(SnifferAdapter.class);
                    ((SnifferAdapter)adapter).initialize(sniffer, this);
                    ContextRootInfo c= new ContextRootInfo(adapter, null);
  
                    for (String pattern : sniffer.getURLPatterns()) {
                        for (String host: grizzlyService.hosts ){
                            mapper.addWrapper(host,ROOT, pattern,c,
                                "*.jsp".equals(pattern) || "*.jspx".equals(pattern));
 
View Full Code Here

            mappingData = (MappingData) req.getNote(MAPPING_DATA);
        }
        // Map the request to its Adapter/Container and also it's Servlet if
        // the request is targetted to the CoyoteAdapter.
        mapper.map(req.serverName(), decodedURI, mappingData);
        ContextRootInfo contextRootInfo = null;
        if (mappingData.context != null && (mappingData.context instanceof ContextRootInfo
                || mappingData.wrapper instanceof ContextRootInfo )) {
            if (mappingData.wrapper != null) {
                contextRootInfo = (ContextRootInfo) mappingData.wrapper;
            } else {
                contextRootInfo = (ContextRootInfo) mappingData.context;
            }
            return contextRootInfo.getAdapter();
        } else if (mappingData.context != null && mappingData.context.getClass()
            .getName().equals("com.sun.enterprise.web.WebModule")) {
            return ((V3Mapper) mapper).getAdapter();
        }
        return null;
View Full Code Here

        }

        mapMultipleAdapter = true;
        String ctx = getContextPath(contextRoot);
        String wrapper = getWrapperPath(ctx, contextRoot);
        ContextRootInfo c = new ContextRootInfo(adapter, container);
        for (String host : vs) {
            mapper.addContext(host, contextRoot,
                c, new String[0], null);
            if (adapter instanceof StaticResourcesAdapter){
                mapper.addWrapper(host,ctx,wrapper,c);
View Full Code Here

TOP

Related Classes of com.sun.grizzly.config.ContextRootInfo

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.