public RMIReferenceBindingProvider(EndpointReference endpointReference, RMIHost rmiHost) { this.reference = (RuntimeComponentReference)endpointReference.getReference(); this.binding = (RMIBinding)endpointReference.getBinding(); this.rmiHost = rmiHost; }
@Override public InterfaceContract getBindingInterfaceContract() { return endpoint.getReference().getInterfaceContract(); }
public RMIReferenceBindingProvider(EndpointReference endpointReference, RMIHost rmiHost) { this.endpointReference = endpointReference; this.reference = (RuntimeComponentReference)endpointReference.getReference(); this.binding = (RMIBinding)endpointReference.getBinding(); this.rmiHost = rmiHost; }
public RMIReferenceBindingProvider(EndpointReference endpointReference, RMIHost rmiHost) { this.endpointReference = endpointReference; this.reference = (RuntimeComponentReference)endpointReference.getReference(); this.binding = (RMIBinding)endpointReference.getBinding(); this.rmiHost = rmiHost; }
/** * Returns true if the reference has a callback */ private boolean hasCallback(EndpointReference endpointReference){ if (endpointReference.getReference().getInterfaceContract() == null || endpointReference.getReference().getInterfaceContract().getCallbackInterface() == null || endpointReference.getReference().getName().startsWith("$self$.")){ return false; } else { return true; } }
/** * Constructs a new AtomReferenceBindingProvider * @param component * @param reference * @param binding * @param mediator */ AtomReferenceBindingProvider(HttpClientFactory httpClientFactory, EndpointReference endpointReference, Mediator mediator) { this.httpClientFactory = httpClientFactory; this.endpointReference = endpointReference; this.reference = (RuntimeComponentReference)endpointReference.getReference(); this.binding = (AtomBinding)endpointReference.getBinding(); this.mediator = mediator; // Prepare authorization header // TUSCANY-3735: Don't send authorization header by default as this can cause problems. // Commented out the following two lines until we have a better way to control this. //String authorization = "admin" + ":" + "admin"; //authorizationHeader = "Basic " + new String(Base64.encodeBase64(authorization.getBytes())); }
public List<Endpoint> findEndpoint(EndpointReference endpointReference) { logger.fine("Find endpoint for reference - " + endpointReference); if (endpointReference.getReference() != null) { Endpoint targetEndpoint = endpointReference.getTargetEndpoint(); String uri = targetEndpoint.getURI(); // [rfeng] This is a workaround to deal with the case that the endpoint URI doesn't have the // service name to avoid confusion between structural URIs and service URIs if (uri.indexOf('#') == -1) { uri = uri + "#service()"; } return findEndpoint(uri); } return new ArrayList<Endpoint>(); }
public List<Endpoint> findEndpoint(EndpointReference endpointReference) { logger.fine("Find endpoint for reference - " + endpointReference); if (endpointReference.getReference() != null) { Endpoint targetEndpoint = endpointReference.getTargetEndpoint(); String uri = targetEndpoint.getURI(); // [rfeng] This is a workaround to deal with the case that the endpoint URI doesn't have the // service name to avoid confusion between structural URIs and service URIs if (uri.indexOf('#') == -1) { uri = uri + "#service()"; } return findEndpoint(uri); } return new ArrayList<Endpoint>(); }
/** * Indicates if the invocation is for the callback of a bidirectional service * @param msg the Message * @return true if the invocation is for the callback of a bidirectional service, false otherwise */ private boolean isInvocationForCallback( Message msg ) { org.apache.tuscany.sca.assembly.EndpointReference fromEPR = msg.getFrom(); if( fromEPR != null ) { ComponentReference ref = fromEPR.getReference(); if( ref != null ) return ref.isForCallback(); } // end if return false; } // end method isInvocationForCallback
/** * Indicates if the invocation is for the callback of a bidirectional * service * * @param msg the Message * @return true if the invocation is for the callback of a bidirectional * service, false otherwise */ private boolean isInvocationForCallback(Message msg) { org.apache.tuscany.sca.assembly.EndpointReference fromEPR = msg.getFrom(); if (fromEPR != null) { ComponentReference ref = fromEPR.getReference(); if (ref != null) return ref.isForCallback(); } // end if return false; } // end method isInvocationForCallback
private void build(EndpointReference endpointReference) { BindingBuilder builder = builders.getBindingBuilder(endpointReference.getBinding().getType()); if (builder != null) { builder.build(endpointReference.getComponent(), endpointReference.getReference(), endpointReference.getBinding(), new BuilderContext(extensionPoints), false); } }
private Composite wrap(EndpointReference endpointReference) { try { Composite composite = assemblyFactory.createComposite(); composite.setName(ENDPOINT_REFERENCE_QNAME); composite.setLocal(false); Component component = (Component)endpointReference.getComponent().clone(); composite.getComponents().add(component); component.getReferences().clear(); component.getServices().clear(); ComponentReference reference = (ComponentReference)endpointReference.getReference().clone(); component.getReferences().add(reference); reference.getBindings().clear(); Binding binding = (Binding)endpointReference.getBinding().clone(); reference.getBindings().add(binding); //reference.setInterfaceContract(endpointReference.getInterfaceContract()); if (endpointReference.getStatus() != EndpointReference.Status.RESOLVED_BINDING){ ComponentService service = assemblyFactory.createComponentService(); service.setName(endpointReference.getTargetEndpoint().getURI()); reference.getTargets().clear(); reference.getTargets().add(service); } return composite; } catch (CloneNotSupportedException e) { return null; } }
private Composite wrap(EndpointReference endpointReference) { try { Composite composite = assemblyFactory.createComposite(); composite.setName(ENDPOINT_REFERENCE_QNAME); composite.setLocal(false); Component component = (Component)endpointReference.getComponent().clone(); composite.getComponents().add(component); component.getReferences().clear(); component.getServices().clear(); ComponentReference reference = (ComponentReference)endpointReference.getReference().clone(); component.getReferences().add(reference); reference.getBindings().clear(); Binding binding = (Binding)endpointReference.getBinding().clone(); reference.getBindings().add(binding); //reference.setInterfaceContract(endpointReference.getInterfaceContract()); if (endpointReference.getStatus() != EndpointReference.Status.RESOLVED_BINDING){ ComponentService service = assemblyFactory.createComponentService(); service.setName(endpointReference.getTargetEndpoint().getURI()); reference.getTargets().clear(); reference.getTargets().add(service); } return composite; } catch (CloneNotSupportedException e) { return null; } }
matchAudit.append("Match interface of " + endpointReference.toString() + " to " + endpoint.toString() + " "); InterfaceContract endpointReferenceContract = endpointReference.getReference().getInterfaceContract(); InterfaceContract endpointContract = endpoint.getComponentServiceInterfaceContract();
if (endpointReference.getReference().getName().startsWith("$self$.")){
this.reference = (RuntimeComponentReference)endpointReference.getReference(); " Reference " + endpointReference.getReference() + " Binding " + endpointReference.getBinding().getName()); " Reference " + endpointReference.getReference() + " Binding " + endpointReference.getBinding().getName());
"reference", epr.getComponent().getName(), epr.getReference().getName()); } else if ( Constants.PROPAGATES_TRANSACTION_INTENT.equals(eprIntent.getName())) { error(context.getMonitor(), "reference", epr.getComponent().getName(), epr.getReference().getName()); "reference", epr.getComponent().getName(), epr.getReference().getName());
"reference", epr.getComponent().getName(), epr.getReference().getName()); } else if ( Constants.PROPAGATES_TRANSACTION_INTENT.equals(eprIntent.getName())) { error(context.getMonitor(), "reference", epr.getComponent().getName(), epr.getReference().getName()); "reference", epr.getComponent().getName(), epr.getReference().getName());
inherit(epr, null, true, epr.getReference(), epr.getComponent(), composite);
inherit(epr, null, true, epr.getReference(), epr.getComponent(), composite);