diff options
Diffstat (limited to 'sandbox/giorgio/binding-p2p/src/main/java')
4 files changed, 36 insertions, 0 deletions
diff --git a/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PBindingPolicedInvoker.java b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PBindingPolicedInvoker.java new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PBindingPolicedInvoker.java diff --git a/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PBindingProviderFactory.java b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PBindingProviderFactory.java new file mode 100644 index 0000000000..f4a3c6411a --- /dev/null +++ b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PBindingProviderFactory.java @@ -0,0 +1,36 @@ +import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.invocation.MessageFactory; +import org.apache.tuscany.sca.provider.BindingProviderFactory; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeComponent; +import org.apache.tuscany.sca.runtime.RuntimeComponentReference; +import org.apache.tuscany.sca.runtime.RuntimeComponentService; + + + +/** + * Implementation of the P2P binding model. + */ +public class P2PBindingProviderFactory implements BindingProviderFactory<P2PBinding> { + + private MessageFactory messageFactory; + + public EchoBindingProviderFactory(ExtensionPointRegistry extensionPoints) { + ModelFactoryExtensionPoint factories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); + this.messageFactory = factories.getFactory(MessageFactory.class); + } + + public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, P2PBinding binding) { + return new P2PReferenceBindingProvider(component, reference, binding); + } + + public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service,P2PBinding binding) { + return new P2PServiceBindingProvider(component, service, binding, messageFactory); + } + + public Class<EchoBinding> getModelType() { + return P2PBinding.class; + } +} diff --git a/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PReferenceBindingProvider.java b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PReferenceBindingProvider.java new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PReferenceBindingProvider.java diff --git a/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PServiceBindingProvider.java b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PServiceBindingProvider.java new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/sandbox/giorgio/binding-p2p/src/main/java/org/apache/tuscany/sca/binding/p2p/P2PServiceBindingProvider.java |