public String createJavascriptReference(ComponentReference componentReference) throws IOException { EndpointReference epr = componentReference.getEndpointReferences().get(0); Endpoint targetEndpoint = epr.getTargetEndpoint(); if (targetEndpoint.isUnresolved()) { //force resolution and targetEndpoint binding calculations //by calling the getInvocationChain ((RuntimeEndpointReference) epr).getInvocationChains(); targetEndpoint = epr.getTargetEndpoint(); } Binding binding = targetEndpoint.getBinding(); URI targetURI = URI.create(binding.getURI()); String targetPath = targetURI.getPath(); return "tuscany.AtomService(\"" + targetPath + "\")"; }
public String createJavascriptReference(ComponentReference componentReference) throws IOException { EndpointReference epr = componentReference.getEndpointReferences().get(0); Endpoint targetEndpoint = epr.getTargetEndpoint(); if (targetEndpoint.isUnresolved()) { //force resolution and targetEndpoint binding calculations //by calling the getInvocationChain ((RuntimeEndpointReference) epr).getInvocationChains(); targetEndpoint = epr.getTargetEndpoint(); } Binding binding = targetEndpoint.getBinding(); URI targetURI = URI.create(binding.getURI()); String targetPath = targetURI.getPath(); return "tuscany.RestService(\"" + targetPath + "\")"; }
for(EndpointReference epr : reference.getEndpointReferences()) { Endpoint targetEndpoint = epr.getTargetEndpoint(); if (targetEndpoint.isUnresolved()) {
for(EndpointReference epr : reference.getEndpointReferences()) { Endpoint targetEndpoint = epr.getTargetEndpoint(); if (targetEndpoint.isUnresolved()) {
for(EndpointReference epr : reference.getEndpointReferences()) { Endpoint targetEndpoint = epr.getTargetEndpoint(); if (targetEndpoint.isUnresolved()) {
/** * 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; }
if (endpointReference.getTargetEndpoint() != null && !endpointReference.getTargetEndpoint().isUnresolved()) { matchedEndpoint = endpointReference.getTargetEndpoint(); } else {
|| endpointReference.getCallbackEndpoint().isUnresolved())) { selectCallbackEndpoint(endpointReference, endpointReference.getReference().getCallbackService(),