Package org.apache.tuscany.sca.core.assembly

Examples of org.apache.tuscany.sca.core.assembly.EndpointReferenceImpl


        EndpointReference from = null;
        ReferenceParameters parameters = null;
        if (callbackAddress != null ||
            callbackID != null ||
            conversationID != null) {
            from = new EndpointReferenceImpl(null);
            parameters = from.getReferenceParameters();
            msg.setFrom(from);
        }

        // set the reference parameters into the "From" EPR
        if (callbackAddress != null) {
            parameters.setCallbackReference(new EndpointReferenceImpl(callbackAddress));
        }
        if (callbackID != null) {
            parameters.setCallbackID(callbackID);
        }
        if (conversationID != null) {
View Full Code Here


            // Use the interface contract of the reference on the component type
            Reference componentTypeRef = reference.getReference();
            InterfaceContract sourceContract =
                componentTypeRef == null ? reference.getInterfaceContract() : componentTypeRef.getInterfaceContract();
            sourceContract = sourceContract.makeUnidirectional(false);
            EndpointReference epr = new EndpointReferenceImpl(component, reference, binding, sourceContract);
            ReferenceParameters parameters = getReferenceParameters();
            epr.setReferenceParameters(parameters);
            return epr;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }       
    }
View Full Code Here

        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.getFrom().getReferenceParameters().setCallbackObjectID("ABC");
        interceptor.invoke(msg);
        EasyMock.verify(next);
    }
View Full Code Here

    }

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

    public Message invokeRequest(Message msg) {
        try {
            JMSBindingContext context = msg.getBindingContext();
            javax.jms.Message requestJMSMsg = context.getJmsMsg();
           
            EndpointReference from = new EndpointReferenceImpl(null);
            msg.setFrom(from);
            from.setCallbackEndpoint(new EndpointReferenceImpl("/")); // TODO: whats this for?
            ReferenceParameters parameters = from.getReferenceParameters();
   
            String conversationID = requestJMSMsg.getStringProperty(JMSBindingConstants.CONVERSATION_ID_PROPERTY);
            if (conversationID != null) {
                parameters.setConversationID(conversationID);
            }
View Full Code Here

            // Use the interface contract of the reference on the component type
            Reference componentTypeRef = reference.getReference();
            InterfaceContract sourceContract =
                componentTypeRef == null ? reference.getInterfaceContract() : componentTypeRef.getInterfaceContract();
            sourceContract = sourceContract.makeUnidirectional(false);
            EndpointReference epr = new EndpointReferenceImpl(component, reference, binding, sourceContract);
            ReferenceParameters parameters = getReferenceParameters();
            epr.setReferenceParameters(parameters);
            return epr;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }       
    }
View Full Code Here

    private EndpointReference from;
    private EndpointReference to;

    public MessageImpl() {
        this.from = new EndpointReferenceImpl("/");
        this.to = new EndpointReferenceImpl("/");
    }
View Full Code Here

        EndpointReference from = null;
        ReferenceParameters parameters = null;
        if (callbackAddress != null ||
            callbackID != null ||
            conversationID != null) {
            from = new EndpointReferenceImpl(null);
            parameters = from.getReferenceParameters();
            msg.setFrom(from);
        }

        // set the reference parameters into the "From" EPR
        if (callbackAddress != null) {
            parameters.setCallbackReference(new EndpointReferenceImpl(callbackAddress));
        }
        if (callbackID != null) {
            parameters.setCallbackID(callbackID);
        }
        if (conversationID != null) {
View Full Code Here

    public Message invokeRequest(Message msg) {
        try {
            JMSBindingContext context = msg.getBindingContext();
            javax.jms.Message requestJMSMsg = context.getJmsMsg();
           
            EndpointReference from = new EndpointReferenceImpl(null);
            msg.setFrom(from);
            from.setCallbackEndpoint(new EndpointReferenceImpl("/")); // TODO: whats this for?
            ReferenceParameters parameters = from.getReferenceParameters();
   
            String conversationID = requestJMSMsg.getStringProperty(JMSBindingConstants.CONVERSATION_ID_PROPERTY);
            if (conversationID != null) {
                parameters.setConversationID(conversationID);
            }
View Full Code Here

                }

                if (callbackdestName != null) {
                    // append "jms:" to make it an absolute uri so the invoker can determine it came in on the request
                    // as otherwise the invoker should use the uri from the service callback binding
                    parameters.setCallbackReference(new EndpointReferenceImpl("jms:" + callbackdestName));
                }

                String callbackID = jmsMsg.getStringProperty(JMSBindingConstants.CALLBACK_ID_PROPERTY);
                if (callbackID != null) {
                    parameters.setCallbackID(callbackID);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.assembly.EndpointReferenceImpl

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.