Package org.apache.servicemix.jbi.runtime.impl

Examples of org.apache.servicemix.jbi.runtime.impl.ServiceEndpointImpl


                                                        new InvocationHandler() {
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                assertEquals("getEndpoint", method.getName());
                assertEquals(new QName("urn", "svc"), args[0]);
                assertEquals("ep", args[1]);
                return new ServiceEndpointImpl((QName) args[0], (String) args[1]);
            }
        });
        me = new InOnlyImpl(new ExchangeImpl(Pattern.InOnly));
        URIResolver.configureExchange(me, ctx, "endpoint:urn:svc:ep");
        assertNull(me.getInterfaceName());
        assertNull(me.getOperation());
        assertNull(me.getService());
        assertNotNull(me.getEndpoint());

        ctx = (ComponentContext) Proxy.newProxyInstance(ComponentContext.class.getClassLoader(),
                                                        new Class[] { ComponentContext.class },
                                                        new InvocationHandler() {
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                assertEquals("resolveEndpointReference", method.getName());
                assertTrue(args[0] instanceof DocumentFragment);
                return new ServiceEndpointImpl(new QName("svc"), "ep");
            }
        });
        me = new InOnlyImpl(new ExchangeImpl(Pattern.InOnly));
        URIResolver.configureExchange(me, ctx, "http://urn/");
        assertNull(me.getInterfaceName());
View Full Code Here


    //-------------------------------------------------------------------------
    // NMR helpers
    //-------------------------------------------------------------------------

    protected ServiceEndpoint getEndpoint(QName serviceName, String endpointName) {
        return new ServiceEndpointImpl(serviceName, endpointName);
    }
View Full Code Here

        for (Endpoint ep : registry.getServices()) {
            Map<String,?> props = registry.getProperties(ep);
            // Check if this endpoint is addressable in the JBI space
            if (props.get(Endpoint.SERVICE_NAME) != null && props.get(Endpoint.ENDPOINT_NAME) != null
                    && !Boolean.valueOf((String) props.get(Endpoint.UNTARGETABLE))) {
                endpoints.add(new ServiceEndpointImpl(props));
            }
        }
        return endpoints;
    }
View Full Code Here

    //-------------------------------------------------------------------------
    // NMR helpers
    //-------------------------------------------------------------------------

    protected ServiceEndpoint getEndpoint(QName serviceName, String endpointName) {
        return new ServiceEndpointImpl(serviceName, endpointName);
    }
View Full Code Here

        for (Endpoint ep : registry.getServices()) {
            Map<String,?> props = registry.getProperties(ep);
            // Check if this endpoint is addressable in the JBI space
            if (props.get(Endpoint.SERVICE_NAME) != null && props.get(Endpoint.ENDPOINT_NAME) != null
                    && !Boolean.valueOf((String) props.get(Endpoint.UNTARGETABLE))) {
                endpoints.add(new ServiceEndpointImpl(props));
            }
        }
        return endpoints;
    }
View Full Code Here

                                                        new InvocationHandler() {
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                assertEquals("getEndpoint", method.getName());
                assertEquals(new QName("urn", "svc"), args[0]);
                assertEquals("ep", args[1]);
                return new ServiceEndpointImpl((QName) args[0], (String) args[1]);
            }
        });
        me = new InOnlyImpl(new ExchangeImpl(Pattern.InOnly));
        URIResolver.configureExchange(me, ctx, "endpoint:urn:svc:ep");
        assertNull(me.getInterfaceName());
        assertNull(me.getOperation());
        assertNull(me.getService());
        assertNotNull(me.getEndpoint());

        ctx = (ComponentContext) Proxy.newProxyInstance(ComponentContext.class.getClassLoader(),
                                                        new Class[] { ComponentContext.class },
                                                        new InvocationHandler() {
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                assertEquals("resolveEndpointReference", method.getName());
                assertTrue(args[0] instanceof DocumentFragment);
                return new ServiceEndpointImpl(new QName("svc"), "ep");
            }
        });
        me = new InOnlyImpl(new ExchangeImpl(Pattern.InOnly));
        URIResolver.configureExchange(me, ctx, "http://urn/");
        assertNull(me.getInterfaceName());
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.runtime.impl.ServiceEndpointImpl

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.