Examples of introspect()


Examples of org.apache.tuscany.core.config.ComponentTypeIntrospector.introspect()

        AtomicComponent[] ca = new AtomicComponent[3];
        ca[0] = MockFactory.createComponent("one", SessionScopedOrderedInitPojo.class, Scope.SESSION);
        ca[1] = MockFactory.createComponent("two", SessionScopedOrderedInitPojo.class, Scope.SESSION);
        ca[2] = MockFactory.createComponent("three", SessionScopedOrderedInitPojo.class, Scope.SESSION);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(SessionScopedOrderedInitPojo.class);
        ca[0].getImplementation().setComponentType(type);
        ca[1].getImplementation().setComponentType(type);
        ca[2].getImplementation().setComponentType(type);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        for (AtomicComponent aCa : ca) {
View Full Code Here

Examples of org.apache.tuscany.core.config.ComponentTypeIntrospector.introspect()

        ca[1] = MockFactory.createComponent("TestServiceInitOnly", RequestScopeInitOnlyComponent.class,
                Scope.REQUEST);
        ca[2] = MockFactory.createComponent("TestServiceDestroyOnly", RequestScopeDestroyOnlyComponent.class,
                Scope.REQUEST);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ca[0].getImplementation().setComponentType(introspector.introspect(RequestScopeInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(RequestScopeInitOnlyComponent.class));
        ca[2].getImplementation().setComponentType(introspector.introspect(RequestScopeDestroyOnlyComponent.class));
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
View Full Code Here

Examples of org.apache.tuscany.core.config.ComponentTypeIntrospector.introspect()

                Scope.REQUEST);
        ca[2] = MockFactory.createComponent("TestServiceDestroyOnly", RequestScopeDestroyOnlyComponent.class,
                Scope.REQUEST);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ca[0].getImplementation().setComponentType(introspector.introspect(RequestScopeInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(RequestScopeInitOnlyComponent.class));
        ca[2].getImplementation().setComponentType(introspector.introspect(RequestScopeDestroyOnlyComponent.class));
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());
View Full Code Here

Examples of org.apache.tuscany.core.config.ComponentTypeIntrospector.introspect()

        ca[2] = MockFactory.createComponent("TestServiceDestroyOnly", RequestScopeDestroyOnlyComponent.class,
                Scope.REQUEST);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ca[0].getImplementation().setComponentType(introspector.introspect(RequestScopeInitDestroyComponent.class));
        ca[1].getImplementation().setComponentType(introspector.introspect(RequestScopeInitOnlyComponent.class));
        ca[2].getImplementation().setComponentType(introspector.introspect(RequestScopeDestroyOnlyComponent.class));
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        for (AtomicComponent aCa : ca) {
            builder.build(aCa);
            configs.add((ContextFactory<Context>) aCa.getContextFactory());
View Full Code Here

Examples of org.apache.tuscany.core.config.ComponentTypeIntrospector.introspect()

        AtomicComponent[] ca = new AtomicComponent[3];
        ca[0] = MockFactory.createComponent("one", RequestScopedOrderedInitPojo.class, Scope.REQUEST);
        ca[1] = MockFactory.createComponent("two", RequestScopedOrderedInitPojo.class, Scope.REQUEST);
        ca[2] = MockFactory.createComponent("three", RequestScopedOrderedInitPojo.class, Scope.REQUEST);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(RequestScopedOrderedInitPojo.class);
        ca[0].getImplementation().setComponentType(type);
        ca[1].getImplementation().setComponentType(type);
        ca[2].getImplementation().setComponentType(type);
        List<ContextFactory<Context>> configs = new ArrayList<ContextFactory<Context>>();
        for (AtomicComponent aCa : ca) {
View Full Code Here

Examples of org.apache.tuscany.core.config.ComponentTypeIntrospector.introspect()

        WireFactoryService wireService = new DefaultWireFactoryService(new MessageFactoryImpl(), new JDKWireFactoryFactory(), policyRegistry);
        JavaContextFactoryBuilder builder = new JavaContextFactoryBuilder(wireService);
        AtomicComponent component = MockFactory.createComponent(name, ModuleScopeInitDestroyComponent.class,
                Scope.MODULE);
        ComponentTypeIntrospector introspector = MockFactory.getIntrospector();
        ComponentType type = introspector.introspect(ModuleScopeInitDestroyComponent.class);
        component.getImplementation().setComponentType(type);
        builder.build(component);
        return (ContextFactory<Context>) component.getContextFactory();
    }
}
View Full Code Here

Examples of org.apache.tuscany.core.idl.java.JavaInterfaceProcessorRegistryImpl.introspect()

     */
    public static <T> InboundWire createInboundWire(String serviceName, Class<T> interfaze)
        throws InvalidServiceContractException {
        InboundWire wire = new InboundWireImpl();
        JavaInterfaceProcessorRegistry registry = new JavaInterfaceProcessorRegistryImpl();
        ServiceContract<?> contract = registry.introspect(interfaze);
        wire.setServiceContract(contract);
        wire.setServiceName(serviceName);
        wire.addInvocationChains(createInboundChains(interfaze));
        return wire;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.databinding.DataBinding.introspect()

    @SuppressWarnings("unchecked")
    public void testRegistry() {
        DataBinding db1 = createMock(DataBinding.class);
        expect(db1.getName()).andReturn(ContentHandler.class.getName()).anyTimes();
        DataType<Class> dataType1 = new DataTypeImpl<Class>(ContentHandler.class, ContentHandler.class);
        expect(db1.introspect(dataType1, null)).andReturn(true);
        expect(db1.introspect(EasyMock.not(EasyMock.same(dataType1)), (Operation) EasyMock.isNull()))
            .andReturn(false).anyTimes();
        replay(db1);

        registry.addDataBinding(db1);
View Full Code Here

Examples of org.apache.tuscany.spi.databinding.DataBinding.introspect()

    public void testRegistry() {
        DataBinding db1 = createMock(DataBinding.class);
        expect(db1.getName()).andReturn(ContentHandler.class.getName()).anyTimes();
        DataType<Class> dataType1 = new DataType<Class>(ContentHandler.class, ContentHandler.class);
        expect(db1.introspect(ContentHandler.class)).andReturn(dataType1);
        expect(db1.introspect((Class)EasyMock.anyObject())).andReturn(null).anyTimes();
        replay(db1);

        registry.register(db1);
View Full Code Here

Examples of org.apache.tuscany.spi.idl.java.JavaInterfaceProcessorRegistry.introspect()

     */
    public static <T> InboundWire createInboundWire(String serviceName, Class<T> interfaze)
        throws InvalidServiceContractException {
        InboundWire wire = new InboundWireImpl();
        JavaInterfaceProcessorRegistry registry = new JavaInterfaceProcessorRegistryImpl();
        ServiceContract<?> contract = registry.introspect(interfaze);
        wire.setServiceContract(contract);
        wire.setServiceName(serviceName);
        wire.addInvocationChains(createInboundChains(interfaze));
        return wire;
    }
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.