@Override public Object clone() throws CloneNotSupportedException { ReferenceImpl clone = (ReferenceImpl)super.clone(); clone.bindings = new ArrayList<Binding>(); for (Binding binding : getBindings()){ clone.bindings.add((Binding)binding.clone()); } clone.targets = new ArrayList<ComponentService>(targets); // clone the endpoint references themselves and set the reference pointer back to // this new refrence clone.endpointReferences = new ArrayList<EndpointReference>(); for (EndpointReference epr : endpointReferences) { EndpointReference eprClone = (EndpointReference)epr.clone(); eprClone.setReference((ComponentReference)clone); clone.endpointReferences.add(eprClone); } return clone; }
@Override public Object clone() throws CloneNotSupportedException { ReferenceImpl clone = (ReferenceImpl)super.clone(); clone.bindings = new ArrayList<Binding>(); for (Binding binding : getBindings()){ clone.bindings.add((Binding)binding.clone()); } clone.targets = new ArrayList<ComponentService>(targets); // clone the endpoint references themselves and set the reference pointer back to // this new refrence clone.endpointReferences = new ArrayList<EndpointReference>(); for (EndpointReference epr : endpointReferences) { EndpointReference eprClone = (EndpointReference)epr.clone(); eprClone.setReference((ComponentReference)clone); clone.endpointReferences.add(eprClone); } return clone; }
/** * Copy a higher level EndpointReference down to a lower level reference which it promotes * @param epRef - the endpoint reference * @param promotedReference - the promoted reference * @return - a copy of the EndpointReference with data merged from the promoted reference */ private EndpointReference copyHigherReference(EndpointReference epRef, ComponentReference promotedReference) { EndpointReference epRefClone = null; try { epRefClone = (EndpointReference)epRef.clone(); } catch (Exception e) { throw new ServiceRuntimeException(e); } // end try // Copy across details of the inner reference //ComponentReference ref = epRefClone.getReference(); //FIXME epRefClone.setReference(promotedReference); return epRefClone; }
/** * Copy a higher level EndpointReference down to a lower level reference which it promotes * @param epRef - the endpoint reference * @param promotedReference - the promoted reference * @return - a copy of the EndpointReference with data merged from the promoted reference */ private EndpointReference copyHigherReference(EndpointReference epRef, ComponentReference promotedReference) { EndpointReference epRefClone = null; try { epRefClone = (EndpointReference)epRef.clone(); } catch (Exception e) { throw new ServiceRuntimeException(e); } // end try // Copy across details of the inner reference //ComponentReference ref = epRefClone.getReference(); //FIXME epRefClone.setReference(promotedReference); return epRefClone; }
/** * Copy a higher level EndpointReference down to a lower level reference which it promotes * @param epRef - the endpoint reference * @param promotedReference - the promoted reference * @return - a copy of the EndpointReference with data merged from the promoted reference */ private EndpointReference copyHigherReference(EndpointReference epRef, ComponentReference promotedReference) { EndpointReference epRefClone = null; try { epRefClone = (EndpointReference)epRef.clone(); } catch (Exception e) { throw new ServiceRuntimeException(e); // Ignore (we know that EndpointReference2 can be cloned) } // end try // Copy across details of the inner reference // ComponentReference ref = epRefClone.getReference(); //FIXME epRefClone.setReference(promotedReference); return epRefClone; }
/** * Copy a higher level EndpointReference down to a lower level reference which it promotes * @param epRef - the endpoint reference * @param promotedReference - the promoted reference * @return - a copy of the EndpointReference with data merged from the promoted reference */ private EndpointReference copyHigherReference(EndpointReference epRef, ComponentReference promotedReference) { EndpointReference epRefClone = null; try { epRefClone = (EndpointReference)epRef.clone(); } catch (Exception e) { throw new ServiceRuntimeException(e); // Ignore (we know that EndpointReference2 can be cloned) } // end try // Copy across details of the inner reference // ComponentReference ref = epRefClone.getReference(); //FIXME epRefClone.setReference(promotedReference); return epRefClone; }
/** * 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
/** * 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
/** * 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
/** * 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 RuntimeEndpointReference clone_bind(RuntimeComponentReference reference, org.apache.tuscany.sca.assembly.Endpoint callbackEndpoint) { try { // clone the callback reference ready to configure it for this callback endpoint RuntimeComponentReference ref = (RuntimeComponentReference)reference.clone(); ref.getTargets().clear(); ref.getBindings().clear(); ref.getEndpointReferences().clear(); // clone epr EndpointReference callbackEndpointReference = (EndpointReference)reference.getEndpointReferences().get(0).clone(); callbackEndpointReference.setReference(ref); callbackEndpointReference.setTargetEndpoint(callbackEndpoint); callbackEndpointReference.setUnresolved(true); // The callback endpoint will be resolved when the wire chains are created ref.getEndpointReferences().add(callbackEndpointReference); return (RuntimeEndpointReference) ref.getEndpointReferences().get(0); } catch ( CloneNotSupportedException e ) { return null; } // end try clone_bind } // end method
Binding binding = reference.getBindings().get(0); endpointReference.setComponent(component); endpointReference.setReference(reference); reference.getEndpointReferences().add(endpointReference); endpointReference.setBinding(binding);
Binding binding = reference.getBindings().get(0); endpointReference.setComponent(component); endpointReference.setReference(reference); reference.getEndpointReferences().add(endpointReference); endpointReference.setBinding(binding);
endpointReference.setReference(componentReference); endpointReference.setBinding(endpoint.getBinding()); endpointReference.setUnresolved(false);
endpointReference.setReference(componentReference); endpointReference.setBinding(endpoint.getBinding()); endpointReference.setUnresolved(false);
endpointReference.setReference(componentReference); endpointReference.setBinding(endpoint.getBinding()); endpointReference.setUnresolved(false);
endpointReference.setReference(componentReference); endpointReference.setBinding(endpoint.getBinding()); endpointReference.setUnresolved(false);
endpointReference.setReference(componentReference); endpointReference.setBinding(endpoint.getBinding()); endpointReference.setUnresolved(false);