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

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


            // 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


        final Component targetComponent = super.resolveComponentURI(componentURI);
        final ComponentService targetService = super.resolveService(serviceName, targetComponent);
        final InterfaceContract targetServiceIfaceContract = targetService.getInterfaceContract();

        // Re-create the resolved Endpoint
        this.resolvedEndpoint = new EndpointReferenceImpl(
                (RuntimeComponent) targetComponent, targetService, null,
                targetServiceIfaceContract);

        // Copy the Java Interface from the Service
        final JavaInterface ji = (JavaInterface) targetServiceIfaceContract.getInterface();
View Full Code Here

    private EndpointReference from;
    private EndpointReference to;

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

                } catch(Exception ex) {
                    // do nothing
                }
            }
           
            serviceEPR = new EndpointReferenceImpl(endpointURL);
        }
       
        return serviceEPR;
    }
View Full Code Here

    public EndpointReference getCallbackEndpoint(){
        if (callbackEPR == null) {
            if (reference.getCallbackService() != null) {
                for (Binding callbackBinding : reference.getCallbackService().getBindings()) {
                    if (callbackBinding instanceof SCABinding) {
                        callbackEPR = new EndpointReferenceImpl(reference.getName() + "/" + callbackBinding.getName());
                        continue;
                    }
                }
            }   
        }
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 Object getCallbackID() {
        return callbackID;
    }

    public EndpointReference getEndpointReference() {
        return new EndpointReferenceImpl(component, reference, binding, reference.getInterfaceContract());
    }
View Full Code Here

        if (contract instanceof RuntimeComponentService)
            requestMsg.setTo(((RuntimeComponentService)contract).getRuntimeWire(getBinding()).getTarget());
        else
            requestMsg.setTo(((RuntimeComponentReference)contract).getRuntimeWire(getBinding()).getTarget());
        if (callbackAddress != null) {
            requestMsg.setFrom(new EndpointReferenceImpl(callbackAddress));
        }

        Message workContext = ThreadMessageContext.getMessageContext();

        ThreadMessageContext.setMessageContext(requestMsg);
View Full Code Here

                                                                         binding.getURI(),
                                                                         SCABinding.class.getName());
               
                if ( (serviceUrl != null ) &&
                     (!serviceUrl.equals(""))){
                    serviceEPR = new EndpointReferenceImpl(serviceUrl);
                }
            }
        }
       
        return serviceEPR;
View Full Code Here

    public EndpointReference getCallbackEndpoint(){
        if (callbackEPR == null) {
            if (reference.getCallbackService() != null) {
                for (Binding callbackBinding : reference.getCallbackService().getBindings()) {
                    if (callbackBinding instanceof SCABinding) {
                        callbackEPR = new EndpointReferenceImpl(reference.getName() + "/" + callbackBinding.getName());
                        continue;
                    }
                }
            }   
        }
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.