You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2006/09/10 03:58:53 UTC
svn commit: r441886 [2/2] - in /incubator/tuscany/java/sca: bindings/
bindings/binding.celtix/src/test/java/org/apache/tuscany/binding/celtix/
bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/
containers/container.groovy/src/ma...
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/integration/component/OutboundWireToJavaTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/integration/component/OutboundWireToJavaTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/integration/component/OutboundWireToJavaTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/integration/component/OutboundWireToJavaTestCase.java Sat Sep 9 18:58:51 2006
@@ -73,8 +73,8 @@
public void testToStatelessScope() throws Exception {
StatelessScopeContainer scope = new StatelessScopeContainer(workContext);
scope.start();
- final OutboundWire<Target> wire = getWire(scope);
- Target service = wireService.createProxy(wire);
+ final OutboundWire wire = getWire(scope);
+ Target service = (Target) wireService.createProxy(wire);
assertNotNull(service);
service.setString("foo");
assertEquals(null, service.getString());
@@ -87,8 +87,8 @@
scope.onEvent(new RequestStart(this));
- final OutboundWire<Target> wire = getWire(scope);
- Target service = wireService.createProxy(wire);
+ final OutboundWire wire = getWire(scope);
+ Target service = (Target) wireService.createProxy(wire);
assertNotNull(service);
service.setString("foo");
@@ -97,8 +97,8 @@
FutureTask<Void> future = new FutureTask<Void>(new Runnable() {
public void run() {
scope.onEvent(new RequestStart(this));
- Target service2 = wireService.createProxy(wire);
- Target target2 = wireService.createProxy(wire);
+ Target service2 = (Target) wireService.createProxy(wire);
+ Target target2 = (Target) wireService.createProxy(wire);
assertEquals(null, service2.getString());
service2.setString("bar");
assertEquals("bar", service2.getString());
@@ -121,9 +121,9 @@
workContext.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session1);
scope.onEvent(new HttpSessionStart(this, session1));
- final OutboundWire<Target> wire = getWire(scope);
- Target service = wireService.createProxy(wire);
- Target target = wireService.createProxy(wire);
+ final OutboundWire wire = getWire(scope);
+ Target service = (Target) wireService.createProxy(wire);
+ Target target = (Target) wireService.createProxy(wire);
assertNotNull(service);
service.setString("foo");
assertEquals("foo", service.getString());
@@ -136,10 +136,10 @@
workContext.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session2);
scope.onEvent(new HttpSessionStart(this, session2));
- Target service2 = wireService.createProxy(wire);
+ Target service2 = (Target) wireService.createProxy(wire);
assertNotNull(service2);
assertNull(service2.getString());
- Target target2 = wireService.createProxy(wire);
+ Target target2 = (Target) wireService.createProxy(wire);
service2.setString("bar");
assertEquals("bar", service2.getString());
assertEquals("bar", target2.getString());
@@ -160,9 +160,9 @@
ModuleScopeContainer scope = new ModuleScopeContainer(workContext);
scope.start();
scope.onEvent(new CompositeStart(this, null));
- final OutboundWire<Target> wire = getWire(scope);
- Target service = wireService.createProxy(wire);
- Target target = wireService.createProxy(wire);
+ final OutboundWire wire = getWire(scope);
+ Target service = (Target) wireService.createProxy(wire);
+ Target target = (Target) wireService.createProxy(wire);
assertNotNull(service);
service.setString("foo");
assertEquals("foo", service.getString());
@@ -172,10 +172,10 @@
}
@SuppressWarnings("unchecked")
- private OutboundWire<Target> getWire(ScopeContainer scope) throws NoSuchMethodException,
- InvalidServiceContractException {
+ private OutboundWire getWire(ScopeContainer scope) throws NoSuchMethodException,
+ InvalidServiceContractException {
ConnectorImpl connector = new ConnectorImpl();
- OutboundWire<Target> wire = createOutboundWire(new QualifiedName("target/Target"), Target.class);
+ OutboundWire wire = createOutboundWire(new QualifiedName("target/Target"), Target.class);
PojoConfiguration configuration = new PojoConfiguration();
configuration.setScopeContainer(scope);
@@ -189,9 +189,9 @@
return wire;
}
- public static <T> OutboundWire<T> createOutboundWire(QualifiedName targetName, Class<T> interfaze)
+ public static <T> OutboundWire createOutboundWire(QualifiedName targetName, Class<T> interfaze)
throws InvalidServiceContractException {
- OutboundWire<T> wire = new OutboundWireImpl<T>();
+ OutboundWire wire = new OutboundWireImpl();
JavaServiceContract contract = new JavaServiceContract(interfaze);
wire.setServiceContract(contract);
wire.setTargetName(targetName);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/mock/MockFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/mock/MockFactory.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/mock/MockFactory.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/mock/MockFactory.java Sat Sep 9 18:58:51 2006
@@ -246,15 +246,15 @@
return contexts;
}
- public static <T> InboundWire<T> createTargetWire(String serviceName, Class<T> interfaze)
+ public static <T> InboundWire createTargetWire(String serviceName, Class<T> interfaze)
throws InvalidServiceContractException {
return createServiceWire(serviceName, interfaze, null);
}
- public static <T> InboundWire<T> createServiceWire(String serviceName, Class<T> interfaze, Interceptor interceptor)
+ public static <T> InboundWire createServiceWire(String serviceName, Class<T> interfaze, Interceptor interceptor)
throws InvalidServiceContractException {
- InboundWire<T> wire = new InboundWireImpl<T>();
+ InboundWire wire = new InboundWireImpl();
ServiceContract<?> contract = REGISTRY.introspect(interfaze);
wire.setServiceContract(contract);
wire.setServiceName(serviceName);
@@ -263,10 +263,10 @@
return wire;
}
- public static <T> OutboundWire<T> createReferenceWire(String refName, Class<T> interfaze, Interceptor interceptor)
+ public static <T> OutboundWire createReferenceWire(String refName, Class<T> interfaze, Interceptor interceptor)
throws InvalidServiceContractException {
- OutboundWire<T> wire = new OutboundWireImpl<T>();
+ OutboundWire wire = new OutboundWireImpl();
wire.setReferenceName(refName);
Map<Operation<?>, OutboundInvocationChain> outboundChains = createOutboundChains(interfaze, interceptor);
wire.addInvocationChains(outboundChains);
@@ -275,9 +275,9 @@
return wire;
}
- public static <T> OutboundWire<T> createReferenceWire(String refName, Class<T> interfaze)
+ public static <T> OutboundWire createReferenceWire(String refName, Class<T> interfaze)
throws InvalidServiceContractException {
- OutboundWire<T> wire = new OutboundWireImpl<T>();
+ OutboundWire wire = new OutboundWireImpl();
wire.setReferenceName(refName);
wire.addInvocationChains(createOutboundChains(interfaze));
ServiceContract<?> contract = REGISTRY.introspect(interfaze);
@@ -293,8 +293,8 @@
* @param cacheable
* @throws Exception
*/
- public static void connect(OutboundWire<?> outboundWire,
- InboundWire<?> inboundWire,
+ public static void connect(OutboundWire outboundWire,
+ InboundWire inboundWire,
JavaAtomicComponent targetContext,
boolean cacheable) throws Exception {
if (inboundWire != null) {
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ScopeProcessorTestCase.java Sat Sep 9 18:58:51 2006
@@ -19,10 +19,12 @@
package org.apache.tuscany.core.implementation.processor;
import org.apache.tuscany.spi.component.CompositeComponent;
-import org.apache.tuscany.spi.model.Scope;
-import org.apache.tuscany.spi.implementation.java.ProcessingException;
-
+import org.apache.tuscany.spi.implementation.java.JavaMappedProperty;
+import org.apache.tuscany.spi.implementation.java.JavaMappedReference;
+import org.apache.tuscany.spi.implementation.java.JavaMappedService;
import org.apache.tuscany.spi.implementation.java.PojoComponentType;
+import org.apache.tuscany.spi.implementation.java.ProcessingException;
+import org.apache.tuscany.spi.model.Scope;
import org.jmock.Mock;
import org.jmock.MockObjectTestCase;
@@ -36,42 +38,48 @@
public void testModuleScope() throws ProcessingException {
ScopeProcessor processor = new ScopeProcessor();
- PojoComponentType type = new PojoComponentType();
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
+ new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
processor.visitClass(parent, Module.class, type, null);
assertEquals(Scope.MODULE, type.getImplementationScope());
}
public void testSessionScope() throws ProcessingException {
ScopeProcessor processor = new ScopeProcessor();
- PojoComponentType type = new PojoComponentType();
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
+ new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
processor.visitClass(parent, Session.class, type, null);
assertEquals(Scope.SESSION, type.getImplementationScope());
}
public void testRequestScope() throws ProcessingException {
ScopeProcessor processor = new ScopeProcessor();
- PojoComponentType type = new PojoComponentType();
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
+ new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
processor.visitClass(parent, Request.class, type, null);
assertEquals(Scope.REQUEST, type.getImplementationScope());
}
public void testCompositeScope() throws ProcessingException {
ScopeProcessor processor = new ScopeProcessor();
- PojoComponentType type = new PojoComponentType();
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
+ new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
processor.visitClass(parent, Composite.class, type, null);
assertEquals(Scope.COMPOSITE, type.getImplementationScope());
}
public void testStatelessScope() throws ProcessingException {
ScopeProcessor processor = new ScopeProcessor();
- PojoComponentType type = new PojoComponentType();
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
+ new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
processor.visitClass(parent, Stateless.class, type, null);
assertEquals(Scope.STATELESS, type.getImplementationScope());
}
public void testNoScope() throws ProcessingException {
ScopeProcessor processor = new ScopeProcessor();
- PojoComponentType type = new PojoComponentType();
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
+ new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
processor.visitClass(parent, None.class, type, null);
assertEquals(Scope.STATELESS, type.getImplementationScope());
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/builder/SystemComponentBuilderTestCase.java Sat Sep 9 18:58:51 2006
@@ -24,28 +24,26 @@
import org.apache.tuscany.spi.annotation.Autowire;
import org.apache.tuscany.spi.component.AtomicComponent;
import org.apache.tuscany.spi.deployer.DeploymentContext;
+import org.apache.tuscany.spi.idl.java.JavaServiceContract;
+import org.apache.tuscany.spi.implementation.java.ConstructorDefinition;
+import org.apache.tuscany.spi.implementation.java.JavaMappedProperty;
+import org.apache.tuscany.spi.implementation.java.JavaMappedReference;
+import org.apache.tuscany.spi.implementation.java.JavaMappedService;
+import org.apache.tuscany.spi.implementation.java.PojoComponentType;
import org.apache.tuscany.spi.model.ComponentDefinition;
import org.apache.tuscany.spi.model.PropertyValue;
import org.apache.tuscany.spi.model.ReferenceTarget;
import org.apache.tuscany.spi.model.Scope;
import org.apache.tuscany.spi.model.ServiceContract;
import org.apache.tuscany.spi.wire.OutboundWire;
-import org.apache.tuscany.spi.implementation.java.JavaMappedService;
import org.apache.tuscany.core.component.AutowireComponent;
import org.apache.tuscany.core.component.event.CompositeStart;
import org.apache.tuscany.core.component.event.CompositeStop;
import org.apache.tuscany.core.component.scope.ModuleScopeContainer;
-import org.apache.tuscany.spi.implementation.java.ConstructorDefinition;
-import org.apache.tuscany.spi.implementation.java.JavaMappedProperty;
-import org.apache.tuscany.spi.implementation.java.JavaMappedReference;
-import org.apache.tuscany.spi.implementation.java.PojoComponentType;
-import org.apache.tuscany.spi.idl.java.JavaServiceContract;
-
import org.apache.tuscany.core.implementation.system.model.SystemImplementation;
import org.apache.tuscany.core.implementation.system.wire.SystemInboundWire;
import org.apache.tuscany.core.injection.SingletonObjectFactory;
-
import org.jmock.Mock;
import org.jmock.MockObjectTestCase;
@@ -152,11 +150,11 @@
target.addTarget(new URI("foo"));
definition.add(target);
AtomicComponent<?> component = builder.build(parent, definition, deploymentContext);
- OutboundWire<Foo> wire = component.getOutboundWires().get("ref").get(0);
+ OutboundWire wire = component.getOutboundWires().get("ref").get(0);
Mock mock = mock(SystemInboundWire.class);
FooImpl targetFoo = new FooImpl();
mock.expects(once()).method("getTargetService").will(returnValue(targetFoo));
- wire.setTargetWire((SystemInboundWire<Foo>) mock.proxy());
+ wire.setTargetWire((SystemInboundWire) mock.proxy());
component.start();
FooImpl foo = (FooImpl) component.getServiceInstance();
assertNotNull(foo.ref);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/AtomicComponentWireInvocationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/AtomicComponentWireInvocationTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/AtomicComponentWireInvocationTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/AtomicComponentWireInvocationTestCase.java Sat Sep 9 18:58:51 2006
@@ -19,17 +19,17 @@
package org.apache.tuscany.core.implementation.system.wire;
import org.apache.tuscany.spi.QualifiedName;
-import org.apache.tuscany.core.implementation.PojoConfiguration;
-import org.apache.tuscany.core.injection.PojoObjectFactory;
import org.apache.tuscany.spi.wire.OutboundWire;
import org.apache.tuscany.core.component.scope.ModuleScopeContainer;
+import org.apache.tuscany.core.implementation.PojoConfiguration;
+import org.apache.tuscany.core.implementation.system.component.SystemAtomicComponent;
+import org.apache.tuscany.core.implementation.system.component.SystemAtomicComponentImpl;
+import org.apache.tuscany.core.injection.PojoObjectFactory;
import org.apache.tuscany.core.mock.component.Source;
import org.apache.tuscany.core.mock.component.SourceImpl;
import org.apache.tuscany.core.mock.component.Target;
import org.apache.tuscany.core.mock.component.TargetImpl;
-import org.apache.tuscany.core.implementation.system.component.SystemAtomicComponent;
-import org.apache.tuscany.core.implementation.system.component.SystemAtomicComponentImpl;
import org.jmock.Mock;
import org.jmock.MockObjectTestCase;
@@ -46,7 +46,7 @@
Target target = new TargetImpl();
Mock mockWire = mock(SystemInboundWire.class);
mockWire.expects(atLeastOnce()).method("getTargetService").will(returnValue(target));
- SystemInboundWire<Target> inboundWire = (SystemInboundWire<Target>) mockWire.proxy();
+ SystemInboundWire inboundWire = (SystemInboundWire) mockWire.proxy();
PojoConfiguration configuration = new PojoConfiguration();
configuration.setScopeContainer(scope);
@@ -54,12 +54,12 @@
configuration.addServiceInterface(Source.class);
configuration.setInstanceFactory(new PojoObjectFactory<SourceImpl>(SourceImpl.class.getConstructor()));
SystemAtomicComponent sourceContext = new SystemAtomicComponentImpl("source", configuration);
- OutboundWire<Target> outboundWire =
- new SystemOutboundWireImpl<Target>("setTarget", new QualifiedName("service"), Target.class);
+ QualifiedName qName = new QualifiedName("service");
+ OutboundWire outboundWire = new SystemOutboundWireImpl("setTarget", qName, Target.class);
outboundWire.setTargetWire(inboundWire);
sourceContext.addOutboundWire(outboundWire);
sourceContext.start();
- assertSame(((Source) sourceContext.getServiceInstance()).getTarget(),
- target); // wires should pass back direct ref
+ assertSame(((Source) sourceContext.getServiceInstance()).getTarget(), target);
+ // wires should pass back direct ref
}
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemInboundtoOutboundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemInboundtoOutboundTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemInboundtoOutboundTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemInboundtoOutboundTestCase.java Sat Sep 9 18:58:51 2006
@@ -34,8 +34,8 @@
Target target = new TargetImpl();
Mock mockWire = mock(SystemOutboundWire.class);
mockWire.expects(atLeastOnce()).method("getTargetService").will(returnValue(target));
- SystemOutboundWire<Target> outboundWire = (SystemOutboundWire<Target>) mockWire.proxy();
- SystemInboundWire<Target> inboundWire = new SystemInboundWireImpl<Target>("service", Target.class);
+ SystemOutboundWire outboundWire = (SystemOutboundWire) mockWire.proxy();
+ SystemInboundWire inboundWire = new SystemInboundWireImpl("service", Target.class);
inboundWire.setTargetWire(outboundWire);
assertSame(inboundWire.getTargetService(), target);
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowireTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowireTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundAutowireTestCase.java Sat Sep 9 18:58:51 2006
@@ -18,7 +18,7 @@
AutowireComponent<?> component = createMock(AutowireComponent.class);
expect(component.resolveInstance(Object.class)).andReturn(new Object());
replay(component);
- SystemOutboundAutowire<Object> wire = new SystemOutboundAutowire<Object>("foo", Object.class, component, false);
+ SystemOutboundAutowire wire = new SystemOutboundAutowire("foo", Object.class, component, false);
assertNotNull(wire.getTargetService());
verify(component);
}
@@ -28,7 +28,7 @@
AutowireComponent<?> component = createMock(AutowireComponent.class);
expect(component.resolveInstance(Object.class)).andReturn(null);
replay(component);
- SystemOutboundAutowire<Object> wire = new SystemOutboundAutowire<Object>("foo", Object.class, component, true);
+ SystemOutboundAutowire wire = new SystemOutboundAutowire("foo", Object.class, component, true);
try {
wire.getTargetService();
fail();
@@ -43,7 +43,7 @@
AutowireComponent<?> component = createMock(AutowireComponent.class);
expect(component.resolveInstance(Object.class)).andReturn(null);
replay(component);
- SystemOutboundAutowire<Object> wire = new SystemOutboundAutowire<Object>("foo", Object.class, component, false);
+ SystemOutboundAutowire wire = new SystemOutboundAutowire("foo", Object.class, component, false);
try {
assertNull(wire.getTargetService());
} catch (TargetNotFoundException e) {
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundToInboundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundToInboundTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundToInboundTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemOutboundToInboundTestCase.java Sat Sep 9 18:58:51 2006
@@ -36,9 +36,9 @@
Target target = new TargetImpl();
Mock mockWire = mock(SystemInboundWire.class);
mockWire.expects(atLeastOnce()).method("getTargetService").will(returnValue(target));
- SystemInboundWire<Target> inboundWire = (SystemInboundWire<Target>) mockWire.proxy();
- SystemOutboundWire<Target> outboundWire =
- new SystemOutboundWireImpl<Target>("setTarget", new QualifiedName("service"), Target.class);
+ SystemInboundWire inboundWire = (SystemInboundWire) mockWire.proxy();
+ SystemOutboundWire outboundWire =
+ new SystemOutboundWireImpl("setTarget", new QualifiedName("service"), Target.class);
outboundWire.setTargetWire(inboundWire);
assertSame(outboundWire.getTargetService(), target);
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemServiceComponentWireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemServiceComponentWireTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemServiceComponentWireTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/system/wire/SystemServiceComponentWireTestCase.java Sat Sep 9 18:58:51 2006
@@ -36,9 +36,9 @@
Target target = new TargetImpl();
Mock mockWire = mock(SystemOutboundWire.class);
mockWire.expects(atLeastOnce()).method("getTargetService").will(returnValue(target));
- SystemOutboundWire<Target> outboundWire = (SystemOutboundWire<Target>) mockWire.proxy();
+ SystemOutboundWire outboundWire = (SystemOutboundWire) mockWire.proxy();
- SystemInboundWire<Target> wire = new SystemInboundWireImpl<Target>("Target", Target.class);
+ SystemInboundWire wire = new SystemInboundWireImpl("Target", Target.class);
SystemService<Target> serviceContext = new SystemServiceImpl<Target>("service", null);
serviceContext.setInboundWire(wire);
serviceContext.setOutboundWire(outboundWire);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/injection/WireObjectFactoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/injection/WireObjectFactoryTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/injection/WireObjectFactoryTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/injection/WireObjectFactoryTestCase.java Sat Sep 9 18:58:51 2006
@@ -33,7 +33,7 @@
public class WireObjectFactoryTestCase extends TestCase {
public void testCreateInstance() throws Exception {
- RuntimeWire<?> wire = createMock(RuntimeWire.class);
+ RuntimeWire wire = createMock(RuntimeWire.class);
WireService service = createMock(WireService.class);
service.createProxy(wire);
expectLastCall().andReturn(null);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/mock/factories/MockFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/mock/factories/MockFactory.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/mock/factories/MockFactory.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/mock/factories/MockFactory.java Sat Sep 9 18:58:51 2006
@@ -156,9 +156,9 @@
return new SystemAtomicComponentImpl(name, configuration);
}
- public static <T> InboundWire<T> createTargetWireFactory(String serviceName, Class<T> interfaze)
+ public static <T> InboundWire createTargetWireFactory(String serviceName, Class<T> interfaze)
throws InvalidServiceContractException {
- InboundWire<T> wire = new InboundWireImpl<T>();
+ InboundWire wire = new InboundWireImpl();
wire.setServiceName(serviceName);
JavaServiceContract contract = new JavaServiceContract(interfaze);
wire.setServiceContract(contract);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/WireOptimizationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/WireOptimizationTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/WireOptimizationTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/WireOptimizationTestCase.java Sat Sep 9 18:58:51 2006
@@ -46,7 +46,7 @@
}
public void testSourceWireInterceptorOptimization() throws Exception {
- OutboundWire<?> wire = new OutboundWireImpl();
+ OutboundWire wire = new OutboundWireImpl();
OutboundInvocationChain chain = new OutboundInvocationChainImpl(operation);
chain.addInterceptor(new OptimizableInterceptor());
wire.addInvocationChain(operation, chain);
@@ -54,7 +54,7 @@
}
public void testSourceWireNonInterceptorOptimization() throws Exception {
- OutboundWire<?> wire = new OutboundWireImpl();
+ OutboundWire wire = new OutboundWireImpl();
OutboundInvocationChain chain = new OutboundInvocationChainImpl(operation);
chain.addInterceptor(new NonOptimizableInterceptor());
wire.addInvocationChain(operation, chain);
@@ -62,7 +62,7 @@
}
public void testTargetWireInterceptorOptimization() throws Exception {
- InboundWire<?> wire = new InboundWireImpl();
+ InboundWire wire = new InboundWireImpl();
InboundInvocationChain chain = new InboundInvocationChainImpl(operation);
chain.addInterceptor(new OptimizableInterceptor());
wire.addInvocationChain(operation, chain);
@@ -70,7 +70,7 @@
}
public void testTargetWireNonInterceptorOptimization() throws Exception {
- InboundWire<?> wire = new InboundWireImpl();
+ InboundWire wire = new InboundWireImpl();
InboundInvocationChain chain = new InboundInvocationChainImpl(operation);
chain.addInterceptor(new NonOptimizableInterceptor());
wire.addInvocationChain(operation, chain);
@@ -78,7 +78,7 @@
}
public void testTargetWireNonTargetInvokerOptimization() throws Exception {
- InboundWire<?> wire = new InboundWireImpl();
+ InboundWire wire = new InboundWireImpl();
InboundInvocationChain chain = new InboundInvocationChainImpl(operation);
TargetInvoker invoker = new StaticPojoTargetInvoker(m, new Object());
invoker.setCacheable(false);
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/Connector.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/Connector.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/Connector.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/Connector.java Sat Sep 9 18:58:51 2006
@@ -45,7 +45,7 @@
* @param optimizable if the bridge may be optimized
* @throws BuilderConfigException
*/
- void connect(InboundWire<?> inboundWire, OutboundWire<?> outboundWire, boolean optimizable)
+ void connect(InboundWire inboundWire, OutboundWire outboundWire, boolean optimizable)
throws BuilderConfigException;
}
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/WirePostProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/WirePostProcessor.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/WirePostProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/builder/WirePostProcessor.java Sat Sep 9 18:58:51 2006
@@ -32,12 +32,12 @@
* @param source
* @param target
*/
- void process(OutboundWire<?> source, InboundWire<?> target);
+ void process(OutboundWire source, InboundWire target);
/**
* @param source
* @param target
*/
- void process(InboundWire<?> source, OutboundWire<?> target);
+ void process(InboundWire source, OutboundWire target);
}
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Reference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Reference.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Reference.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Reference.java Sat Sep 9 18:58:51 2006
@@ -47,22 +47,22 @@
/**
* Returns the inbound wire for flowing a request through the reference
*/
- InboundWire<T> getInboundWire();
+ InboundWire getInboundWire();
/**
* Sets the inbound wire for flowing a request through the reference
*/
- void setInboundWire(InboundWire<T> wire);
+ void setInboundWire(InboundWire wire);
/**
* Returns the outbound wire used by the reference to connect to a target
*/
- OutboundWire<?> getOutboundWire();
+ OutboundWire getOutboundWire();
/**
* Sets the outbound wire used by the reference to connect to a target
*/
- void setOutboundWire(OutboundWire<?> wire);
+ void setOutboundWire(OutboundWire wire);
/**
* Callback to create a {@link org.apache.tuscany.spi.wire.TargetInvoker} which dispatches to the target service of
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Service.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Service.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Service.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/component/Service.java Sat Sep 9 18:58:51 2006
@@ -49,28 +49,28 @@
*
* @return the inbound wire for flowing a request through the service
*/
- InboundWire<T> getInboundWire();
+ InboundWire getInboundWire();
/**
* Sets the inbound wire for flowing a request through the service
*
* @param wire the inbound wire for flowing a request through the service
*/
- void setInboundWire(InboundWire<T> wire);
+ void setInboundWire(InboundWire wire);
/**
* Returns the outbound wire for flowing a request out of the service
*
* @return the outbound wire for flowing a request out of the service
*/
- OutboundWire<?> getOutboundWire();
+ OutboundWire getOutboundWire();
/**
* Sets the outbound wire for flowing a request out of the service
*
* @param wire the outbound wire for flowing a request out of the service
*/
- void setOutboundWire(OutboundWire<?> wire);
+ void setOutboundWire(OutboundWire wire);
/**
* Returns the target invoker for dispatching callback invocations
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ReferenceExtension.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ReferenceExtension.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ReferenceExtension.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ReferenceExtension.java Sat Sep 9 18:58:51 2006
@@ -38,8 +38,8 @@
*/
public abstract class ReferenceExtension<T> extends AbstractSCAObject<T> implements Reference<T> {
- protected InboundWire<T> inboundWire;
- protected OutboundWire<?> outboundWire;
+ protected InboundWire inboundWire;
+ protected OutboundWire outboundWire;
protected Class<T> referenceInterface;
protected WireService wireService;
@@ -56,19 +56,19 @@
return Scope.COMPOSITE;
}
- public void setInboundWire(InboundWire<T> wire) {
+ public void setInboundWire(InboundWire wire) {
this.inboundWire = wire;
}
- public InboundWire<T> getInboundWire() {
+ public InboundWire getInboundWire() {
return inboundWire;
}
- public OutboundWire<?> getOutboundWire() {
+ public OutboundWire getOutboundWire() {
return outboundWire;
}
- public void setOutboundWire(OutboundWire<?> outboundWire) {
+ public void setOutboundWire(OutboundWire outboundWire) {
this.outboundWire = outboundWire;
}
@@ -77,7 +77,7 @@
}
public T getServiceInstance() throws TargetException {
- return wireService.createProxy(inboundWire);
+ return (T) wireService.createProxy(inboundWire);
}
public WireInvocationHandler getHandler() throws TargetException {
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceExtension.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceExtension.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceExtension.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceExtension.java Sat Sep 9 18:58:51 2006
@@ -40,8 +40,8 @@
public class ServiceExtension<T> extends AbstractSCAObject<T> implements Service<T> {
protected Class<T> interfaze;
- protected InboundWire<T> inboundWire;
- protected OutboundWire<?> outboundWire;
+ protected InboundWire inboundWire;
+ protected OutboundWire outboundWire;
protected WireService wireService;
public ServiceExtension(String name, Class<T> interfaze, CompositeComponent parent, WireService wireService)
@@ -55,28 +55,28 @@
return Scope.COMPOSITE;
}
- public InboundWire<T> getInboundWire() {
+ public InboundWire getInboundWire() {
return inboundWire;
}
- public void setInboundWire(InboundWire<T> wire) {
+ public void setInboundWire(InboundWire wire) {
inboundWire = wire;
}
- public OutboundWire<?> getOutboundWire() {
+ public OutboundWire getOutboundWire() {
return outboundWire;
}
- public void setOutboundWire(OutboundWire<?> outboundWire) {
+ public void setOutboundWire(OutboundWire outboundWire) {
this.outboundWire = outboundWire;
}
public TargetInvoker createCallbackTargetInvoker(ServiceContract contract, Operation operation) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException();
}
-
+
public T getServiceInstance() throws TargetException {
- return wireService.createProxy(inboundWire);
+ return (T) wireService.createProxy(inboundWire);
}
public WireInvocationHandler getHandler() {
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/SourcePolicyBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/SourcePolicyBuilder.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/SourcePolicyBuilder.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/SourcePolicyBuilder.java Sat Sep 9 18:58:51 2006
@@ -35,6 +35,6 @@
* @param wire
* @throws BuilderException
*/
- void build(ReferenceDefinition referenceDefinition, OutboundWire<?> wire) throws BuilderException;
+ void build(ReferenceDefinition referenceDefinition, OutboundWire wire) throws BuilderException;
}
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/TargetPolicyBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/TargetPolicyBuilder.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/TargetPolicyBuilder.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/policy/TargetPolicyBuilder.java Sat Sep 9 18:58:51 2006
@@ -35,6 +35,6 @@
* @param wire
* @throws BuilderException
*/
- void build(ServiceDefinition serviceDefinition, InboundWire<?> wire) throws BuilderException;
+ void build(ServiceDefinition serviceDefinition, InboundWire wire) throws BuilderException;
}
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/InboundWire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/InboundWire.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/InboundWire.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/InboundWire.java Sat Sep 9 18:58:51 2006
@@ -28,7 +28,7 @@
*
* @version $$Rev$$ $$Date$$
*/
-public interface InboundWire<T> extends RuntimeWire<T> {
+public interface InboundWire extends RuntimeWire {
/**
* Returns the name of the target service of the wire
@@ -85,7 +85,7 @@
/**
* Set when a wire can be optimized; that is when no handlers or interceptors exist on either end
*/
- void setTargetWire(OutboundWire<?> wire);
+ void setTargetWire(OutboundWire wire);
/**
* Creates an association between a message id and the address of the SCAObject that the corresponding message
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/OutboundWire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/OutboundWire.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/OutboundWire.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/OutboundWire.java Sat Sep 9 18:58:51 2006
@@ -30,7 +30,7 @@
*
* @version $$Rev$$ $$Date$$
*/
-public interface OutboundWire<T> extends RuntimeWire<T> {
+public interface OutboundWire extends RuntimeWire {
/**
* Returns the name of the source reference
@@ -55,12 +55,12 @@
/**
* Sets the callback interface type generated proxies implement
*/
- void setCallbackInterface(Class<T> interfaze);
+ void setCallbackInterface(Class<?> interfaze);
/**
* Returns the callback interface type implemented by generated proxies
*/
- Class<T> getCallbackInterface();
+ Class<?> getCallbackInterface();
/**
* Returns the invocation configuration for each operation on a service specified by a reference or a target
@@ -97,6 +97,6 @@
/**
* Set when a wire can be optimized; that is when no handlers or interceptors exist on either end
*/
- void setTargetWire(InboundWire<?> wire);
+ void setTargetWire(InboundWire wire);
}
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/RuntimeWire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/RuntimeWire.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/RuntimeWire.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/RuntimeWire.java Sat Sep 9 18:58:51 2006
@@ -26,12 +26,12 @@
*
* @version $$Rev$$ $$Date$$
*/
-public interface RuntimeWire<T> {
+public interface RuntimeWire {
/**
* Returns the non-proxied target instance for this wire
*/
- T getTargetService() throws TargetException;
+ Object getTargetService() throws TargetException;
/**
* Returns the service contract associated with the wire
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/WireService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/WireService.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/WireService.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/wire/WireService.java Sat Sep 9 18:58:51 2006
@@ -45,7 +45,7 @@
* @return the proxy
* @throws ProxyCreationException
*/
- <T> T createProxy(RuntimeWire<T> wire) throws ProxyCreationException;
+ Object createProxy(RuntimeWire wire) throws ProxyCreationException;
/**
* Creates a Java proxy for the service contract callback
@@ -54,7 +54,7 @@
* @return the proxy
* @throws ProxyCreationException
*/
- <T> T createCallbackProxy(ServiceContract<?> contract, InboundWire<?> wire) throws ProxyCreationException;
+ Object createCallbackProxy(ServiceContract<?> contract, InboundWire wire) throws ProxyCreationException;
/**
@@ -63,14 +63,14 @@
* @param wire the wire to create the invocation handler for
* @return the invocation handler
*/
- <T> WireInvocationHandler createHandler(RuntimeWire<T> wire);
+ WireInvocationHandler createHandler(RuntimeWire wire);
/**
* Creates a wire invocation handler for flowing invocations through a callback
*
* @return the invocation handler for flowing invocations through a callback
*/
- WireInvocationHandler createCallbackHandler(InboundWire<?> wire);
+ WireInvocationHandler createCallbackHandler(InboundWire wire);
/**
* Creates an outbound invocation chain for a given operation
@@ -136,7 +136,7 @@
* @param def the model artifact representing the service
*/
void createWires(Service<?> service, BindlessServiceDefinition def);
-
+
/**
* Check the compatiblity of the source and the target service contracts.<p>
* A wire may only connect a source to a target if the target implements an interface that is compatible with the
@@ -153,13 +153,13 @@
* by the service.
* <li>other specified attributes of the two interfaces MUST match, including Scope and Callback interface
* </ol>
- *
+ *
* <p>Please note this test is not symetric: isWireable(A, B) does NOT imply that isWireable(B, A)
- *
+ *
* @param source The source service contract
* @param target The target service contract
* @return true if the contracts are wireable
*/
- boolean isWireable(ServiceContract<?> source, ServiceContract<?> target);
+ boolean isWireable(ServiceContract<?> source, ServiceContract<?> target);
}
Modified: incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ReferenceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ReferenceTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ReferenceTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ReferenceTestCase.java Sat Sep 9 18:58:51 2006
@@ -63,7 +63,7 @@
expectLastCall().andReturn(operation);
chain.prepare();
expectLastCall();
- InboundWire<Object> wire = createMock(InboundWire.class);
+ InboundWire wire = createMock(InboundWire.class);
wire.getInvocationChains();
Map<Operation, InvocationChain> chains = new HashMap<Operation, InvocationChain>();
chains.put(operation, chain);
Modified: incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ServiceExtensionTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ServiceExtensionTestCase.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ServiceExtensionTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/extension/ServiceExtensionTestCase.java Sat Sep 9 18:58:51 2006
@@ -39,7 +39,7 @@
@SuppressWarnings("unchecked")
public void testSetGetInterface() throws Exception {
- InboundWire<Object> wire = createMock(InboundWire.class);
+ InboundWire wire = createMock(InboundWire.class);
JavaServiceContract contract = new JavaServiceContract(getClass());
expect(wire.getServiceContract()).andReturn(contract);
replay(wire);
Modified: incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java?view=diff&rev=441886&r1=441885&r2=441886
==============================================================================
--- incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java (original)
+++ incubator/tuscany/java/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java Sat Sep 9 18:58:51 2006
@@ -63,15 +63,15 @@
/**
* Creates an inbound wire. After a wire is returned, client code must call {@link
- * #terminateWire(org.apache.tuscany.spi.wire.InboundWire<T>)}. These two methods have been separated to allow wires
+ * #terminateWire(org.apache.tuscany.spi.wire.InboundWire)}. These two methods have been separated to allow wires
* to be decorated with interceptors or handlers prior to their completion
*
* @param serviceName the service name associated with the wire
* @param interfaze the interface associated with the wire
*/
- public static <T> InboundWire<T> createInboundWire(String serviceName, Class<T> interfaze)
+ public static <T> InboundWire createInboundWire(String serviceName, Class<T> interfaze)
throws InvalidServiceContractException {
- InboundWire<T> wire = new InboundWireImpl<T>();
+ InboundWire wire = new InboundWireImpl();
JavaInterfaceProcessorRegistry registry = new JavaInterfaceProcessorRegistryImpl();
ServiceContract<?> contract = registry.introspect(interfaze);
wire.setServiceContract(contract);
@@ -82,15 +82,15 @@
/**
* Creates an outbound wire. After a wire is returned, client code must call {@link
- * #terminateWire(org.apache.tuscany.spi.wire.OutboundWire<T>)}. These two methods have been separated to allow
+ * #terminateWire(org.apache.tuscany.spi.wire.OutboundWire)}. These two methods have been separated to allow
* wires to be decorated with interceptors or handlers prior to their completion
*
* @param refName the reference name the wire is associated with on the client
* @param interfaze the interface associated with the wire
*/
- public static <T> OutboundWire<T> createOutboundWire(String refName, Class<T> interfaze)
+ public static <T> OutboundWire createOutboundWire(String refName, Class<T> interfaze)
throws InvalidServiceContractException {
- OutboundWire<T> wire = new OutboundWireImpl<T>();
+ OutboundWire wire = new OutboundWireImpl();
wire.setReferenceName(refName);
wire.addInvocationChains(createOutboundChains(interfaze));
JavaInterfaceProcessorRegistry registry = new JavaInterfaceProcessorRegistryImpl();
@@ -103,14 +103,14 @@
/**
* Finalizes the target wire
*/
- public static <T> void terminateWire(InboundWire<T> wire) {
+ public static <T> void terminateWire(InboundWire wire) {
for (InboundInvocationChain chain : wire.getInvocationChains().values()) {
// add tail interceptor
chain.addInterceptor(new InvokerInterceptor());
}
}
- public static <T> void terminateWire(OutboundWire<T> wire) {
+ public static <T> void terminateWire(OutboundWire wire) {
for (OutboundInvocationChain chain : wire.getInvocationChains().values()) {
// add tail interceptor
chain.addInterceptor(new InvokerInterceptor());
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org