Examples of GBeanQuery


Examples of org.apache.geronimo.gbean.GBeanQuery

        if (serverRunning) {
            return true;
        }

        // a bit of a hack, but the PersistentConfigurationList is the only thing that knows whether the server is full started!
        GBeanQuery query = new GBeanQuery(null, PersistentConfigurationList.class.getName());
        Set configLists = kernel.listGBeans(query);
        for (Iterator i = configLists.iterator(); i.hasNext();) {
            ObjectName configListName = (ObjectName) i.next();
            try {
                Boolean result = (Boolean) kernel.getAttribute(configListName, "kernelFullyStarted");
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

        GBeanData connector;
        if (protocol.equals(PROTOCOL_HTTP)) {
            connector = new GBeanData(name, HTTPConnector.GBEAN_INFO);
        } else if (protocol.equals(PROTOCOL_HTTPS)) {
            connector = new GBeanData(name, HTTPSConnector.GBEAN_INFO);
            GBeanQuery query = new GBeanQuery(null, ServerInfo.class.getName());
            Set set = kernel.listGBeans(query);
            connector.setReferencePattern("ServerInfo", (ObjectName) set.iterator().next());
            //todo: default HTTPS settings
        } else if (protocol.equals(PROTOCOL_AJP)) {
            connector = new GBeanData(name, AJP13Connector.GBEAN_INFO);
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

    /**
     * Get a list of containers for this web implementation.
     */
    public String[] getContainers() {
        GBeanQuery query = new GBeanQuery(null, JettyContainer.class.getName());
        Set names = kernel.listGBeans(query);
        String[] result = new String[names.size()];
        int i = 0;
        for (Iterator it = names.iterator(); it.hasNext();) {
            ObjectName name = (ObjectName) it.next();
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

     * protocol.
     *
     * @param protocol A protocol as returned by getSupportedProtocols
     */
    public String[] getConnectors(String protocol) {
        GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
        Set names = kernel.listGBeans(query);
        List result = new ArrayList();
        for (Iterator it = names.iterator(); it.hasNext();) {
            ObjectName name = (ObjectName) it.next();
            try {
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

        }
        return (String[]) result.toArray(new String[result.size()]);
    }

    public String getAccessLog(String containerObjectName) {
        GBeanQuery query = new GBeanQuery(null, JettyLogManager.class.getName());
        Set names = kernel.listGBeans(query);
        if(names.size() == 0) {
            return null;
        } else if(names.size() > 1) {
            throw new IllegalStateException("Should not be more than one Jetty access log manager");
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

    /**
     * Gets the ObjectNames of any existing connectors.
     */
    public String[] getConnectors() {
        GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
        Set names = kernel.listGBeans(query);
        String[] result = new String[names.size()];
        int i = 0;
        for (Iterator it = names.iterator(); it.hasNext();) {
            ObjectName name = (ObjectName) it.next();
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

            return getConnectorsForContainer(containerObjectName);
        }
        try {
            ObjectName containerName = ObjectName.getInstance(containerObjectName);
            List results = new ArrayList();
            GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
            Set set = kernel.listGBeans(query); // all Jetty connectors
            for (Iterator it = set.iterator(); it.hasNext();) {
                ObjectName name = (ObjectName) it.next(); // a single Jetty connector
                GBeanData data = kernel.getGBeanData(name);
                Set refs = data.getReferencePatterns(JettyConnector.CONNECTOR_CONTAINER_REFERENCE);
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

    public String[] getConnectorsForContainer(String containerObjectName) {
        try {
            ObjectName containerName = ObjectName.getInstance(containerObjectName);
            List results = new ArrayList();
            GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
            Set set = kernel.listGBeans(query); // all Jetty connectors
            for (Iterator it = set.iterator(); it.hasNext();) {
                ObjectName name = (ObjectName) it.next(); // a single Jetty connector
                GBeanData data = kernel.getGBeanData(name);
                Set refs = data.getReferencePatterns(JettyConnector.CONNECTOR_CONTAINER_REFERENCE);
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

        GBeanData connector;
        if(protocol.equals(PROTOCOL_HTTP)) {
            connector = new GBeanData(name, ConnectorGBean.GBEAN_INFO);
        } else if(protocol.equals(PROTOCOL_HTTPS)) {
            connector = new GBeanData(name, HttpsConnectorGBean.GBEAN_INFO);
            GBeanQuery query = new GBeanQuery(null, ServerInfo.class.getName());
            Set set = kernel.listGBeans(query);
            connector.setReferencePattern("ServerInfo", (ObjectName)set.iterator().next());
            //todo: default HTTPS settings
        } else if(protocol.equals(PROTOCOL_AJP)) {
            connector = new GBeanData(name, ConnectorGBean.GBEAN_INFO);
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

    /**
     * Gets the network containers.
     */
    public String[] getContainers() {
        GBeanQuery query = new GBeanQuery(null, TomcatWebContainer.class.getName());
        Set names = kernel.listGBeans(query);
        String[] result = new String[names.size()];
        int i = 0;
        for (Iterator it = names.iterator(); it.hasNext();) {
            ObjectName name = (ObjectName) it.next();
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.