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

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


           
        }
       
        binding.setURI(endpointURL);

        serviceEPR = new EndpointReferenceImpl(binding.getURI());
           
       
/*       
        if ( serviceEPR == null && nodeFactory.getNode() != null ){
            // try to resolve the service endpoint with the registry
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

    private EndpointReference from;
    private EndpointReference to;

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

        // if reference parameters are needed, create a new "To" EPR to hold them
        EndpointReference to = null;
        if (callbackAddress != null ||
            callbackID != null ||
            conversationID != null) {
            to = new EndpointReferenceImpl(null);
            msg.setTo(to);
        }

        // set the reference parameters into the "To" EPR
        if (callbackAddress != null) {
            to.getReferenceParameters().setCallbackReference(new EndpointReferenceImpl(callbackAddress));
        }
        if (callbackID != null) {
            to.getReferenceParameters().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;
    }
View Full Code Here

                                                                           binding.getURI(),
                                                                           SCABinding.class.getName());
                 
                  if ( (serviceUrl != null ) &&
                       (!serviceUrl.equals(""))){
                      serviceEPR = new EndpointReferenceImpl(serviceUrl);
                  }
              }
            } else {
              throw new IllegalStateException("No domain service available while trying to find component: "+
                                    component.getName() +
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

        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

    }

    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();
        } catch (NoRegisteredCallbackException e) {
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

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.