Examples of createProxy()


Examples of org.apache.geronimo.kernel.proxy.ProxyFactory.createProxy()

        assertTrue(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);
        assertFalse(test instanceof Comparable);

        proxyFactory = mgr.createProxyFactory(new Class[]{MockEndpoint.class, MockParentInterface1.class, MockChildInterface1.class, Comparable.class}, myCl);
        test = proxyFactory.createProxy(gbean.getAbstractName());
        assertTrue(test instanceof MockEndpoint);
        assertTrue(test instanceof MockParentInterface1);
        assertFalse(test instanceof MockParentInterface2);
        assertTrue(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyFactory.createProxy()

        assertFalse(test instanceof MockParentInterface2);
        assertTrue(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);

        proxyFactory = mgr.createProxyFactory(new Class[]{MockParentInterface1.class, MockChildInterface1.class, Comparable.class}, myCl);
        test = proxyFactory.createProxy(gbean.getAbstractName());
        assertFalse(test instanceof MockEndpoint);
        assertTrue(test instanceof MockParentInterface1);
        assertFalse(test instanceof MockParentInterface2);
        assertTrue(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyFactory.createProxy()

        assertFalse(test instanceof MockParentInterface2);
        assertTrue(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);

        proxyFactory = mgr.createProxyFactory(new Class[]{MockEndpoint.class, Comparable.class}, myCl);
        test = proxyFactory.createProxy(gbean.getAbstractName());
        assertTrue(test instanceof MockEndpoint);
        assertFalse(test instanceof MockParentInterface1);
        assertFalse(test instanceof MockParentInterface2);
        assertFalse(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyFactory.createProxy()

        assertFalse(test instanceof MockParentInterface2);
        assertFalse(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);

        proxyFactory = mgr.createProxyFactory(new Class[]{Comparable.class}, myCl);
        test = proxyFactory.createProxy(gbean.getAbstractName());

        try {
            proxyFactory = mgr.createProxyFactory(null, myCl);
            fail();
        } catch (NullPointerException e) {
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyManager.createProxy()

        Set names = kernel.listGBeans(query);
        JettyContainer[] results = new JettyContainer[names.size()];
        int i = 0;
        for (Iterator it = names.iterator(); it.hasNext(); i++) {
            AbstractName name = (AbstractName) it.next();
            results[i] = (JettyContainer) proxyManager.createProxy(name, JettyContainer.class.getClassLoader());
        }
        return results;
    }

    /**
 
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyManager.createProxy()

        Object[] result = (Object[]) Array.newInstance(iface, set.size());
        int index = 0;
        ProxyManager mgr = kernel.getProxyManager();
        for (Iterator it = set.iterator(); it.hasNext();) {
            AbstractName name = (AbstractName) it.next();
            result[index++] = mgr.createProxy(name, iface);
        }
        return result;
    }   
   
    /**
 
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyManager.createProxy()

        Set names = kernel.listGBeans(query);
        for (Iterator it = names.iterator(); it.hasNext();) {
            AbstractName name = (AbstractName) it.next();
            try {
                if (kernel.getAttribute(name, "protocol").equals(protocol)) {
                    result.add(proxyManager.createProxy(name, JettyWebConnector.class.getClassLoader()));
                }
            } catch (Exception e) {
                log.error("Unable to check the protocol for a connector", e);
            }
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyManager.createProxy()

        Set names = kernel.listGBeans(query);
        JettyWebConnector[] results = new JettyWebConnector[names.size()];
        int i = 0;
        for (Iterator it = names.iterator(); it.hasNext(); i++) {
            AbstractName name = (AbstractName) it.next();
            results[i] = (JettyWebConnector) proxyManager.createProxy(name, JettyWebConnector.class.getClassLoader());
        }
        return results;
    }

    public NetworkConnector[] getConnectorsForContainer(Object container, String protocol) {
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyManager.createProxy()

                ReferencePatterns refs = data.getReferencePatterns(JettyConnector.CONNECTOR_CONTAINER_REFERENCE);
                if (containerName.equals(refs.getAbstractName())) {
                    try {
                        String testProtocol = (String) kernel.getAttribute(name, "protocol");
                        if (testProtocol != null && testProtocol.equals(protocol)) {
                            results.add(mgr.createProxy(name, JettyWebConnector.class.getClassLoader()));
                        }
                    } catch (Exception e) {
                        log.error("Unable to look up protocol for connector '" + name + "'", e);
                    }
                    break;
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyManager.createProxy()

            for (Iterator it = set.iterator(); it.hasNext();) {
                AbstractName name = (AbstractName) it.next(); // a single Jetty connector
                GBeanData data = kernel.getGBeanData(name);
                ReferencePatterns refs = data.getReferencePatterns(JettyConnector.CONNECTOR_CONTAINER_REFERENCE);
                if (containerName.equals(refs.getAbstractName())) {
                    results.add(mgr.createProxy(name, JettyWebConnector.class.getClassLoader()));
                }
            }
            return (JettyWebConnector[]) results.toArray(new JettyWebConnector[results.size()]);
        } catch (Exception e) {
            throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for Jetty container '" + containerName + "'").initCause(e);
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.