/** * Checks to see if the registry has been updated since the reference was last matched * * @return true is the registry has changed */ public boolean isOutOfDate(DomainRegistry domainRegistry, EndpointReference endpointReference) { Endpoint te = endpointReference.getTargetEndpoint(); if (te != null && !te.isUnresolved() && te.getURI() != null && endpointReference.getStatus() != EndpointReference.Status.RESOLVED_BINDING) { return domainRegistry.isOutOfDate(endpointReference); } return 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; } }
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); } } } } }
if (endpointReference.getStatus() == EndpointReference.Status.AUTOWIRE_PLACEHOLDER){ } else if ( endpointReference.getStatus() == EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED|| endpointReference.getStatus() == EndpointReference.Status.RESOLVED_BINDING ) { runtime); } else if (endpointReference.getStatus() == EndpointReference.Status.WIRED_TARGET_FOUND_READY_FOR_MATCHING ){ } else if (endpointReference.getStatus() == EndpointReference.Status.WIRED_TARGET_IN_BINDING_URI || endpointReference.getStatus() == EndpointReference.Status.WIRED_TARGET_NOT_FOUND || endpointReference.getStatus() == EndpointReference.Status.NOT_CONFIGURED){ if (endpointReference.getStatus().equals(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED) && hasCallback(endpointReference)){ selectCallbackEndpoint(endpointReference, if (endpointReference.getStatus() == EndpointReference.Status.WIRED_TARGET_IN_BINDING_URI){ endpointReference.getTargetEndpoint().setBinding(endpointReference.getBinding()); endpointReference.setStatus(EndpointReference.Status.RESOLVED_BINDING); if (!endpointReference.getStatus().equals(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED)){ Monitor.error(monitor, this, if (endpointReference.getStatus() != EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED && endpointReference.getStatus() != EndpointReference.Status.RESOLVED_BINDING){
for (EndpointReference epr : componentReference.getEndpointReferences()) { if (epr.getStatus() == EndpointReference.Status.WIRED_TARGET_NOT_FOUND || epr.getBinding() == null){ continue;
for (EndpointReference epr : componentReference.getEndpointReferences()) { if (epr.getStatus() == EndpointReference.Status.WIRED_TARGET_NOT_FOUND || epr.getBinding() == null){ continue;