@Override public Object clone() throws CloneNotSupportedException { ServiceImpl clone = (ServiceImpl)super.clone(); clone.bindings = new ArrayList<Binding>(); for (Binding binding : getBindings()){ clone.bindings.add((Binding)binding.clone()); } return clone; }
@Override public Object clone() throws CloneNotSupportedException { ServiceImpl clone = (ServiceImpl)super.clone(); clone.bindings = new ArrayList<Binding>(); for (Binding binding : getBindings()){ clone.bindings.add((Binding)binding.clone()); } 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; }
@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; }
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; } }
Binding binding = matchedEndpoint.getBinding(); try { endpointReference.setBinding((Binding)binding.clone()); } catch (CloneNotSupportedException e) {
service.setInterfaceContract(endpoint.getComponentServiceInterfaceContract()); if (endpoint.getBinding() != null) { Binding binding = (Binding)endpoint.getBinding().clone(); service.getBindings().add(binding);
service.setInterfaceContract(endpoint.getComponentServiceInterfaceContract()); if (endpoint.getBinding() != null) { Binding binding = (Binding)endpoint.getBinding().clone(); service.getBindings().add(binding);
Binding clonedBinding = (Binding)binding.clone();
Binding clonedBinding = (Binding)binding.clone();
for ( Binding serviceBinding: serviceBindings ) { try { Binding referenceBinding = (Binding)serviceBinding.clone(); referenceBinding.setURI(null); callbackReference.getBindings().add(referenceBinding);
for ( Binding serviceBinding: serviceBindings ) { try { Binding referenceBinding = (Binding)serviceBinding.clone(); referenceBinding.setURI(null); callbackReference.getBindings().add(referenceBinding);
callbackBinding = (Binding)forwardBinding.clone(); } catch (CloneNotSupportedException ex){
binding = (Binding)getBinding().clone(); } catch (Exception ex){