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.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; }
/** * 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())); }
/** * Select an endpoint reference from the component reference * @param ref * @return */ private EndpointReference getEndpointReference(ComponentReference ref) { List<EndpointReference> eprs = ref.getEndpointReferences(); if (eprs.size() == 1) { // Return 1st one return eprs.get(0); } else { for (EndpointReference epr : eprs) { // Try to see if there is an EPR using binding.sca if (epr.getBinding().getType().equals(SCABinding.TYPE)) { return epr; } } return eprs.get(0); } }
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 RuntimeEndpointReference selectCallbackWire( org.apache.tuscany.sca.assembly.Endpoint endpoint, RuntimeComponentReference componentReference) { // Look for callback binding with same name as service binding if (endpoint == null) { throw new RuntimeException("Destination for forward call is not available"); } for (EndpointReference epr : componentReference.getEndpointReferences()) { if (epr.getBinding().getName().equals(endpoint.getBinding().getName())) { return (RuntimeEndpointReference) epr; } } // if no match, look for callback binding with same type as service binding for (EndpointReference epr : componentReference.getEndpointReferences()) { if (epr.getBinding().getType().equals(endpoint.getBinding().getType())) { return (RuntimeEndpointReference) epr; } } // no suitable callback wire was found return null; } // end method selectCallbackWire
private RuntimeEndpointReference selectCallbackEPR(Message msgContext) { // look for callback binding with same name as service binding Endpoint to = msgContext.getTo(); if (to == null) { //FIXME: need better exception throw new ServiceRuntimeException("Destination for forward call is not available"); } for (EndpointReference epr : callbackEPRs) { if (epr.getBinding().getName().equals(to.getBinding().getName())) { return (RuntimeEndpointReference) epr; } } // if no match, look for callback binding with same type as service binding for (EndpointReference epr : callbackEPRs) { if (epr.getBinding().getType().equals(to.getBinding().getType())) { return (RuntimeEndpointReference) epr; } } // no suitable callback wire was found 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; } }
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; } }
for (EndpointReference endpointReference : reference.getEndpointReferences()){ for(Endpoint callbackEndpoint : callbackEndpoints){ if((endpointReference.getBinding() != null) && (callbackEndpoint.getBinding() != null) && (callbackEndpoint.getBinding().getType().equals(endpointReference.getBinding().getType()))){ endpointReference.setCallbackEndpoint(callbackEndpoint); break; for ( EndpointReference callbackEndpointReference : reference.getEndpointReferences()){ if((endpoint.getBinding() == null) && (callbackEndpointReference.getBinding() == null) && (callbackEndpointReference.getBinding().getType().equals(endpoint.getBinding().getType()))){ endpoint.getCallbackEndpointReferences().add(callbackEndpointReference); break;
for (EndpointReference endpointReference : reference.getEndpointReferences()){ for(Endpoint callbackEndpoint : callbackEndpoints){ if((endpointReference.getBinding() != null) && (callbackEndpoint.getBinding() != null) && (callbackEndpoint.getBinding().getType().equals(endpointReference.getBinding().getType()))){ endpointReference.setCallbackEndpoint(callbackEndpoint); break; for ( EndpointReference callbackEndpointReference : reference.getEndpointReferences()){ if((endpoint.getBinding() == null) && (callbackEndpointReference.getBinding() == null) && (callbackEndpointReference.getBinding().getType().equals(endpoint.getBinding().getType()))){ endpoint.getCallbackEndpointReferences().add(callbackEndpointReference); break;
if (endpointReference.getBinding() != null && endpointReference.getBinding() instanceof SCABinding ){ for (Endpoint endpoint : matchedEndpoints){ if (endpoint.getBinding() instanceof SCABinding){ if (!ps.getAppliesTo().contains(endpointReference.getBinding().getType().getLocalPart())){ psToRemove.add(ps);
if(loopCallbackEndpoint.getBinding().getType().equals(endpointReference.getBinding().getType())){ callbackEndpoint = (RuntimeEndpoint)loopCallbackEndpoint; break match1; callbackEndpoint.setService(callbackService); Binding forwardBinding = endpointReference.getBinding(); Binding callbackBinding = null; if(loopCallbackBinding.getType().equals(endpointReference.getBinding().getType())){ callbackBinding = loopCallbackBinding; break; if (loopEndpointReference.getBinding().getType().equals(endpointReference.getBinding().getType())){ callbackBinding = loopEndpointReference.getBinding(); break;
callback.getBindings().add(epr.getBinding());
callback.getBindings().add(epr.getBinding());
epr.getBinding() == null){ continue; if ( epr.getBinding() instanceof PolicySubject ) { if (isApplicableToSubject(document, appliesToSubjects, topComposite, (PolicySubject)epr.getBinding(), ps)) continue;
epr.getBinding() == null){ continue; if ( epr.getBinding() instanceof PolicySubject ) { if (isApplicableToSubject(document, appliesToSubjects, topComposite, (PolicySubject)epr.getBinding(), ps)) continue;
this.wsBinding = (WebServiceBinding)endpointReference.getBinding(); this.component = (RuntimeComponent)endpointReference.getComponent(); this.reference = (RuntimeComponentReference)endpointReference.getReference(); throw new ServiceRuntimeException("rpc/encoded WSDL style not supported. Component " + endpointReference.getComponent().getName() + " Reference " + endpointReference.getReference() + " Binding " + endpointReference.getBinding().getName()); throw new ServiceRuntimeException("doc/encoded WSDL style not supported. Component " + endpointReference.getComponent().getName() + " Reference " + endpointReference.getReference() + " Binding " + endpointReference.getBinding().getName());
inherit(epr, null, true, epr.getBinding()); addDefaultIntents(epr, epr.getBinding(), context);