/** * Helper method to create an Endpoint * @param unresolved * @return the endpoint */ private Endpoint createEndpoint(boolean unresolved) { Endpoint endpoint = assemblyFactory.createEndpoint(); endpoint.setUnresolved(unresolved); return endpoint; } // end method createEndpoint
protected String getContext() { if (subject instanceof Endpoint) { Endpoint endpoint = (Endpoint)subject; return endpoint.getURI(); } else if (subject instanceof EndpointReference) { EndpointReference endpointReference = (EndpointReference)subject; return endpointReference.getURI(); } else if (subject instanceof Component) { Component component = (Component)subject; return component.getURI(); } return null; }
@Override public InterfaceContract getBindingInterfaceContract() { return endpoint.getReference().getInterfaceContract(); }
/** * Helper method to create an Endpoint Reference * @param component * @param reference * @param unresolved * @return the endpoint reference */ private EndpointReference createEndpointRef(Component component, ComponentReference reference, boolean unresolved) { EndpointReference endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); endpointRef.setUnresolved(unresolved); return endpointRef; } // end method createEndpointRef
public String getURI() { if (uri == null) { if (component != null && reference != null && binding != null) { String bindingName = binding.getName(); if (bindingName == null) { bindingName = reference.getName(); } uri = component.getURI() + "#reference-binding(" + reference.getName() + "/" + bindingName + ")"; } else if (component != null && reference != null) { uri = component.getURI() + "#reference(" + reference.getName() + ")"; } else if (component != null) { uri = component.getURI(); } } return uri; }
public String getURI() { if (uri == null) { if (component != null && service != null && binding != null) { String bindingName = binding.getName(); if (bindingName == null) { bindingName = service.getName(); } uri = component.getURI() + "#service-binding(" + service.getName() + "/" + bindingName + ")"; } else if (component != null && service != null) { uri = component.getURI() + "#service(" + service.getName() + ")"; } else if (component != null) { uri = component.getURI(); } } return uri; }
public RMIReferenceBindingProvider(EndpointReference endpointReference, RMIHost rmiHost) { this.reference = (RuntimeComponentReference)endpointReference.getReference(); this.binding = (RMIBinding)endpointReference.getBinding(); this.rmiHost = rmiHost; }
protected Binding getBinding(Contract contract, String name, boolean isCallback) { List<Binding> bindings = null; if ( isCallback ) { bindings = contract.getCallback().getBindings(); } else { bindings = contract.getBindings(); } for (Binding binding : bindings) { if (name.equals(binding.getName())) { return binding; } } return null; }
@Override public Object clone() throws CloneNotSupportedException { EndpointReference cloned = (EndpointReference)super.clone(); if (targetEndpoint != null) { cloned.setTargetEndpoint((Endpoint)targetEndpoint.clone()); } return cloned; }
private void processComponentType(SpringImplementation springImplementation) { // Create a ComponentType and mark it unresolved ComponentType componentType = assemblyFactory.createComponentType(); componentType.setUnresolved(true); springImplementation.setComponentType(componentType); } // end processComponentType
@Override public List<Reference> getReferences() { if (componentType != null){ return componentType.getReferences(); } else { return null; } }
/** * Evaluates whether the bindings attached to a reference identify one or more target services. * @param reference - the reference * @return true if the bindings identify a target, false otherwise */ private boolean bindingsIdentifyTargets(ComponentReference reference) { for (Binding binding : reference.getBindings()) { return true; } return false; }
/** * Helper method to create an Endpoint Reference * @param component * @param reference * @param unresolved * @return the endpoint reference */ private EndpointReference createEndpointRef(Component component, ComponentReference reference, boolean unresolved) { EndpointReference endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); endpointRef.setUnresolved(unresolved); return endpointRef; } // end method createEndpointRef
public String getURI() { if (uri == null) { if (component != null && reference != null && binding != null) { String bindingName = binding.getName(); if (bindingName == null) { bindingName = reference.getName(); } uri = component.getURI() + "#reference-binding(" + reference.getName() + "/" + bindingName + ")"; } else if (component != null && reference != null) { uri = component.getURI() + "#reference(" + reference.getName() + ")"; } else if (component != null) { uri = component.getURI(); } } return uri; }
protected String getContext() { if (subject instanceof Endpoint) { Endpoint endpoint = (Endpoint)subject; return endpoint.getURI(); } else if (subject instanceof EndpointReference) { EndpointReference endpointReference = (EndpointReference)subject; return endpointReference.getURI(); } else if (subject instanceof Component) { Component component = (Component)subject; return component.getURI(); } return null; }
/** * Helper method to create an Endpoint * @param unresolved * @return the endpoint */ private Endpoint createEndpoint(boolean unresolved) { Endpoint endpoint = assemblyFactory.createEndpoint(); endpoint.setUnresolved(unresolved); return endpoint; } // end method createEndpoint
/** * Helper method to create an Endpoint Reference * @param component * @param reference * @param unresolved * @return the endpoint reference */ private EndpointReference createEndpointRef(Component component, ComponentReference reference, boolean unresolved) { EndpointReference endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); endpointRef.setUnresolved(unresolved); return endpointRef; } // end method createEndpointRef
private String getContext() { if (subject instanceof Endpoint) { Endpoint endpoint = (Endpoint)subject; return endpoint.getURI(); } else if (subject instanceof EndpointReference) { EndpointReference endpointReference = (EndpointReference)subject; return endpointReference.getURI(); } else if (subject instanceof Component) { Component component = (Component)subject; return component.getURI(); } return null; }
/** * Helper method to create an Endpoint * @param unresolved * @return the endpoint */ private Endpoint createEndpoint(boolean unresolved) { Endpoint endpoint = assemblyFactory.createEndpoint(); endpoint.setUnresolved(unresolved); return endpoint; } // end method createEndpoint
/** * Helper method to create an Endpoint * @param unresolved * @return the endpoint */ private Endpoint createEndpoint(boolean unresolved) { Endpoint endpoint = assemblyFactory.createEndpoint(); endpoint.setUnresolved(unresolved); return endpoint; } // end method createEndpoint