Package org.apache.catalina

Examples of org.apache.catalina.Engine.findChildren()


  private void check() {
    final StandardServer server = TomcatHelper.getServer();
    for (final Service service : server.findServices()) {
      if (service.getContainer() instanceof Engine) {
        final Engine engine = (Engine) service.getContainer();
        for (final Container engineChild : engine.findChildren()) {
          if (engineChild instanceof StandardHost) {
            final StandardHost host = (StandardHost) engineChild;
            webappBuilder.checkHost(host);
          }
        }
View Full Code Here


        findDefaultHost();

        Engine engine = (Engine) connector.getService().getContainer();
        addListeners(engine);

        Container[] conHosts = engine.findChildren();
        for (Container conHost : conHosts) {
            Host host = (Host) conHost;
            if (!LifecycleState.NEW.equals(host.getState())) {
                // Registering the host will register the context and wrappers
                registerHost(host);
View Full Code Here

        String defaultHost = engine.getDefaultHost();

        boolean found = false;

        if (defaultHost != null && defaultHost.length() >0) {
            Container[] containers = engine.findChildren();

            for (Container container : containers) {
                Host host = (Host) container;
                if (defaultHost.equalsIgnoreCase(host.getName())) {
                    found = true;
View Full Code Here

        findDefaultHost();

        Engine engine = (Engine) service.getContainer();
        addListeners(engine);

        Container[] conHosts = engine.findChildren();
        for (Container conHost : conHosts) {
            Host host = (Host) conHost;
            if (!LifecycleState.NEW.equals(host.getState())) {
                // Registering the host will register the context and wrappers
                registerHost(host);
View Full Code Here

        String defaultHost = engine.getDefaultHost();

        boolean found = false;

        if (defaultHost != null && defaultHost.length() >0) {
            Container[] containers = engine.findChildren();

            for (Container container : containers) {
                Host host = (Host) container;
                if (defaultHost.equalsIgnoreCase(host.getName())) {
                    found = true;
View Full Code Here

                manageCluster(engine.getCluster());
                defaultHost = engine.getDefaultHost();
                addTomEERealm(engine);

                for (final Container engineChild : engine.findChildren()) {
                    if (engineChild instanceof StandardHost) {
                        final StandardHost host = (StandardHost) engineChild;
                        manageCluster(host.getCluster());
                        addTomEERealm(host);
                        hosts.put(host.getName(), host);
View Full Code Here

                engine.addContainerListener(this);
                ((Lifecycle) engine).addLifecycleListener(this);
                if (engine.getDefaultHost() != null) {
                    mapper.setDefaultHostName(engine.getDefaultHost());
                }
                for (Container host : engine.findChildren()) {
                    host.addContainerListener(this);
                    mapper.addHost(host.getName(), ((Host) host).findAliases(), host);
                    for (Container context : host.findChildren()) {
                        ((Lifecycle) context).addLifecycleListener(this);
                    }
View Full Code Here

            } else if (source instanceof Service) {
                Service service = (Service) source;
                Engine engine = (Engine) service.getContainer();
                engine.removeContainerListener(this);
                ((Lifecycle) engine).removeLifecycleListener(this);
                for (Container host : engine.findChildren()) {
                    host.removeContainerListener(this);
                    mapper.removeHost(host.getName());
                    for (Container context : host.findChildren()) {
                        ((Lifecycle) context).removeLifecycleListener(this);
                        mapper.removeContext(host.getName(), context.getName());
View Full Code Here

                manageCluster(engine.getCluster());
                defaultHost = engine.getDefaultHost();
                addTomEERealm(engine);

                for (final Container engineChild : engine.findChildren()) {
                    if (engineChild instanceof StandardHost) {
                        final StandardHost host = (StandardHost) engineChild;
                        manageCluster(host.getCluster());
                        addTomEERealm(host);
                        hosts.put(host.getName(), host);
View Full Code Here

     */
    private void processRunningApplications(TomcatWebAppBuilder tomcatWebAppBuilder, StandardServer standardServer) {
        for (org.apache.catalina.Service service : standardServer.findServices()) {
            if (service.getContainer() instanceof Engine) {
                Engine engine = (Engine) service.getContainer();
                for (Container engineChild : engine.findChildren()) {
                    if (engineChild instanceof Host) {
                        Host host = (Host) engineChild;
                        for (Container hostChild : host.findChildren()) {
                            if (hostChild instanceof StandardContext) {
                                StandardContext standardContext = (StandardContext) hostChild;
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.