Rename getInterfaceContract() of Endpoint/EndpointReference
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882263 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8bab020d7e
commit
2d79e8c24e
12 changed files with 14 additions and 38 deletions
|
|
@ -104,7 +104,7 @@ public class EndpointProcessor extends BaseAssemblyProcessor implements StAXArti
|
|||
ComponentService service = (ComponentService)endpoint.getService().clone();
|
||||
component.getServices().add(service);
|
||||
service.getBindings().clear();
|
||||
service.setInterfaceContract(endpoint.getInterfaceContract());
|
||||
service.setInterfaceContract(endpoint.getComponentServiceInterfaceContract());
|
||||
Binding binding = (Binding)endpoint.getBinding().clone();
|
||||
service.getBindings().add(binding);
|
||||
return composite;
|
||||
|
|
|
|||
|
|
@ -93,14 +93,7 @@ public interface Endpoint extends Base, PolicySubject, Cloneable, Serializable {
|
|||
*
|
||||
* @return the interface contract
|
||||
*/
|
||||
InterfaceContract getInterfaceContract();
|
||||
|
||||
/**
|
||||
* Sets the interface contract defining the interface
|
||||
*
|
||||
* @param interfaceContract the interface contract
|
||||
*/
|
||||
void setInterfaceContract(InterfaceContract interfaceContract);
|
||||
InterfaceContract getComponentServiceInterfaceContract();
|
||||
|
||||
/**
|
||||
* Get the service's callback endpoint references that
|
||||
|
|
|
|||
|
|
@ -121,14 +121,7 @@ public interface EndpointReference extends Base, PolicySubject, Cloneable, Seria
|
|||
*
|
||||
* @return the interface contract
|
||||
*/
|
||||
InterfaceContract getInterfaceContract();
|
||||
|
||||
/**
|
||||
* Sets the interface contract defining the interface
|
||||
*
|
||||
* @param interfaceContract the interface contract
|
||||
*/
|
||||
void setInterfaceContract(InterfaceContract interfaceContract);
|
||||
InterfaceContract getComponentReferenceInterfaceContract();
|
||||
|
||||
/**
|
||||
* Get the reference callback endpoint that
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public class EndpointImpl implements Endpoint {
|
|||
reset();
|
||||
}
|
||||
|
||||
public InterfaceContract getInterfaceContract() {
|
||||
public InterfaceContract getComponentServiceInterfaceContract() {
|
||||
resolve();
|
||||
if (interfaceContract == null && service != null) {
|
||||
interfaceContract = service.getInterfaceContract();
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class EndpointReferenceImpl implements EndpointReference {
|
|||
reset();
|
||||
}
|
||||
|
||||
public InterfaceContract getInterfaceContract() {
|
||||
public InterfaceContract getComponentReferenceInterfaceContract() {
|
||||
resolve();
|
||||
if (interfaceContract == null && reference != null) {
|
||||
interfaceContract = reference.getInterfaceContract();
|
||||
|
|
|
|||
|
|
@ -111,9 +111,6 @@ public class EndpointBuilderImpl implements CompositeBuilder {
|
|||
Endpoint endpoint = assemblyFactory.createEndpoint();
|
||||
endpoint.setComponent(component);
|
||||
endpoint.setService(service);
|
||||
if (service != null) {
|
||||
endpoint.setInterfaceContract(service.getInterfaceContract());
|
||||
}
|
||||
endpoint.setBinding(binding);
|
||||
endpoint.setUnresolved(false);
|
||||
service.getEndpoints().add(endpoint);
|
||||
|
|
|
|||
|
|
@ -903,9 +903,6 @@ public class EndpointReferenceBuilderImpl {
|
|||
EndpointReference endpointRef = assemblyFactory.createEndpointReference();
|
||||
endpointRef.setComponent(component);
|
||||
endpointRef.setReference(reference);
|
||||
if (reference != null) {
|
||||
endpointRef.setInterfaceContract(reference.getInterfaceContract());
|
||||
}
|
||||
endpointRef.setUnresolved(unresolved);
|
||||
return endpointRef;
|
||||
} // end method createEndpointRef
|
||||
|
|
@ -921,9 +918,6 @@ public class EndpointReferenceBuilderImpl {
|
|||
Endpoint endpoint = createEndpoint(unresolved);
|
||||
endpoint.setComponent(component);
|
||||
endpoint.setService(service);
|
||||
if (service != null) {
|
||||
endpoint.setInterfaceContract(service.getInterfaceContract());
|
||||
}
|
||||
endpoint.setUnresolved(unresolved);
|
||||
return endpoint;
|
||||
} // end method createEndpoint
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
|
|||
}
|
||||
bindingInterfaceContract = getBindingProvider().getBindingInterfaceContract();
|
||||
if (bindingInterfaceContract == null) {
|
||||
bindingInterfaceContract = getInterfaceContract();
|
||||
bindingInterfaceContract = getComponentServiceInterfaceContract();
|
||||
}
|
||||
if (bindingInterfaceContract == null) {
|
||||
bindingInterfaceContract = getComponentTypeServiceInterfaceContract();
|
||||
|
|
@ -535,11 +535,11 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
|
|||
return serviceInterfaceContract;
|
||||
}
|
||||
if (service == null) {
|
||||
return getInterfaceContract();
|
||||
return getComponentServiceInterfaceContract();
|
||||
}
|
||||
serviceInterfaceContract = getLeafContract(service).getInterfaceContract();
|
||||
if (serviceInterfaceContract == null) {
|
||||
serviceInterfaceContract = getInterfaceContract();
|
||||
serviceInterfaceContract = getComponentServiceInterfaceContract();
|
||||
}
|
||||
return serviceInterfaceContract;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
|
|||
}
|
||||
bindingInterfaceContract = getBindingProvider().getBindingInterfaceContract();
|
||||
if (bindingInterfaceContract == null) {
|
||||
bindingInterfaceContract = getInterfaceContract();
|
||||
bindingInterfaceContract = getComponentReferenceInterfaceContract();
|
||||
}
|
||||
if (bindingInterfaceContract == null) {
|
||||
bindingInterfaceContract = getComponentTypeReferenceInterfaceContract();
|
||||
|
|
@ -479,11 +479,11 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
|
|||
return referenceInterfaceContract;
|
||||
}
|
||||
if (reference == null) {
|
||||
return getInterfaceContract();
|
||||
return getComponentReferenceInterfaceContract();
|
||||
}
|
||||
referenceInterfaceContract = getLeafContract(reference).getInterfaceContract();
|
||||
if (referenceInterfaceContract == null) {
|
||||
referenceInterfaceContract = getInterfaceContract();
|
||||
referenceInterfaceContract = getComponentReferenceInterfaceContract();
|
||||
}
|
||||
return referenceInterfaceContract;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ public class ComponentContextImpl implements RuntimeComponentContext {
|
|||
RuntimeEndpoint endpoint) {
|
||||
try {
|
||||
if (businessInterface == null) {
|
||||
InterfaceContract contract = endpoint.getInterfaceContract();
|
||||
InterfaceContract contract = endpoint.getComponentTypeServiceInterfaceContract();
|
||||
businessInterface = (Class<B>)((JavaInterface)contract.getInterface()).getJavaClass();
|
||||
}
|
||||
RuntimeEndpointReference ref =
|
||||
|
|
@ -369,7 +369,6 @@ public class ComponentContextImpl implements RuntimeComponentContext {
|
|||
endpointReference.setReference(componentReference);
|
||||
endpointReference.setBinding(endpoint.getBinding());
|
||||
endpointReference.setUnresolved(false);
|
||||
endpointReference.setInterfaceContract(interfaceContract);
|
||||
endpointReference.setStatus(EndpointReference.WIRED_TARGET_FOUND_READY_FOR_MATCHING);
|
||||
|
||||
endpointReference.setTargetEndpoint(endpoint);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class EndpointHelper {
|
|||
}
|
||||
|
||||
private static List<String> getInterfaces(Endpoint endpoint) {
|
||||
Interface intf = endpoint.getInterfaceContract().getInterface();
|
||||
Interface intf = endpoint.getComponentServiceInterfaceContract().getInterface();
|
||||
JavaInterface javaInterface = (JavaInterface)intf;
|
||||
return Collections.singletonList(javaInterface.getName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ public class EndpointIntrospector {
|
|||
Endpoint ep = (Endpoint)endpoint.getProperties().get(Endpoint.class.getName());
|
||||
if (ep != null) {
|
||||
bindings = Collections.singletonList(ep.getBinding());
|
||||
interfaces = Collections.singletonList(((JavaInterface)ep.getInterfaceContract().getInterface()).getName());
|
||||
interfaces = Collections.singletonList(((JavaInterface)ep.getComponentServiceInterfaceContract().getInterface()).getName());
|
||||
intents = ep.getRequiredIntents();
|
||||
} else {
|
||||
Map<String, Object> properties = endpoint.getProperties();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue