public Component getComponent(String name) { Component component = null; for (Component tmp : getComponents()){ if (tmp.getName().equals(name)){ component = tmp; break; } } return component; }
public Component getComponent(String name) { Component component = null; for (Component tmp : getComponents()){ if (tmp.getName().equals(name)){ component = tmp; break; } } return component; }
private static Class<?> findInterface(Endpoint endpoint, DomainRegistry domainRegistry) throws MalformedURLException, ClassNotFoundException { Interface iface = endpoint.getService().getInterfaceContract().getInterface(); if (iface instanceof JavaInterface) { String curi = domainRegistry.getContainingCompositesContributionURI(endpoint.getComponent().getName()); if (curi != null) { ContributionDescription ic = domainRegistry.getInstalledContribution(curi); ClassLoader cl = new URLClassLoader(new URL[]{new URL(ic.getURL())}, Remotable.class.getClassLoader()); return cl.loadClass(((JavaInterface)iface).getName()); } } return null; } }
private static Class<?> findInterface(Endpoint endpoint, DomainRegistry domainRegistry) throws MalformedURLException, ClassNotFoundException { Interface iface = endpoint.getService().getInterfaceContract().getInterface(); if (iface instanceof JavaInterface) { String curi = domainRegistry.getContainingCompositesContributionURI(endpoint.getComponent().getName()); if (curi != null) { ContributionDescription ic = domainRegistry.getInstalledContribution(curi); ClassLoader cl = new URLClassLoader(new URL[]{new URL(ic.getURL())}, Remotable.class.getClassLoader()); return cl.loadClass(((JavaInterface)iface).getName()); } } return null; } }
private void findInterface(Endpoint endpoint) throws MalformedURLException, ClassNotFoundException { Interface iface = endpoint.getService().getInterfaceContract().getInterface(); if (iface instanceof JavaInterface) { String curi = domainRegistry.getContainingCompositesContributionURI(endpoint.getComponent().getName()); if (curi != null) { ContributionDescription ic = domainRegistry.getInstalledContribution(curi); ClassLoader cl = new URLClassLoader(new URL[]{new URL(ic.getURL())}); serviceInterface = cl.loadClass(((JavaInterface)iface).getName()); } } }
private void findInterface(Endpoint endpoint) throws MalformedURLException, ClassNotFoundException { Interface iface = endpoint.getService().getInterfaceContract().getInterface(); if (iface instanceof JavaInterface) { String curi = domainRegistry.getContainingCompositesContributionURI(endpoint.getComponent().getName()); if (curi != null) { ContributionDescription ic = domainRegistry.getInstalledContribution(curi); ClassLoader cl = new URLClassLoader(new URL[]{new URL(ic.getURL())}); serviceInterface = cl.loadClass(((JavaInterface)iface).getName()); } } }
if (!component.getName().equals(componentName)) { continue;
if (!component.getName().equals(componentName)) { continue;
} catch (WSDLGenerationException ex) { if (ex.getProblem() != null) { warning(monitor, "WsdlGenProblem", wsBinding, component.getName(), contract.getName()); if (monitor != null) { monitor.problem(ex.getProblem()); warning(monitor, "WsdlGenException", wsBinding, component.getName(), contract.getName()); error(monitor, "WsdlGenException2", wsBinding, (Exception)ex.getCause()); } else { // should never happen warning(monitor, "WsdlGenException", wsBinding, component.getName(), contract.getName()); error(monitor, "WsdlGenException2", wsBinding, component.getName(), contract.getName(), ex.getMessage());
if (compositeComponent.getName().equals(componentName)) { component = compositeComponent; break;
monitor.pushContext("Component: " + component.getName());
private void reconcileReferenceMultiplicity(Component component, Reference componentReference, Reference componentTypeReference, Monitor monitor) { if (componentReference.getMultiplicity() != null) { if (!isValidMultiplicityOverride(componentTypeReference.getMultiplicity(), componentReference .getMultiplicity())) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "ReferenceIncompatibleMultiplicity", component.getName(), componentReference.getName()); } } else { componentReference.setMultiplicity(componentTypeReference.getMultiplicity()); } }
monitor.pushContext("Component: " + component.getName());
monitor.pushContext("Component: " + component.getName());
private void reconcileReferenceMultiplicity(Component component, Reference componentReference, Reference componentTypeReference, Monitor monitor) { if (componentReference.getMultiplicity() != null) { if (!isValidMultiplicityOverride(componentTypeReference.getMultiplicity(), componentReference .getMultiplicity())) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "ReferenceIncompatibleMultiplicity", component.getName(), componentReference.getName()); } } else { componentReference.setMultiplicity(componentTypeReference.getMultiplicity()); } }
/** * Choose the physical binding for reference-side remotable binding.sca * @param endpointReference * @return */ protected QName chooseBinding(RuntimeEndpointReference endpointReference) { DomainRegistry domainRegistry = endpointReference.getCompositeContext().getEndpointRegistry(); boolean distributed = alwaysDistributed || domainRegistry.isDistributed(); if(endpointReference.getTargetEndpoint().isRemote()) { RuntimeComponentReference ref = (RuntimeComponentReference)endpointReference.getReference(); if(ref.getInterfaceContract() != null && !ref.getInterfaceContract().getInterface().isRemotable()) { throw new ServiceRuntimeException("Reference interface not remotable for component: " + endpointReference.getComponent().getName() + " and reference: " + ref.getName()); } if(distributed && isBindingSupported(defaultMappedBinding)) { return defaultMappedBinding; } } return defaultLocalBinding; }
/** * Choose the physical binding for reference-side remotable binding.sca * @param endpointReference * @return */ protected QName chooseBinding(RuntimeEndpointReference endpointReference) { DomainRegistry domainRegistry = endpointReference.getCompositeContext().getEndpointRegistry(); boolean distributed = alwaysDistributed || domainRegistry.isDistributed(); if(endpointReference.getTargetEndpoint().isRemote()) { RuntimeComponentReference ref = (RuntimeComponentReference)endpointReference.getReference(); if(ref.getInterfaceContract() != null && !ref.getInterfaceContract().getInterface().isRemotable()) { throw new ServiceRuntimeException("Reference interface not remotable for component: " + endpointReference.getComponent().getName() + " and reference: " + ref.getName()); } if(distributed && isBindingSupported(defaultMappedBinding)) { return defaultMappedBinding; } } return defaultLocalBinding; }