Package org.apache.tuscany.sca.runtime

Examples of org.apache.tuscany.sca.runtime.EndpointReference


    @Override
    protected ReferenceParameters getReferenceParameters() {
        ReferenceParameters parameters = super.getReferenceParameters();
        if (callback != null) {
            if (callback instanceof ServiceReference) {
                EndpointReference callbackRef = ((CallableReferenceImpl)callback).getEndpointReference();
                parameters.setCallbackReference(callbackRef);
            } else {
                EndpointReference callbackRef = getRuntimeWire().getSource().getCallbackEndpoint();
                parameters.setCallbackReference(callbackRef);
                parameters.setCallbackObjectID(callback);
            }
        }
        return parameters;
View Full Code Here


        InvocationChain chain = runtimeWire.getInvocationChain(operation);
        return invoke(chain, msg, runtimeWire);
    }

    protected Object invoke(InvocationChain chain, Message msg, RuntimeWire wire) throws InvocationTargetException {
        EndpointReference from = msg.getFrom();
        EndpointReference epFrom = wire.getSource();
        if (from != null) {
            from.mergeEndpoint(epFrom);
        } else {
            msg.setFrom(epFrom);
        }
View Full Code Here

    /**
     * @param msgContext
     */
    protected EndpointReference getCallbackEndpoint(Message msgContext) {
        EndpointReference from = msgContext.getFrom();
        return from == null ? null : from.getReferenceParameters().getCallbackReference();
    }
View Full Code Here

    }

    public static RuntimeComponent getCurrentComponent() {
        Message message = ThreadMessageContext.getMessageContext();
        if (message != null) {
            EndpointReference to = message.getTo();
            if (to == null) {
                return null;
            }
            RuntimeComponent component = message.getTo().getComponent();
            return component;
View Full Code Here

       
        //fill message with QoS context info
        fillQoSContext(msg, inMC);
       
        // if reference parameters are needed, create a new "From" EPR to hold them
        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) {
View Full Code Here

        }

        Interface interfaze = msg.getFrom().getCallbackEndpoint().getInterfaceContract().getInterface();
        if (callbackObject != null) {
            if (callbackObject instanceof ServiceReference) {
                EndpointReference callbackRef = ((CallableReferenceImpl)callbackObject).getEndpointReference();
                parameters.setCallbackReference(callbackRef);
            } else {
                if (interfaze != null) {
                    if (!interfaze.isConversational()) {
                        throw new IllegalArgumentException(
View Full Code Here

        InvocationChain chain = runtimeWire.getInvocationChain(operation);
        return invoke(chain, msg, runtimeWire);
    }

    protected Object invoke(InvocationChain chain, Message msg, RuntimeWire wire) throws InvocationTargetException {
        EndpointReference from = msg.getFrom();
        EndpointReference epFrom = wire.getSource();
        if (from != null) {
            from.mergeEndpoint(epFrom);
        } else {
            msg.setFrom(epFrom);
        }
View Full Code Here

    /**
     * @param msgContext
     */
    protected EndpointReference getCallbackEndpoint(Message msgContext) {
        EndpointReference from = msgContext.getFrom();
        return from == null ? null : from.getReferenceParameters().getCallbackReference();
    }
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

        ConversationSequence sequence = op.getConversationSequence();
        Object payload = msg.getBody();

        Object contextId = null;

        EndpointReference from = msg.getFrom();
        ReferenceParameters parameters = null;
        if (from != null) {
            parameters = from.getReferenceParameters();
        }
        // check what sort of context is required
        if (scopeContainer != null) {
            Scope scope = scopeContainer.getScope();
            if (scope == Scope.REQUEST) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.runtime.EndpointReference

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.