You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by da...@apache.org on 2011/11/25 18:01:27 UTC
svn commit: r1206260 - in /aries/trunk/spi-fly/spi-fly-core/src:
main/java/org/apache/aries/spifly/ test/java/org/apache/aries/mytest/
test/java/org/apache/aries/spifly/ test/java/org/apache/aries/spifly/impl4/
test/resources/org/apache/aries/spifly/im...
Author: davidb
Date: Fri Nov 25 17:01:25 2011
New Revision: 1206260
URL: http://svn.apache.org/viewvc?rev=1206260&view=rev
Log:
Add support for selectively exposing SPIs from an SPI Provider Bundle.
Added:
aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/mytest/MySPI2.java (with props)
aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/
aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4a.java (with props)
aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4b.java (with props)
aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4c.java (with props)
aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/
aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/
aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/
aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI
aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI2
Modified:
aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java
aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
Modified: aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java?rev=1206260&r1=1206259&r2=1206260&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java (original)
+++ aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java Fri Nov 25 17:01:25 2011
@@ -177,7 +177,7 @@ public abstract class BaseActivator impl
return bundles;
}
- private Map<String, Object> getCustomBundleAttributes(String name, Bundle b) {
+ public Map<String, Object> getCustomBundleAttributes(String name, Bundle b) {
SortedMap<Long, Pair<Bundle, Map<String, Object>>> map = registeredProviders.get(name);
if (map == null)
return Collections.emptyMap();
Modified: aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java?rev=1206260&r1=1206259&r2=1206260&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java (original)
+++ aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java Fri Nov 25 17:01:25 2011
@@ -23,15 +23,20 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Dictionary;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import org.apache.aries.spifly.api.SpiFlyConstants;
+import org.apache.aries.util.manifest.ManifestHeaderProcessor;
+import org.apache.aries.util.manifest.ManifestHeaderProcessor.GenericMetadata;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleEvent;
import org.osgi.framework.Constants;
@@ -62,8 +67,9 @@ public class ProviderBundleTrackerCustom
}
List<String> providedServices = null;
+ Map<String, Object> customAttributes = new HashMap<String, Object>();
if (bundle.getHeaders().get("Provide-Capability") != null) {
- providedServices = readProvideCapability(bundle.getHeaders());
+ providedServices = readProvideCapability(bundle.getHeaders(), customAttributes);
}
if (providedServices == null && bundle.getHeaders().get(SpiFlyConstants.SPI_PROVIDER_HEADER) != null) {
providedServices = new ArrayList<String>();
@@ -119,25 +125,27 @@ public class ProviderBundleTrackerCustom
if (className.startsWith("#"))
continue; // a comment
- Class<?> cls = bundle.loadClass(className);
- Object o = cls.newInstance();
- log(LogService.LOG_INFO, "Instantiated SPI provider: " + o);
-
- Hashtable<String, Object> props = new Hashtable<String, Object>();
- props.put(SpiFlyConstants.SPI_PROVIDER_URL, serviceFile);
-
String s = serviceFile.toExternalForm();
int idx = s.lastIndexOf('/');
String registrationClassName = className;
if (s.length() > idx) {
registrationClassName = s.substring(idx + 1);
}
+ if (providedServices.size() > 0 && !providedServices.contains(registrationClassName))
+ continue;
+
+ Class<?> cls = bundle.loadClass(className);
+ Object o = cls.newInstance();
+ log(LogService.LOG_INFO, "Instantiated SPI provider: " + o);
+
+ Hashtable<String, Object> props = new Hashtable<String, Object>();
+ props.put(SpiFlyConstants.SPI_PROVIDER_URL, serviceFile);
ServiceRegistration reg = bundle.getBundleContext()
.registerService(registrationClassName, o, props);
registrations.add(reg);
- activator.registerProviderBundle(registrationClassName, bundle);
+ activator.registerProviderBundle(registrationClassName, bundle, customAttributes);
log(LogService.LOG_INFO, "Registered service: " + reg);
} catch (Exception e) {
log(LogService.LOG_WARNING,
@@ -155,39 +163,32 @@ public class ProviderBundleTrackerCustom
// An empty list returned means 'all SPIs'
// A return value of null means no SPIs
// A populated list means: only these SPIs
- private List<String> readProvideCapability(Dictionary<?,?> headers) {
- if (headers.get(SpiFlyConstants.PROVIDE_CAPABILITY) == null)
+ @SuppressWarnings("unchecked")
+ private List<String> readProvideCapability(Dictionary<?,?> headers, Map<String, Object> customAttributes) {
+ Object capabilityHeader = headers.get(SpiFlyConstants.PROVIDE_CAPABILITY);
+ if (capabilityHeader == null)
return null;
- String pc = headers.get(SpiFlyConstants.PROVIDE_CAPABILITY).toString();
- for (String c : pc.split(",")) { // TODO cover situation where ',' is inside a string (e.g. service:List<String>).
- c = c.trim();
- int idx = c.indexOf(';');
- if (idx < 0)
- continue;
-
- String ns = c.substring(0, idx);
- if (!SpiFlyConstants.SPI_CAPABILITY_NAMESPACE.equals(ns))
+ List<GenericMetadata> capabilities = ManifestHeaderProcessor.parseCapabilityString(capabilityHeader.toString());
+ for (GenericMetadata cap : capabilities) {
+ if (!SpiFlyConstants.SPI_CAPABILITY_NAMESPACE.equals(cap.getNamespace()))
continue;
- List<String> providedServices = new ArrayList<String>();
- String attrs = c.substring(idx);
- for (String attr : attrs.split(";")) {
- attr = attr.trim();
- if (attr.startsWith("service=")) {
- String val = attr.substring("service=".length());
- providedServices.add(val);
- } else if (attr.startsWith("service:String=")) {
- String val = attr.substring("service:String=".length());
- providedServices.add(val);
- } else if (attr.startsWith("service:List<String>=")) {
- String val = attr.substring("service:List<String>=".length());
- for (String v : val.split(",")) {
- providedServices.add(v.trim());
+ List<String> serviceNames = new ArrayList<String>();
+ for (Map.Entry<String, Object> entry : cap.getAttributes().entrySet()) {
+ if (SpiFlyConstants.SERVICE_ATTRIBUTE.equals(entry.getKey())) {
+ if (entry.getValue() instanceof String) {
+ serviceNames.add((String) entry.getValue());
+ } else if (entry.getValue() instanceof String []) {
+ serviceNames.addAll(Arrays.asList((String []) entry.getValue()));
+ } else if (entry.getValue() instanceof List) {
+ serviceNames.addAll((List<String>) entry.getValue());
}
+ } else {
+ customAttributes.put(entry.getKey(), entry.getValue());
}
}
- return providedServices; // An empty array means all SPIs
+ return serviceNames;
}
return null;
}
Added: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/mytest/MySPI2.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/mytest/MySPI2.java?rev=1206260&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/mytest/MySPI2.java (added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/mytest/MySPI2.java Fri Nov 25 17:01:25 2011
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.mytest;
+
+public interface MySPI2 {
+ String someMethod(String s);
+}
Propchange: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/mytest/MySPI2.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java?rev=1206260&r1=1206259&r2=1206260&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java (original)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java Fri Nov 25 17:01:25 2011
@@ -25,21 +25,25 @@ import static org.junit.Assert.assertSam
import java.net.URL;
import java.net.URLClassLoader;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Dictionary;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import org.apache.aries.spifly.impl1.MySPIImpl1;
import org.apache.aries.spifly.impl2.MySPIImpl2a;
import org.apache.aries.spifly.impl2.MySPIImpl2b;
import org.apache.aries.spifly.impl3.MySPIImpl3;
import org.easymock.EasyMock;
+import org.easymock.IAnswer;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
public class ProviderBundleTrackerCustomizerGenericCapabilityTest {
@@ -79,6 +83,68 @@ public class ProviderBundleTrackerCustom
}
@Test
+ public void testCustomAttributesBundle() throws Exception {
+ Bundle spiBundle = EasyMock.createMock(Bundle.class);
+ EasyMock.replay(spiBundle);
+ BaseActivator activator = new BaseActivator() {
+ @Override
+ public void start(BundleContext context) throws Exception {}
+ };
+
+ ProviderBundleTrackerCustomizer customizer = new ProviderBundleTrackerCustomizer(activator, spiBundle);
+
+ ServiceRegistration sreg = EasyMock.createMock(ServiceRegistration.class);
+ EasyMock.replay(sreg);
+
+ BundleContext implBC = mockSPIBundleContext(sreg);
+ Bundle implBundle = mockSPIBundle(implBC, "osgi.spi.provider; effective:=active; approval=global");
+
+ List<ServiceRegistration> registrations = customizer.addingBundle(implBundle, null);
+ assertEquals(1, registrations.size());
+ Collection<Bundle> bundles = activator.findProviderBundles("org.apache.aries.mytest.MySPI");
+ assertEquals(1, bundles.size());
+ assertSame(implBundle, bundles.iterator().next());
+
+ Map<String, Object> attrs = activator.getCustomBundleAttributes("org.apache.aries.mytest.MySPI", implBundle);
+ assertEquals(1, attrs.size());
+ assertEquals("global", attrs.get("approval"));
+ }
+
+ @Test
+ public void testServiceSubsetSelection() throws Exception {
+ Bundle spiBundle = EasyMock.createMock(Bundle.class);
+ EasyMock.replay(spiBundle);
+
+ BaseActivator activator = new BaseActivator() {
+ @Override
+ public void start(BundleContext context) throws Exception {}
+ };
+
+ ProviderBundleTrackerCustomizer customizer = new ProviderBundleTrackerCustomizer(activator, spiBundle);
+
+ ServiceRegistration sreg = EasyMock.createMock(ServiceRegistration.class);
+ EasyMock.replay(sreg);
+
+ BundleContext implBC = mockSPIBundleContext4(sreg);
+ Bundle implBundle =
+ mockSPIBundle4(implBC, "osgi.spi.provider; effective:=active; service=org.apache.aries.mytest.MySPI; approval=global");
+
+ List<ServiceRegistration> registrations = customizer.addingBundle(implBundle, null);
+ assertEquals(1, registrations.size());
+ assertEquals("org.apache.aries.mytest.MySPI", registrations.iterator().next().getReference().getProperty(Constants.OBJECTCLASS));
+ }
+
+ @Test
+ public void testMultipleServiceInstances() throws Exception {
+ // TODO
+ }
+
+ @Test
+ public void testMultipleServiceTypes() throws Exception {
+ // TODO
+ }
+
+ @Test
public void testAddingBundleSPIBundle() throws Exception {
BundleContext implBC = mockSPIBundleContext(EasyMock.createNiceMock(ServiceRegistration.class));
Bundle spiBundle = mockSPIBundle(implBC);
@@ -202,4 +268,61 @@ public class ProviderBundleTrackerCustom
EasyMock.replay(implBundle);
return implBundle;
}
+
+ private BundleContext mockSPIBundleContext4(ServiceRegistration sreg) {
+ BundleContext implBC = EasyMock.createNiceMock(BundleContext.class);
+
+ EasyMock.expect(implBC.
+ registerService((String) EasyMock.anyObject(), EasyMock.anyObject(), (Dictionary<?,?>)EasyMock.anyObject())).
+ andAnswer(new IAnswer<ServiceRegistration>() {
+ @Override
+ public ServiceRegistration answer() throws Throwable {
+ ServiceReference sref = EasyMock.createMock(ServiceReference.class);
+ EasyMock.expect(sref.getProperty(Constants.OBJECTCLASS)).andReturn(
+ EasyMock.getCurrentArguments()[0]);
+ EasyMock.replay(sref);
+
+ ServiceRegistration sreg = EasyMock.createMock(ServiceRegistration.class);
+ EasyMock.expect(sreg.getReference()).andReturn(sref).anyTimes();
+ EasyMock.replay(sreg);
+ return sreg;
+ }
+ });
+
+ EasyMock.replay(implBC);
+ return implBC;
+ }
+
+ private Bundle mockSPIBundle4(BundleContext implBC, String spiProviderHeader) throws ClassNotFoundException {
+ Bundle implBundle = EasyMock.createNiceMock(Bundle.class);
+ EasyMock.expect(implBundle.getBundleContext()).andReturn(implBC).anyTimes();
+
+ Dictionary<String, String> headers = new Hashtable<String, String>();
+ if (spiProviderHeader != null)
+ headers.put("Provide-Capability", spiProviderHeader);
+ EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+
+ // List the resources found at META-INF/services in the test bundle
+ URL dir = getClass().getResource("impl4/META-INF/services");
+ assertNotNull("precondition", dir);
+ EasyMock.expect(implBundle.getResource("/META-INF/services")).andReturn(dir).anyTimes();
+ URL res = getClass().getResource("impl4/META-INF/services/org.apache.aries.mytest.MySPI");
+ assertNotNull("precondition", res);
+ URL res2 = getClass().getResource("impl4/META-INF/services/org.apache.aries.mytest.MySPI2");
+ assertNotNull("precondition", res2);
+
+ EasyMock.expect(implBundle.findEntries("META-INF/services", "*", false)).andReturn(
+ Collections.enumeration(Arrays.asList(res, res2))).anyTimes();
+
+ Class<?> clsa = getClass().getClassLoader().loadClass("org.apache.aries.spifly.impl4.MySPIImpl4a");
+ EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl4.MySPIImpl4a")).andReturn(clsa).anyTimes();
+ Class<?> clsb = getClass().getClassLoader().loadClass("org.apache.aries.spifly.impl4.MySPIImpl4b");
+ EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl4.MySPIImpl4b")).andReturn(clsb).anyTimes();
+ Class<?> clsc = getClass().getClassLoader().loadClass("org.apache.aries.spifly.impl4.MySPIImpl4c");
+ EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl4.MySPIImpl4c")).andReturn(clsc).anyTimes();
+
+
+ EasyMock.replay(implBundle);
+ return implBundle;
+ }
}
Added: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4a.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4a.java?rev=1206260&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4a.java (added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4a.java Fri Nov 25 17:01:25 2011
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.spifly.impl4;
+
+import org.apache.aries.mytest.MySPI;
+
+public class MySPIImpl4a implements MySPI {
+ @Override
+ public String someMethod(String s) {
+ return "impl4a";
+ }
+}
Propchange: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4a.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4b.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4b.java?rev=1206260&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4b.java (added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4b.java Fri Nov 25 17:01:25 2011
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.spifly.impl4;
+
+import org.apache.aries.mytest.MySPI2;
+
+public class MySPIImpl4b implements MySPI2 {
+ @Override
+ public String someMethod(String s) {
+ return "impl4b";
+ }
+}
Propchange: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4b.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4c.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4c.java?rev=1206260&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4c.java (added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4c.java Fri Nov 25 17:01:25 2011
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.spifly.impl4;
+
+import org.apache.aries.mytest.MySPI2;
+
+public class MySPIImpl4c implements MySPI2 {
+ @Override
+ public String someMethod(String s) {
+ return "impl4c";
+ }
+}
Propchange: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl4/MySPIImpl4c.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI?rev=1206260&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI (added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI Fri Nov 25 17:01:25 2011
@@ -0,0 +1 @@
+org.apache.aries.spifly.impl4.MySPIImpl4a
Added: aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI2
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI2?rev=1206260&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI2 (added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/resources/org/apache/aries/spifly/impl4/META-INF/services/org.apache.aries.mytest.MySPI2 Fri Nov 25 17:01:25 2011
@@ -0,0 +1,2 @@
+org.apache.aries.spifly.impl4.MySPIImpl4b
+org.apache.aries.spifly.impl4.MySPIImpl4c
\ No newline at end of file