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

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


        CallbackInterfaceInterceptor interceptor = new CallbackInterfaceInterceptor(true);
        Interceptor next = EasyMock.createMock(Interceptor.class);
        EasyMock.expect(next.invoke(EasyMock.isA(Message.class))).andReturn(null);
        EasyMock.replay(next);
        interceptor.setNext(next);
        interceptor.invoke(new MessageFactoryImpl().createMessage());
        EasyMock.verify(next);
    }
View Full Code Here


    }

    public void testDoesNotImplement() {
        CallbackInterfaceInterceptor interceptor = new CallbackInterfaceInterceptor(false);
        try {
            interceptor.invoke(new MessageFactoryImpl().createMessage());
            fail();
        } catch (NoRegisteredCallbackException e) {
            // expected
        }
    }
View Full Code Here

        // Create context factory extension point
        ContextFactoryExtensionPoint contextFactories = new DefaultContextFactoryExtensionPoint();
        registry.addExtensionPoint(contextFactories);
       
        // Create Message factory
        MessageFactory messageFactory = new MessageFactoryImpl();
        factories.addFactory(messageFactory);

        // Create a proxy factory
        proxyFactory = ReallySmallRuntimeBuilder.createProxyFactory(registry, mapper, messageFactory);
View Full Code Here

        // Create context factory extension point
        ContextFactoryExtensionPoint contextFactories = new DefaultContextFactoryExtensionPoint();
        registry.addExtensionPoint(contextFactories);
       
        // Create Message factory
        MessageFactory messageFactory = new MessageFactoryImpl();
        factories.addFactory(messageFactory);

        // Create a proxy factory
        proxyFactory = ReallySmallRuntimeBuilder.createProxyFactory(registry, mapper, messageFactory);
View Full Code Here

        CallbackInterfaceInterceptor interceptor = new CallbackInterfaceInterceptor();
        Interceptor next = EasyMock.createMock(Interceptor.class);
        EasyMock.expect(next.invoke(EasyMock.isA(Message.class))).andReturn(null);
        EasyMock.replay(next);
        interceptor.setNext(next);
        Message msg = new MessageFactoryImpl().createMessage();
        msg.setFrom(new EndpointReferenceImpl("uri"));
        msg.getTo().getReferenceParameters().setCallbackObjectID("java:" + System.identityHashCode("ABC"));
        interceptor.invoke(msg);
        EasyMock.verify(next);
    }
View Full Code Here

        EasyMock.verify(next);
    }

    public void testNoCallbackObject() {
        CallbackInterfaceInterceptor interceptor = new CallbackInterfaceInterceptor();
        Message msg = new MessageFactoryImpl().createMessage();
        msg.setFrom(new EndpointReferenceImpl("uri"));
        msg.getTo().getReferenceParameters().setCallbackObjectID(null);
        try {
            interceptor.invoke(msg);
            fail();
View Full Code Here

        CallbackInterfaceInterceptor interceptor = new CallbackInterfaceInterceptor();
        Interceptor next = EasyMock.createMock(Interceptor.class);
        EasyMock.expect(next.invoke(EasyMock.isA(Message.class))).andReturn(null);
        EasyMock.replay(next);
        interceptor.setNext(next);
        Message msg = new MessageFactoryImpl().createMessage();
        msg.setFrom(new EndpointReferenceImpl("uri"));
        msg.getTo().getReferenceParameters().setCallbackObjectID("java:" + System.identityHashCode("ABC"));
        interceptor.invoke(msg);
        EasyMock.verify(next);
    }
View Full Code Here

        EasyMock.verify(next);
    }

    public void testNoCallbackObject() {
        CallbackInterfaceInterceptor interceptor = new CallbackInterfaceInterceptor();
        Message msg = new MessageFactoryImpl().createMessage();
        msg.setFrom(new EndpointReferenceImpl("uri"));
        msg.getTo().getReferenceParameters().setCallbackObjectID(null);
        try {
            interceptor.invoke(msg);
            fail();
View Full Code Here

        // Create context factory extension point
        ContextFactoryExtensionPoint contextFactories = new DefaultContextFactoryExtensionPoint();
        registry.addExtensionPoint(contextFactories);
       
        // Create Message factory
        MessageFactory messageFactory = new MessageFactoryImpl();
        factories.addFactory(messageFactory);

        // Create a proxy factory
        proxyFactory = ReallySmallRuntimeBuilder.createProxyFactory(registry, mapper, messageFactory);
View Full Code Here

TOP

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

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.