/** * Select an endpoint reference from the component reference * @param ref * @return */ private Endpoint getEndpoint(ComponentService service, String bindingName) { if (bindingName == null) { // The default binding name is the name of the promoted service bindingName = getPromotedService(service).getName(); } Endpoint returnEp = null; List<Endpoint> eps = service.getEndpoints(); for (Endpoint ep : eps) { Binding binding = ep.getBinding(); if (bindingName.equals(binding.getName()) || binding.getName() == null) { returnEp = ep; break; } } //TUSCANY-3543 if (returnEp == null) { returnEp = eps.get(0); } return returnEp; }
logger.fine("Starting component service: " + component.getURI() + "#" + service.getName()); for (Endpoint endpoint : service.getEndpoints()) { RuntimeEndpoint ep = (RuntimeEndpoint)endpoint; startEndpoint(compositeContext, ep, providers);
service.getEndpoints().clear(); for (Binding binding : service.getBindings()) { Endpoint endpoint = assemblyFactory.createEndpoint(); endpoint.setBinding(binding); endpoint.setUnresolved(false); service.getEndpoints().add(endpoint);
service.getEndpoints().clear(); for (Binding binding : service.getBindings()) { Endpoint endpoint = assemblyFactory.createEndpoint(); endpoint.setBinding(binding); endpoint.setUnresolved(false); service.getEndpoints().add(endpoint);
List<Endpoint> callbackEndpoints = reference.getCallbackService().getEndpoints(); if (!callbackEndpoints.isEmpty()) { for (EndpointReference endpointReference : reference.getEndpointReferences()){ (service.getInterfaceContract().getCallbackInterface() != null)) { if (reference.getName().equals(service.getName())) { for (Endpoint endpoint : service.getEndpoints()) { for ( EndpointReference callbackEndpointReference : reference.getEndpointReferences()){ if((endpoint.getBinding() == null) &&
List<Endpoint> callbackEndpoints = reference.getCallbackService().getEndpoints(); if (!callbackEndpoints.isEmpty()) { for (EndpointReference endpointReference : reference.getEndpointReferences()){ (service.getInterfaceContract().getCallbackInterface() != null)) { if (reference.getName().equals(service.getName())) { for (Endpoint endpoint : service.getEndpoints()) { for ( EndpointReference callbackEndpointReference : reference.getEndpointReferences()){ if((endpoint.getBinding() == null) &&
.getCallbackInterface() != null)) { if (reference.getName().equals(service.getName())) { for (Endpoint endpoint : service.getEndpoints()) { endpoint.getCallbackEndpointReferences().addAll(reference .getEndpointReferences());
logger.fine("Stopping component service: " + component.getURI() + "#" + service.getName()); for (Endpoint endpoint : service.getEndpoints()) { RuntimeEndpoint ep = (RuntimeEndpoint) endpoint; stop(ep);
.getCallbackInterface() != null)) { if (reference.getName().equals(service.getName())) { for (Endpoint endpoint : service.getEndpoints()) { endpoint.getCallbackEndpointReferences().addAll(reference .getEndpointReferences());
for (Endpoint ep : componentService.getEndpoints()) { Set<String> policyNames = getPolicyNames(ep);
for (Endpoint ep : componentService.getEndpoints()) { Set<String> policyNames = getPolicyNames(ep);
private void populateLocalRegistry(Composite composite, DomainRegistry registry, BuilderContext context){ for (Component component : composite.getComponents()) { // recurse for composite implementations Implementation implementation = component.getImplementation(); if (implementation instanceof Composite) { populateLocalRegistry((Composite)implementation, registry, context); } // add all endpoints to the local registry for (ComponentService service : component.getServices()) { for (Endpoint endpoint : service.getEndpoints()){ registry.addEndpoint(endpoint); } } // add endpoint references that we want to match to the registry for (ComponentReference reference : component.getReferences()) { for (EndpointReference epr : reference.getEndpointReferences()){ if (epr.getStatus().equals(EndpointReference.Status.WIRED_TARGET_NOT_FOUND)|| epr.getStatus().equals(EndpointReference.Status.WIRED_TARGET_IN_BINDING_URI)){ registry.addEndpointReference(epr); } } } } }
for(Endpoint loopCallbackEndpoint : callbackService.getEndpoints()){ if(loopCallbackEndpoint.getBinding().getType().equals(endpointReference.getBinding().getType())){ callbackEndpoint = (RuntimeEndpoint)loopCallbackEndpoint; for (Endpoint endpoint : callbackService.getEndpoints()){ if (endpoint.getBinding().getType().equals(SCABinding.TYPE)){ callbackBinding.setURI(endpoint.getBinding().getURI()); callbackService.getEndpoints().add(callbackEndpoint);
for (Endpoint ep : componentService.getEndpoints()) { for ( PolicySet ps : new ArrayList<PolicySet>(ep.getPolicySets()) ) {
for (Endpoint ep : componentService.getEndpoints()) { for ( PolicySet ps : new ArrayList<PolicySet>(ep.getPolicySets()) ) {
for ( Endpoint ep : service.getEndpoints() ) { for ( Intent epIntent : ep.getRequiredIntents() ) { if ( Constants.TRANSACTED_ONE_WAY_INTENT.equals(epIntent.getName())) { for ( Endpoint ep : service.getEndpoints() ) { for ( Intent epIntent : ep.getRequiredIntents() ) { if ( Constants.PROPAGATES_TRANSACTION_INTENT.equals(epIntent.getName())) {
for ( Endpoint ep : service.getEndpoints() ) { for ( Intent epIntent : ep.getRequiredIntents() ) { if ( Constants.TRANSACTED_ONE_WAY_INTENT.equals(epIntent.getName())) { for ( Endpoint ep : service.getEndpoints() ) { for ( Intent epIntent : ep.getRequiredIntents() ) { if ( Constants.PROPAGATES_TRANSACTION_INTENT.equals(epIntent.getName())) {
service.getEndpoints().add(endpoint); service.setForCallback(true); endpoint.setService(service);
for (Endpoint ep : componentService.getEndpoints()) {
for (Endpoint ep : componentService.getEndpoints()) {