From 3b5d3b84eebcf28da41048372d47fe19a9d51643 Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 4 May 2009 07:06:24 +0000 Subject: TUSCANY-2968 - Minor update to make serice providers follow the same implementation pattern git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@771212 13f79535-47bb-0310-9956-ffa450edef68 --- .../binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java | 8 +++++--- .../jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java | 2 +- .../jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java | 6 +++++- .../jsonrpc/provider/JSONRPCWireFormatServiceProvider.java | 3 +-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java index e9e5b43944..a94fc91735 100644 --- a/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java +++ b/branches/sca-java-1.x/itest/http-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java @@ -24,6 +24,8 @@ import junit.framework.Assert; import org.apache.tuscany.sca.host.embedded.SCADomain; import org.json.JSONObject; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; @@ -41,15 +43,15 @@ public class JSONRPCServiceTestCase { private static final String SERVICE_URL = "http://localhost:8085/" + SERVICE_PATH; - private SCADomain domain; + private static SCADomain domain; //@BeforeClass - public void setUp() throws Exception { + public static void setUp() throws Exception { domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCBinding.composite"); } //@AfterClass - public void tearDown() throws Exception { + public static void tearDown() throws Exception { domain.close(); } diff --git a/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java index 12c4bd7cf4..4fcc933d1b 100644 --- a/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java +++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java @@ -44,7 +44,7 @@ public class JSONRPCOperationSelectorProviderFactory implements OperationSelecto public OperationSelectorProvider createServiceOperationSelectorProvider(RuntimeComponent component, RuntimeComponentService service, Binding binding) { - return new JSONRPCOperationSelectorServiceProvider(component, service, binding); + return new JSONRPCOperationSelectorServiceProvider(extensionPoints, component, service, binding); } public Class getModelType() { diff --git a/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java index d1581fff95..d3591fe5f3 100644 --- a/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java +++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java @@ -24,6 +24,7 @@ import org.apache.tuscany.sca.assembly.BindingRRB; import org.apache.tuscany.sca.assembly.OperationSelector; import org.apache.tuscany.sca.binding.http.HTTPBinding; import org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelector; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.invocation.Interceptor; import org.apache.tuscany.sca.invocation.Phase; import org.apache.tuscany.sca.provider.OperationSelectorProvider; @@ -35,7 +36,10 @@ public class JSONRPCOperationSelectorServiceProvider implements OperationSelecto private RuntimeComponentService service; private Binding binding; - public JSONRPCOperationSelectorServiceProvider(RuntimeComponent component, RuntimeComponentService service, Binding binding) { + public JSONRPCOperationSelectorServiceProvider(ExtensionPointRegistry extensionPoints, + RuntimeComponent component, + RuntimeComponentService service, + Binding binding) { super(); this.component = component; this.service = service; diff --git a/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java index 91d35546ae..2d5d00eba8 100644 --- a/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java +++ b/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java @@ -52,8 +52,7 @@ public class JSONRPCWireFormatServiceProvider implements WireFormatProvider { } public InterfaceContract configureWireFormatInterfaceContract(InterfaceContract interfaceContract) { - // TODO Auto-generated method stub - return null; + return interfaceContract; } public Interceptor createInterceptor() { -- cgit v1.2.3