Package org.apache.catalina

Examples of org.apache.catalina.Service


        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        String type = pname.getKeyProperty("type");
        Server server = ServerFactory.getServer();
        Service service = server.findService(pname.getKeyProperty("service"));
        Engine engine = (Engine) service.getContainer();
        if (type.equals("Context")) {
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            String pathStr = getPathStr(pname.getKeyProperty("path"));
            Context context = (Context) host.findChild(pathStr);
            context.setLogger(logger);
View Full Code Here


        realm.setResourceName(resourceName);
        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        String type = pname.getKeyProperty("type");
        Server server = ServerFactory.getServer();
        Service service = server.findService(pname.getKeyProperty("service"));
        Engine engine = (Engine) service.getContainer();
        if (type.equals("Context")) {
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            String pathStr = getPathStr(pname.getKeyProperty("path"));
            Context context = (Context) host.findChild(pathStr);
            context.setRealm(realm);
View Full Code Here

        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        Server server = ServerFactory.getServer();
        String type = pname.getKeyProperty("type");
        Service service = server.findService(pname.getKeyProperty("service"));
        Engine engine = (Engine) service.getContainer();
        if ((type != null) && (type.equals("Context"))) {
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            String pathStr = getPathStr(pname.getKeyProperty("path"));
            Context context = (Context) host.findChild(pathStr);
            context.setLoader(loader);
View Full Code Here

        // Acquire a reference to the component to be removed
        ObjectName oname = new ObjectName(name);
        Server server = ServerFactory.getServer();
        String serviceName = oname.getKeyProperty("service");
        Service service = server.findService(serviceName);
        String port = oname.getKeyProperty("port");
        String address = oname.getKeyProperty("address");
       
        Connector conns[] = (Connector[]) service.findConnectors();

        for (int i = 0; i < conns.length; i++) {
            Class cls = conns[i].getClass();
            Method getAddrMeth = cls.getMethod("getAddress", null);
            Object addrObj = getAddrMeth.invoke(conns[i], null);
            String connAddress = null;
            if (addrObj != null) {
                connAddress = addrObj.toString();
            }
            Method getPortMeth = cls.getMethod("getPort", null);
            Object portObj = getPortMeth.invoke(conns[i], null);
            String connPort = new String();
            if (portObj != null) {
                connPort = portObj.toString();
            }
            if (((address.equals("null")) && (connAddress==null)) && port.equals(connPort)) {
                service.removeConnector(conns[i]);
                break;
            } else if (address.equals(connAddress) && port.equals(connPort)) {
                // Remove this component from its parent component
                service.removeConnector(conns[i]);
                break;
            }
        }

    }
View Full Code Here

        ObjectName oname = new ObjectName(name);
        String serviceName = oname.getKeyProperty("service");
        String hostName = oname.getKeyProperty("host");
        String contextName = getPathStr(oname.getKeyProperty("path"));
        Server server = ServerFactory.getServer();
        Service service = server.findService(serviceName);
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(hostName);
        Context context = (Context) host.findChild(contextName);

        // Remove this component from its parent component
        host.removeChild(context);
View Full Code Here

        // Acquire a reference to the component to be removed
        ObjectName oname = new ObjectName(name);
        String serviceName = oname.getKeyProperty("service");
        String hostName = oname.getKeyProperty("host");
        Server server = ServerFactory.getServer();
        Service service = server.findService(serviceName);
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(hostName);

        // Remove this component from its parent component
        engine.removeChild(host);
View Full Code Here

        String serviceName = oname.getKeyProperty("service");
        String hostName = oname.getKeyProperty("host");
       
        String path = oname.getKeyProperty("path");
        Server server = ServerFactory.getServer();
        Service service = server.findService(serviceName);
        StandardEngine engine = (StandardEngine) service.getContainer();
        if (hostName == null) {             // if logger's container is Engine
            Logger logger = engine.getLogger();
            Container container = logger.getContainer();
            if (container instanceof StandardEngine) {
                String sname =
View Full Code Here

        // Acquire a reference to the component to be removed
        ObjectName oname = new ObjectName(name);
        String type = oname.getKeyProperty("type");
        String serviceName = oname.getKeyProperty("service");
        Server server = ServerFactory.getServer();
        Service service = server.findService(serviceName);
        Engine engine = (Engine) service.getContainer()
        String hostName = oname.getKeyProperty("host");
        if ((type != null) && (type.equals("Loader"))) {     
            String contextName = getPathStr(oname.getKeyProperty("path"));
            Host host = (Host) engine.findChild(hostName);
            Context context = (Context) host.findChild(contextName);
View Full Code Here

        // Acquire a reference to the component to be removed
        ObjectName oname = new ObjectName(name);
        String type = oname.getKeyProperty("type");
        String serviceName = oname.getKeyProperty("service");
        Server server = ServerFactory.getServer();
        Service service = server.findService(serviceName);
        Engine engine = (Engine) service.getContainer()
        String hostName = oname.getKeyProperty("host");
        if ((type != null) && (type.equals("Manager"))) {     
            String contextName = getPathStr(oname.getKeyProperty("path"));
            Host host = (Host) engine.findChild(hostName);
            Context context = (Context) host.findChild(contextName);
View Full Code Here

        ObjectName oname = new ObjectName(name);
        String serviceName = oname.getKeyProperty("service");
        String hostName = oname.getKeyProperty("host");
        String path = oname.getKeyProperty("path");
        Server server = ServerFactory.getServer();
        Service service = server.findService(serviceName);
        StandardEngine engine = (StandardEngine) service.getContainer();
        if (hostName == null) {             // if realm's container is Engine
            Realm realm = engine.getRealm();
            Container container = realm.getContainer();
            if (container instanceof StandardEngine) {
                String sname =
View Full Code Here

TOP

Related Classes of org.apache.catalina.Service

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.