Package org.apache.tuscany.sca.core.invocation

Examples of org.apache.tuscany.sca.core.invocation.CallbackWireObjectFactory


            return null;
        }
        JavaInterface javaInterface = (JavaInterface) callbackReference.getInterfaceContract().getInterface();
        Class<CB> javaClass = (Class<CB>)javaInterface.getJavaClass();
        List<RuntimeWire> wires = callbackReference.getRuntimeWires();
        CallbackWireObjectFactory factory = new CallbackWireObjectFactory(javaClass, proxyFactory, wires);
        factory.resolveTarget();
        ReferenceParameters parameters = msgContext.getTo().getReferenceParameters();
        factory.attachCallbackID(parameters.getCallbackID());
        if (factory.getConversation() != null) {
            factory.attachConversationID(parameters.getConversationID());
        }
        return factory;
    }
View Full Code Here


                    // this can happen when there are no client wires to a
                    // component that has a callback
                    continue;
                }
                JavaElementImpl element = entry.getValue();
                ObjectFactory<?> factory = new CallbackWireObjectFactory(element.getType(), proxyFactory, wires);
                if (!(element.getAnchor() instanceof Constructor)) {
                    injectionSites.add(element);
                }
                factories.put(element, factory);
            }
View Full Code Here

        Foo foo = new Foo() {
        };
        EasyMock.expect(service.createCallbackProxy(EasyMock.eq(Foo.class), EasyMock.isA(List.class))).andReturn(foo);
        EasyMock.replay(service);
        List<RuntimeWire> wires = new ArrayList<RuntimeWire>();
        CallbackWireObjectFactory factory = new CallbackWireObjectFactory(Foo.class, service, wires);
        assertEquals(foo, factory.getInstance());
        EasyMock.verify(service);
    }
View Full Code Here

                        businessInterface =
                            JavaIntrospectionHelper.getBusinessInterface(element.getType(), element.getGenericType());
                        factory =
                            new CallbackReferenceObjectFactory(businessInterface, proxyFactory, wires);
                    } else {
                        factory = new CallbackWireObjectFactory(businessInterface, proxyFactory, wires);
                    }
                    if (!(element.getAnchor() instanceof Constructor)) {
                        instanceFactoryProvider.getInjectionSites().add(element);
                    }
                    instanceFactoryProvider.setObjectFactory(element, factory);
View Full Code Here

                        businessInterface =
                            JavaIntrospectionHelper.getBusinessInterface(element.getType(), element.getGenericType());
                        factory =
                            new CallbackReferenceObjectFactory(businessInterface, proxyFactory, wires);
                    } else {
                        factory = new CallbackWireObjectFactory(businessInterface, proxyFactory, wires);
                    }
                    if (!(element.getAnchor() instanceof Constructor)) {
                        instanceFactoryProvider.getInjectionSites().add(element);
                    }
                    instanceFactoryProvider.setObjectFactory(element, factory);
View Full Code Here

                ObjectFactory<?> factory = null;
                if (CallableReference.class.isAssignableFrom(element.getType())) {
                    businessInterface =
                        JavaIntrospectionHelper.getBusinessInterface(element.getType(), element.getGenericType());
                    factory =
                        new CallableReferenceObjectFactory(new CallbackWireObjectFactory(businessInterface,
                                                                                         proxyFactory, wires));
                } else {
                    factory = new CallbackWireObjectFactory(businessInterface, proxyFactory, wires);
                }
                if (!(element.getAnchor() instanceof Constructor)) {
                    instanceFactoryProvider.getInjectionSites().add(element);
                }
                instanceFactoryProvider.setObjectFactory(element, factory);
View Full Code Here

            return null;
        }
        JavaInterface javaInterface = (JavaInterface) callbackReference.getInterfaceContract().getInterface();
        Class<CB> javaClass = (Class<CB>)javaInterface.getJavaClass();
        List<RuntimeWire> wires = callbackReference.getRuntimeWires();
        CallbackWireObjectFactory factory = new CallbackWireObjectFactory(javaClass, proxyFactory, wires);
        factory.resolveTarget();
        ReferenceParameters parameters = msgContext.getTo().getReferenceParameters();
        factory.attachCallbackID(parameters.getCallbackID());
        if (factory.getConversation() != null) {
            factory.attachConversationID(parameters.getConversationID());
        }
        return factory;
    }
View Full Code Here

                        businessInterface =
                            JavaIntrospectionHelper.getBusinessInterface(element.getType(), element.getGenericType());
                        factory =
                            new CallbackReferenceObjectFactory(businessInterface, proxyFactory, wires);
                    } else {
                        factory = new CallbackWireObjectFactory(businessInterface, proxyFactory, wires);
                    }
                    if (!(element.getAnchor() instanceof Constructor)) {
                        callbackInjectionList.add(element);
                    }
                    instanceFactoryProvider.setObjectFactory(element, factory);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.invocation.CallbackWireObjectFactory

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.