new skelton classes

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@798269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
giorgio 2009-07-27 19:45:50 +00:00
parent d758f6fb9a
commit 74e1c417b4
4 changed files with 36 additions and 0 deletions

View file

@ -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;
}
}