Package org.apache.catalina

Examples of org.apache.catalina.Host


                context.destroy();
                context.stop();
            } catch (Exception e) {
                throw new TomEERuntimeException(e);
            }
            Host host = (Host) context.getParent();
            host.removeChild(context);
        } // else let tomcat manages its context
    }
View Full Code Here


            context.stop();
            context.destroy();
        } catch (Exception e) {
            throw new TomEERuntimeException(e);
        }
        Host host = (Host) context.getParent();
        host.removeChild(context);

        return listeners.remove(completePath);
    }
View Full Code Here

    private Mapper mapper;

    private HashMap<String, Host> hostMap = new HashMap<>();

    private synchronized Host createHost(String name) {
        Host host = hostMap.get(name);
        if (host == null) {
            host = new StandardHost();
            host.setName(name);
            hostMap.put(name, host);
        }
        return host;
    }
View Full Code Here

        String[] welcomes = new String[2];
        welcomes[0] = "boo/baba";
        welcomes[1] = "bobou";

        Host host = createHost("blah7");
        mapper.addContextVersion("iowejoiejfoiew", host, "",
                "0", createContext("context0"), new String[0], null, null);
        mapper.addContextVersion("iowejoiejfoiew", host, "/foo",
                "0", createContext("context1"), new String[0], null, null);
        mapper.addContextVersion("iowejoiejfoiew", host, "/foo/bar",
View Full Code Here

        assertFalse(host.isAlias());
        assertTrue(alias.isAlias());
        assertEquals(host.object, alias.object);

        // Test addContextVersion() followed by addHost()
        Host hostZ = createHost("zzzz");
        Context contextZ = createContext("contextZ");

        assertEquals(16, mapper.hosts.length);
        mapper.addContextVersion("zzzz", hostZ, "/", "", contextZ, null, null,
                null);
View Full Code Here

        assertEquals(hostName, mappedHost.name);
        Mapper.MappedContext mappedContext = mappedHost.contextList.contexts[contextPos];
        assertEquals(contextPath, mappedContext.name);
        assertEquals(1, mappedContext.versions.length);
        assertEquals("0", mappedContext.versions[0].name);
        Host oldHost = mappedHost.object;
        Context oldContext = mappedContext.versions[0].object;
        assertEquals("context2", oldContext.getName());

        Context oldContext1 = mappedHost.contextList.contexts[contextPos - 1].versions[0].object;
        assertEquals("context1", oldContext1.getName());
View Full Code Here

        assertEquals(hostName, mappedHost.name);
        Mapper.MappedContext mappedContext = mappedHost.contextList.contexts[contextPos];
        assertEquals(contextPath, mappedContext.name);
        assertEquals(1, mappedContext.versions.length);
        assertEquals("0", mappedContext.versions[0].name);
        Host oldHost = mappedHost.object;
        Context oldContext = mappedContext.versions[0].object;
        assertEquals("context2", oldContext.getName());

        Context oldContext1 = mappedHost.contextList.contexts[contextPos - 1].versions[0].object;
        assertEquals("context1", oldContext1.getName());
View Full Code Here

        assertEquals("newDefaultWrapper", mappingData.wrapper.getName());
    }

    @Test
    public void testContextListConcurrencyBug56653() throws Exception {
        final Host host = createHost("localhost");
        final Context contextRoot = createContext("ROOT");
        final Context context1 = createContext("foo");
        final Context context2 = createContext("foo#bar");
        final Context context3 = createContext("foo#bar#bla");
        final Context context4 = createContext("foo#bar#bla#baz");
View Full Code Here

            engine.setCluster((Cluster)clusterGBean.getInternalObject());
        }
    }

    private void removeHost(ObjectRetriever objRetriever) {
        Host host = (Host)objRetriever.getInternalObject();
        engine.removeChild(host);
    }
View Full Code Here

        Host host = (Host)objRetriever.getInternalObject();
        engine.removeChild(host);
    }

    private void addHost(ObjectRetriever objRetriever) {
        Host host = (Host)objRetriever.getInternalObject();

        //If we didn't set a realm, then use the default
        if (host.getRealm() == null) {
            host.setRealm(engine.getRealm());
        }
        engine.addChild(host);
    }
View Full Code Here

TOP

Related Classes of org.apache.catalina.Host

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.