You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by da...@apache.org on 2010/03/20 17:27:54 UTC
svn commit: r925633 - in /cxf/dosgi/trunk:
discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/
dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/
dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/
dsw/cxf-osgi-remote-s...
Author: davidb
Date: Sat Mar 20 16:27:53 2010
New Revision: 925633
URL: http://svn.apache.org/viewvc?rev=925633&view=rev
Log:
Applying patch on behalf or Mark Schaaf and Holger Hoffstätte
This patch updates the Remote Service Admin interfaces and fixes issues around case insensitivity of service properties.
Modified:
cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/Utils.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/UtilsTest.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointDescription.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointListener.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointPermission.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportReference.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportRegistration.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportReference.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportRegistration.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteConstants.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdmin.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminEvent.java
cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.java
Modified: cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java Sat Mar 20 16:27:53 2010
@@ -118,9 +118,9 @@ public class LocalDiscoveryUtilsTest ext
EndpointDescription ed1 = eds.get(1);
Map<String, Object> props = ed1.getProperties();
assertEquals(Arrays.asList("com.acme.HelloService", "some.other.Service"), ed1.getInterfaces());
- assertFalse("Should not be exactly the same. The value should contain a bunch of newlines",
- "org.apache.cxf.ws".equals(props.get("service.exported.configs")));
- assertEquals("org.apache.cxf.ws", props.get("service.exported.configs").toString().trim());
+ assertEquals("org.apache.cxf.ws", props.get("service.imported.configs"));
+ // exports should have been removed
+ assertNull(props.get("service.exported.configs"));
assertEquals(normXML("<other:t1 xmlns:other='http://www.acme.org/xmlns/other/v1.0.0' xmlns='http://www.acme.org/xmlns/other/v1.0.0'><foo type='bar'>haha</foo></other:t1>"),
normXML((String) props.get("someXML")));
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java Sat Mar 20 16:27:53 2010
@@ -22,8 +22,11 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Dictionary;
+import java.util.Enumeration;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Hashtable;
+import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -125,23 +128,7 @@ public class RemoteServiceAdminCore impl
if (additionalProperties != null) {// overlay properties with the additionalProperies
- Set<Map.Entry> adProps = additionalProperties.entrySet();
- for (Map.Entry e : adProps) {
- // objectClass and service.id must not be overwritten
- Object keyO = e.getKey();
- if (keyO instanceof String && keyO != null) {
- String key = ((String)keyO).toLowerCase();
- if (org.osgi.framework.Constants.SERVICE_ID.toLowerCase().equals(key)
- || org.osgi.framework.Constants.OBJECTCLASS.toLowerCase().equals(key)) {
- LOG
- .info("exportService called with additional properties map that contained illegal key: "
- + key + " The key is ignored");
- continue;
- }
- }
- serviceProperties.put(e.getKey(), e.getValue());
- LOG.fine("Overwriting property [" + e.getKey() + "] with value [" + e.getValue() + "]");
- }
+ Utils.overlayProperties(serviceProperties,additionalProperties);
}
// Get the intents that need to be supported by the RSA
@@ -282,6 +269,7 @@ public class RemoteServiceAdminCore impl
}
}
+
protected List<String> determineConfigurationTypes(Properties serviceProperties) {
List<String> configurationTypes = new ArrayList<String>();
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/Utils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/Utils.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/Utils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/Utils.java Sat Mar 20 16:27:53 2010
@@ -20,9 +20,12 @@ package org.apache.cxf.dosgi.dsw.service
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import java.util.logging.Logger;
import org.apache.commons.lang.ArrayUtils;
@@ -63,6 +66,8 @@ public class Utils {
}
+
+
public static String remoteServiceAdminEventTypeToString(int type){
switch (type) {
case RemoteServiceAdminEvent.EXPORT_ERROR:
@@ -130,4 +135,44 @@ public class Utils {
return list.toArray(new String[list.size()]);
}
+
+
+ public static void overlayProperties(Properties serviceProperties, Map additionalProperties) {
+ Enumeration<Object> keys = serviceProperties.keys();
+ // Maps lower case key to original key
+ HashMap<String,String> keysLowerCase = new HashMap<String, String>();
+ while(keys.hasMoreElements()){
+ Object o = keys.nextElement();
+ if (o instanceof String) {
+ String ks = (String)o;
+ keysLowerCase.put(ks.toLowerCase(), ks);
+ }
+ }
+
+ Set<Map.Entry> adProps = additionalProperties.entrySet();
+ for (Map.Entry e : adProps) {
+ // objectClass and service.id must not be overwritten
+ Object keyObj = e.getKey();
+ if (keyObj instanceof String && keyObj != null) {
+ String key = ((String)keyObj).toLowerCase();
+ if (org.osgi.framework.Constants.SERVICE_ID.toLowerCase().equals(key)
+ || org.osgi.framework.Constants.OBJECTCLASS.toLowerCase().equals(key)) {
+ LOG.info("exportService called with additional properties map that contained illegal key: "
+ + key + " The key is ignored");
+ continue;
+ }else if(keysLowerCase.containsKey(key)){
+ String origKey = keysLowerCase.get(key);
+ serviceProperties.put(origKey, e.getValue());
+ LOG.fine("Overwriting property [" + origKey + "] with value [" + e.getValue() + "]");
+ }else{
+ serviceProperties.put(e.getKey(), e.getValue());
+ keysLowerCase.put(e.getKey().toString().toLowerCase(), e.getKey().toString());
+ }
+ }
+
+
+ }
+ }
+
+
}
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/UtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/UtilsTest.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/UtilsTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/UtilsTest.java Sat Mar 20 16:27:53 2010
@@ -1,55 +1,169 @@
/**
- * 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.
- */
+ * 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.cxf.dosgi.dsw.service;
-
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Properties;
-import org.junit.Test;
+import org.osgi.framework.Constants;
+import org.osgi.service.remoteserviceadmin.RemoteConstants;
+import org.junit.Test;
public class UtilsTest {
@Test
- public void testNormalizeStringPlus(){
-
+ public void testNormalizeStringPlus() {
+
String s1 = "s1";
String s2 = "s2";
String s3 = "s3";
-
- String[] sa = new String[] {s1,s2,s3};
-
+
+ String[] sa = new String[] {
+ s1, s2, s3
+ };
+
Collection<Object> sl = new ArrayList<Object>(4);
sl.add(s1);
sl.add(s2);
sl.add(s3);
sl.add(new Object()); // must be skipped
+
+ assertEquals(null, Utils.normalizeStringPlus(new Object()));
+ assertEquals(new String[] {
+ s1
+ }, Utils.normalizeStringPlus(s1));
+ assertEquals(sa, Utils.normalizeStringPlus(sa));
+ assertEquals(sa, Utils.normalizeStringPlus(sl));
+
+ }
+
+ @Test
+ public void testOverlayProperties() {
+
+ Properties original = new Properties();
+
+ original.put("MyProp", "my value");
+ original.put(Constants.OBJECTCLASS, "myClass");
+
+ Properties copy = new Properties();
+ copy.putAll(original);
+
+ { // nothing should change here
+ Properties overload = new Properties();
+ Utils.overlayProperties(copy,overload);
+
+ assertEquals(original.size(), copy.size());
+ for (Object key : Collections.list(original.keys())) {
+ assertEquals(original.get(key), copy.get(key));
+ }
+ }
+
+ copy.clear();
+ copy.putAll(original);
+
+ { // a property should be added
+ Properties overload = new Properties();
+ overload.put("new", "prop");
+
+ Utils.overlayProperties(copy,overload);
+
+ assertEquals(original.size()+1, copy.size());
+ for (Object key : Collections.list(original.keys())) {
+ assertEquals(original.get(key), copy.get(key));
+ }
+ assertNotNull(overload.get("new"));
+ assertEquals("prop",overload.get("new"));
+ }
+
+ copy.clear();
+ copy.putAll(original);
- assertEquals(null,Utils.normalizeStringPlus(new Object()));
- assertEquals(new String[] {s1},Utils.normalizeStringPlus(s1));
- assertEquals(sa,Utils.normalizeStringPlus(sa));
- assertEquals(sa,Utils.normalizeStringPlus(sl));
+ { // only one property should be added
+ Properties overload = new Properties();
+ overload.put("new", "prop");
+ overload.put("NEW", "prop");
+
+ Utils.overlayProperties(copy,overload);
+
+ assertEquals(original.size()+1, copy.size());
+ for (Object key : Collections.list(original.keys())) {
+ assertEquals(original.get(key), copy.get(key));
+ }
+ assertNotNull(overload.get("new"));
+ assertEquals("prop",overload.get("new"));
+ }
+ copy.clear();
+ copy.putAll(original);
+
+ { // nothing should change here
+ Properties overload = new Properties();
+ overload.put(Constants.OBJECTCLASS, "assd");
+ overload.put(Constants.SERVICE_ID, "asasdasd");
+ Utils.overlayProperties(copy,overload);
+
+ assertEquals(original.size(), copy.size());
+ for (Object key : Collections.list(original.keys())) {
+ assertEquals(original.get(key), copy.get(key));
+ }
+ }
+
+ copy.clear();
+ copy.putAll(original);
+
+ { // overwrite own prop
+ Properties overload = new Properties();
+ overload.put("MyProp", "newValue");
+ Utils.overlayProperties(copy,overload);
+
+ assertEquals(original.size(), copy.size());
+ for (Object key : Collections.list(original.keys())) {
+ if(!"MyProp".equals(key))
+ assertEquals(original.get(key), copy.get(key));
+ }
+ assertEquals("newValue",copy.get("MyProp"));
+ }
+
+ copy.clear();
+ copy.putAll(original);
+
+ { // overwrite own prop in different case
+ Properties overload = new Properties();
+ overload.put("MYPROP", "newValue");
+ Utils.overlayProperties(copy,overload);
+
+ assertEquals(original.size(), copy.size());
+ for (Object key : Collections.list(original.keys())) {
+ if(!"MyProp".equals(key))
+ assertEquals(original.get(key), copy.get(key));
+ }
+ assertEquals("newValue",copy.get("MyProp"));
+ }
+
}
-
-
+
}
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointDescription.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointDescription.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointDescription.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointDescription.java Sat Mar 20 16:27:53 2010
@@ -104,15 +104,13 @@ public class EndpointDescription {
.removeAll(properties.keySet()));
}
- if (!props.containsKey(SERVICE_IMPORTED)) {
- props.put(SERVICE_IMPORTED, Boolean.toString(true));
- }
+ conditionProperties(props);
this.properties = Collections.unmodifiableMap(props);
/* properties must be initialized before calling the following methods */
interfaces = verifyObjectClassProperty();
serviceId = verifyLongProperty(ENDPOINT_SERVICE_ID);
frameworkUUID = verifyStringProperty(ENDPOINT_FRAMEWORK_UUID);
- id = verifyStringProperty(ENDPOINT_ID);
+ id = verifyStringProperty(ENDPOINT_ID).trim();
if (id == null) {
throw new IllegalArgumentException(ENDPOINT_ID
+ " property must be set");
@@ -198,15 +196,13 @@ public class EndpointDescription {
props.put(ENDPOINT_FRAMEWORK_UUID, uuid);
}
}
- if (!props.containsKey(SERVICE_IMPORTED)) {
- props.put(SERVICE_IMPORTED, Boolean.toString(true));
- }
+ conditionProperties(props);
this.properties = Collections.unmodifiableMap(props);
/* properties must be initialized before calling the following methods */
interfaces = verifyObjectClassProperty();
serviceId = verifyLongProperty(ENDPOINT_SERVICE_ID);
frameworkUUID = verifyStringProperty(ENDPOINT_FRAMEWORK_UUID);
- id = verifyStringProperty(ENDPOINT_ID);
+ id = verifyStringProperty(ENDPOINT_ID).trim();
if (id == null) {
throw new IllegalArgumentException(ENDPOINT_ID
+ " property must be set");
@@ -217,6 +213,31 @@ public class EndpointDescription {
}
}
+ private static final String SERVICE_EXPORTED_ = "service.exported.";
+ private static final int SERVICE_EXPORTED_length = SERVICE_EXPORTED_
+ .length();
+
+ /**
+ * Condition the properties.
+ *
+ * @param props Property map to condition.
+ */
+ private void conditionProperties(Map<String, Object> props) {
+ // ensure service.imported is set
+ if (!props.containsKey(SERVICE_IMPORTED)) {
+ props.put(SERVICE_IMPORTED, Boolean.toString(true));
+ }
+
+ // remove service.exported.* properties
+ for (Iterator<String> iter = props.keySet().iterator(); iter.hasNext();) {
+ String key = iter.next();
+ if (SERVICE_EXPORTED_.regionMatches(true, 0, key, 0,
+ SERVICE_EXPORTED_length)) {
+ iter.remove();
+ }
+ }
+ }
+
/**
* Verify and obtain the interface list from the properties.
*
@@ -259,7 +280,8 @@ public class EndpointDescription {
* Verify and obtain a required String property.
*
* @param propName The name of the property
- * @return The value of the property or null if the property is not set.
+ * @return The value of the property or <code>null</code> if the property is
+ * not set.
* @throws IllegalArgumentException when the property doesn't have the
* correct data type.
*/
@@ -307,10 +329,11 @@ public class EndpointDescription {
* have the same id. Two Endpoint Descriptions with the same id must
* represent the same endpoint.
*
- * The value of the id is stored in the
- * {@link RemoteConstants#ENDPOINT_ID} property.
+ * The value of the id is stored in the {@link RemoteConstants#ENDPOINT_ID}
+ * property.
*
- * @return The id of the endpoint, never <code>null</code>.
+ * @return The id of the endpoint, never <code>null</code>. The returned
+ * value has leading and trailing whitespace removed.
*/
public String getId() {
return id;
@@ -426,8 +449,8 @@ public class EndpointDescription {
/**
* Reads a 'String+' property from the properties map, which may be of type
- * String, String[] or Collection<String> and returns it as an unmodifiable
- * List.
+ * String, String[] or Collection<String> and returns it as an
+ * unmodifiable List.
*
* @param key The property
* @return An unmodifiable list
@@ -474,8 +497,8 @@ public class EndpointDescription {
* The value of the remote framework uuid is stored in the
* {@link RemoteConstants#ENDPOINT_FRAMEWORK_UUID} endpoint property.
*
- * @return Remote Framework UUID, or null if this endpoint is not associated
- * with an OSGi framework having a framework uuid.
+ * @return Remote Framework UUID, or <code>null</code> if this endpoint is
+ * not associated with an OSGi framework having a framework uuid.
*/
public String getFrameworkUUID() {
return frameworkUUID;
@@ -580,6 +603,63 @@ public class EndpointDescription {
}
/**
+ * Returns the string representation of this EndpointDescription.
+ *
+ * @return String form of this EndpointDescription.
+ */
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append('{');
+ Iterator<Map.Entry<String, Object>> iter = properties.entrySet()
+ .iterator();
+ boolean comma = false;
+ while (iter.hasNext()) {
+ Map.Entry<String, Object> entry = iter.next();
+ if (comma) {
+ sb.append(", ");
+ }
+ else {
+ comma = true;
+ }
+ sb.append(entry.getKey());
+ sb.append('=');
+ Object value = entry.getValue();
+ if (value != null) {
+ Class< ? > valueType = value.getClass();
+ if (Object[].class.isAssignableFrom(valueType)) {
+ append(sb, (Object[]) value);
+ continue;
+ }
+ }
+ sb.append(value);
+ }
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Append the specified Object array to the specified StringBuffer.
+ *
+ * @param sb Receiving StringBuffer.
+ * @param value Object array to append to the specified StringBuffer.
+ */
+ private static void append(StringBuffer sb, Object[] value) {
+ sb.append('[');
+ boolean comma = false;
+ final int length = value.length;
+ for (int i = 0; i < length; i++) {
+ if (comma) {
+ sb.append(", ");
+ }
+ else {
+ comma = true;
+ }
+ sb.append(String.valueOf(value[i]));
+ }
+ sb.append(']');
+ }
+
+ /**
* Unmodifiable Dictionary wrapper for a Map. This class is also used by
* EndpointPermission.
*/
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointListener.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointListener.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointListener.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointListener.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,25 +23,25 @@ package org.osgi.service.remoteservicead
* is interested in Endpoint Descriptions.
*
* This white board service can be used in many different scenarios. However,
- * the primary use case is to allow a remote manager to be informed of End Point
+ * the primary use case is to allow a remote manager to be informed of Endpoint
* Descriptions available in the network and inform the network about available
- * End Point Descriptions.
+ * Endpoint Descriptions.
*
* Both the network bundle and the manager bundle register an Endpoint Listener
- * service. The manager informs the network bundle about End Points that it
+ * service. The manager informs the network bundle about Endpoints that it
* creates. The network bundles then uses a protocol like SLP to announce these
* local end-points to the network.
*
* If the network bundle discovers a new Endpoint through its discovery
- * protocol, then it sends an End Point Description to all the End Point
- * Listener services that are registered (except its own) that have specified an
- * interest in that endpoint.
+ * protocol, then it sends an Endpoint Description to all the Endpoint Listener
+ * services that are registered (except its own) that have specified an interest
+ * in that endpoint.
*
* Endpoint Listener services can express their <i>scope</i> with the service
* property {@link #ENDPOINT_LISTENER_SCOPE}. This service property is a list of
* filters. An Endpoint Description should only be given to a Endpoint Listener
* when there is at least one filter that matches the Endpoint Description
- * properties. given to it.
+ * properties.
*
* This filter model is quite flexible. For example, a discovery bundle is only
* interested in locally originating Endpoint Descriptions. The following filter
@@ -78,7 +78,6 @@ package org.osgi.service.remoteservicead
* implementers should realize that many endpoints come through unreliable
* discovery processes.
*
- *
* @ThreadSafe
* @version $Revision$
*/
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointPermission.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointPermission.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointPermission.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/EndpointPermission.java Sat Mar 20 16:27:53 2010
@@ -97,8 +97,8 @@ public final class EndpointPermission ex
private volatile String actions = null;
/**
- * The endpoint used by this EndpointPermission. Must be null if not
- * constructed with a endpoint.
+ * The endpoint used by this EndpointPermission. Must be <code>null</code>
+ * if not constructed with a endpoint.
*/
transient final EndpointDescription endpoint;
@@ -111,7 +111,7 @@ public final class EndpointPermission ex
/**
* If this EndpointPermission was not constructed with an
* EndpointDescription, this holds a Filter matching object used to evaluate
- * the filter in implies or null for wildcard.
+ * the filter in implies or <code>null</code> for wildcard.
*/
transient Filter filter;
@@ -454,7 +454,7 @@ public final class EndpointPermission ex
* this <code>EndpointPermission</code>.
*
* @param obj The object to test for equality.
- * @return true if obj is a <code>EndpointPermission</code>, and has the
+ * @return true If obj is a <code>EndpointPermission</code>, and has the
* same name, actions and endpoint as this
* <code>EndpointPermission</code> object; <code>false</code>
* otherwise.
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportReference.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportReference.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportReference.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportReference.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import org.osgi.framework.ServiceReferen
* An Export Reference associates a service with a local endpoint.
*
* The Export Reference can be used to reference an exported service. When the
- * service is no longer exported, all methods must return <code>null</code>;
+ * service is no longer exported, all methods must return <code>null</code>.
*
* @ThreadSafe
* @version $Revision$
@@ -31,15 +31,16 @@ public interface ExportReference {
/**
* Return the service being exported.
*
- * @return The service being exported, must be <code>null</code> when this
- * registration is unregistered.
+ * @return The service being exported. Must be <code>null</code> when the
+ * service is no longer exported.
*/
ServiceReference getExportedService();
/**
- * Return the Endpoint Description that is created for this registration.
+ * Return the Endpoint Description for the local endpoint.
*
- * @return the local Endpoint Description
+ * @return The Endpoint Description for the local endpoint. Must be
+ * <code>null</code> when the service is no longer exported.
*/
EndpointDescription getExportedEndpoint();
}
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportRegistration.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportRegistration.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportRegistration.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ExportRegistration.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.osgi.service.remoteserviceadmin;
+import java.util.Map;
+
import org.osgi.framework.ServiceReference;
/**
@@ -23,11 +25,10 @@ import org.osgi.framework.ServiceReferen
*
* The Export Registration can be used to delete the endpoint associated with an
* this registration. It is created with the
- * {@link RemoteServiceAdmin#exportService(ServiceReference,java.util.Map)}
- * method.
+ * {@link RemoteServiceAdmin#exportService(ServiceReference,Map)} method.
*
- * When this Export Registration has been unregistered, the methods must all
- * return <code>null</code>.
+ * When this Export Registration has been closed, all methods must return
+ * <code>null</code>.
*
* @ThreadSafe
* @version $Revision$
@@ -36,35 +37,33 @@ public interface ExportRegistration {
/**
* Return the Export Reference for the exported service.
*
- * @return An Export Reference for this registration
- * @throws IllegalStateException Thrown when this object was not properly
- * initialized, see {@link #getException()}
+ * @return The Export Reference for this registration.
+ * @throws IllegalStateException When this registration was not properly
+ * initialized. See {@link #getException()}.
*/
ExportReference getExportReference();
/**
* Delete the local endpoint and disconnect any remote distribution
- * providers. After this method returns, all the methods must return
+ * providers. After this method returns, all methods must return
* <code>null</code>.
*
- * This method has no effect when the endpoint is already destroyed or being
- * destroyed.
+ * This method has no effect when this registration has already been closed
+ * or is being closed.
*/
void close();
/**
- * Exception for any error during the import process.
+ * Return the exception for any error during the export process.
*
- * If the Remote Admin for some reasons is unable to create a registration,
- * then it must return a <code>Throwable</code> from this method. In this
- * case, all other methods must return on this interface must throw an
- * Illegal State Exception. If no error occurred, this method must return
- * <code>null</code>.
+ * If the Remote Service Admin for some reasons is unable to properly
+ * initialize this registration, then it must return an exception from this
+ * method. If no error occurred, this method must return <code>null</code>.
*
- * The error must be set before this Import Registration is returned.
+ * The error must be set before this Export Registration is returned.
* Asynchronously occurring errors must be reported to the log.
*
- * @return The exception that occurred during the creation of the
+ * @return The exception that occurred during the initialization of this
* registration or <code>null</code> if no exception occurred.
*/
Throwable getException();
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportReference.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportReference.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportReference.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportReference.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,23 +22,25 @@ import org.osgi.framework.ServiceReferen
* An Import Reference associates an active proxy service to a remote endpoint.
*
* The Import Reference can be used to reference an imported service. When the
- * service is no longer imported, all methods must return <code>null</code>;
+ * service is no longer imported, all methods must return <code>null</code>.
*
* @ThreadSafe
* @version $Revision$
*/
public interface ImportReference {
/**
- * Answer the associated Service Reference for the proxy to the endpoint.
+ * Return the Service Reference for the proxy for the endpoint.
*
- * @return A Service Reference to the proxy for the endpoint.
+ * @return The Service Reference to the proxy for the endpoint. Must be
+ * <code>null</code> when the service is no longer imported.
*/
ServiceReference getImportedService();
/**
- * Answer the associated remote Endpoint Description.
+ * Return the Endpoint Description for the remote endpoint.
*
- * @return A Endpoint Description for the remote endpoint.
+ * @return The Endpoint Description for the remote endpoint. Must be
+ * <code>null</code> when the service is no longer imported.
*/
EndpointDescription getImportedEndpoint();
}
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportRegistration.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportRegistration.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportRegistration.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/ImportRegistration.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,47 +21,47 @@ package org.osgi.service.remoteservicead
* endpoint.
*
* The Import Registration can be used to delete the proxy associated with an
- * endpoint. It is created with the{@link RemoteServiceAdmin#importService}
- * method.
+ * endpoint. It is created with the
+ * {@link RemoteServiceAdmin#importService(EndpointDescription)} method.
+ *
+ * When this Import Registration has been closed, all methods must return
+ * <code>null</code>.
*
* @ThreadSafe
* @version $Revision$
*/
public interface ImportRegistration {
/**
- * Answer the associated Export Reference.
+ * Return the Import Reference for the imported service.
*
- * @return An Import Reference for this registration
- * @throws IllegalStateException Thrown when this object was not properly
- * initialized, see {@link #getException()}
+ * @return The Import Reference for this registration.
+ * @throws IllegalStateException When this registration was not properly
+ * initialized. See {@link #getException()}.
*/
ImportReference getImportReference();
/**
- * Unregister this Import Registration. This must close the connection to
- * the end endpoint unregister the proxy. After this method returns, all
- * other methods must return null.
+ * Close this Import Registration. This must close the connection to the
+ * endpoint and unregister the proxy. After this method returns, all other
+ * methods must return <code>null</code>.
*
- * This method has no effect when the service is already unregistered or in
- * the process off.
+ * This method has no effect when this registration has already been closed
+ * or is being closed.
*/
void close();
/**
- * Exception for any error during the import process.
+ * Return the exception for any error during the import process.
*
- * If the Remote Admin for some reasons is unable to create a registration,
- * then it must return a <code>Throwable</code> from this method. In this
- * case, all other methods must return on this interface must thrown an
- * Illegal State Exception. If no error occurred, this method must return
- * <code>null</code>.
+ * If the Remote Service Admin for some reasons is unable to properly
+ * initialize this registration, then it must return an exception from this
+ * method. If no error occurred, this method must return <code>null</code>.
*
* The error must be set before this Import Registration is returned.
* Asynchronously occurring errors must be reported to the log.
*
- * @return The exception that occurred during the creation of the
+ * @return The exception that occurred during the initialization of this
* registration or <code>null</code> if no exception occurred.
*/
Throwable getException();
-
}
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteConstants.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteConstants.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteConstants.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteConstants.java Sat Mar 20 16:27:53 2010
@@ -17,13 +17,15 @@
package org.osgi.service.remoteserviceadmin;
/**
- * Provide the definition of the constants used in the Remote Services API.
+ * Provide the definition of the constants used in the Remote Service Admin
+ * specification.
*
* @Immutable
* @version $Revision$
*/
public class RemoteConstants {
private RemoteConstants() {
+ // non-instantiable
}
/**
@@ -166,7 +168,7 @@ public class RemoteConstants {
*/
public static final String SERVICE_INTENTS = "service.intents";
- /* above are from Ch 13 Remote Service spec. */
+ /* The above are from Ch. 13 Remote Services specification. */
/**
* Endpoint property identifying the id for this endpoint. This service
@@ -199,18 +201,18 @@ public class RemoteConstants {
/**
* Prefix for an endpoint property identifying the interface Java package
* version for an interface. For example, the property
- * endpoint.package.version.com.acme=1.3 describes the version of the
- * package for the com.acme.Foo interface. This endpoint property for an
- * interface package does not have to be set. If not set, the value must be
- * assumed to be 0.
+ * <code>endpoint.package.version.com.acme=1.3</code> describes the version
+ * of the package for the <code>com.acme.Foo</code> interface. This endpoint
+ * property for an interface package does not have to be set. If not set,
+ * the value must be assumed to be 0.
*
* <p>
* Since endpoint properties are stored in a case insensitive map, case
* variants of a package name are folded together.
*
* <p>
- * The value of this property must be of type <code>String</code>.
+ * The value of properties having this prefix must be of type
+ * <code>String</code>.
*/
public final static String ENDPOINT_PACKAGE_VERSION_ = "endpoint.package.version.";
-
}
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdmin.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdmin.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdmin.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdmin.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,10 +25,10 @@ import org.osgi.framework.ServiceReferen
* A Remote Service Admin manages the import and export of services.
*
* A Distribution Provider can expose a control interface. This interface allows
- * the a remote manager to control the export and import of services.
+ * a Topology Manager to control the export and import of services.
*
- * The API allows a remote manager to export a service, to import a service, and
- * find out about the current imports and exports.
+ * The API allows a Topology Manager to export a service, to import a service,
+ * and find out about the current imports and exports.
*
* @ThreadSafe
* @version $Revision$
@@ -36,37 +36,43 @@ import org.osgi.framework.ServiceReferen
public interface RemoteServiceAdmin {
/**
- * Export a service to a given endpoint. The Remote Service Admin must
- * create an endpoint from the given description that can be used by other
- * Distrbution Providers to connect to this Remote Service Admin and use the
- * exported service. This method can return null if the service could not be
- * exported because the endpoint could not be implemented by this Remote
- * Service Admin.
- *
- * The properties on a Service Reference are case insensitive while the
- * properties on a <code>properties</code> are case sensitive. A value in
- * the <code>properties</code> must therefore override any case variant in
- * the properties of the Service Reference.
+ * Export a service to a given Endpoint. The Remote Service Admin must
+ * create an Endpoint from the given description that can be used by other
+ * Distribution Providers to connect to this Remote Service Admin and use
+ * the exported service.
+ *
+ * The property keys of a Service Reference are case insensitive while the
+ * property keys of the specified <code>properties</code> map are case
+ * sensitive. A property key in the specified <code>properties</code> map
+ * must therefore override any case variant property key in the properties
+ * of the specified Service Reference.
*
* <p>
* If the caller does not have the appropriate
- * <code>EndpointPermission[endpoint,EXPORT]</code> for an endpoint, and the
+ * <code>EndpointPermission[endpoint,EXPORT]</code> for an Endpoint, and the
* Java Runtime Environment supports permissions, then the
* {@link ExportRegistration#getException() getException} method on the
* corresponding returned {@link ExportRegistration} will return a
* <code>SecurityException</code>.
*
* @param reference The Service Reference to export.
- * @param properties The properties to create a local endpoint that can be
- * implemented by this Remote Service Admin. If this is null, the
- * endpoint will be determined by the properties on the service. The
- * properties are the same as given for an exported service. They are
- * overlaid over any properties the service defines (case
- * insensitive). This parameter can be <code>null</code>, this should
- * be treated as an empty map.
- *
- * @return An Export Registration that combines the Endpoint Description and
- * the Service Reference.
+ * @param properties The properties to create a local Endpoint that can be
+ * implemented by this Remote Service Admin. If this is
+ * <code>null</code>, the Endpoint will be determined by the
+ * properties on the service. The properties are the same as given
+ * for an exported service. They override any properties in the
+ * specified Service Reference (case insensitive). The properties
+ * <code>objectClass</code> and <code>service.id</code>, in any case
+ * variant, are ignored. Those properties in the Service Reference
+ * cannot be overridden. This parameter can be <code>null</code>,
+ * this should be treated as an empty map.
+ * @return A <code>Collection</code> of {@link ExportRegistration}s for the
+ * specified Service Reference and properties. Multiple Export
+ * Registrations may be returned because a single service can be
+ * exported to multiple Endpoints depending on the available
+ * configuration type properties. The result is never
+ * <code>null</code> but may be empty if this Remove Service Admin
+ * does not recognize any of the configuration types.
* @throws IllegalArgumentException If any of the properties has a value
* that is not syntactically correct or if the service properties
* and the overlaid properties do not contain a
@@ -79,17 +85,17 @@ public interface RemoteServiceAdmin {
Map<String, Object> properties);
/**
- * Import a service from an endpoint. The Remote Service Admin must use the
- * given endpoint to create a proxy. This method can return null if the
- * service could not be imported.
+ * Import a service from an Endpoint. The Remote Service Admin must use the
+ * given Endpoint to create a proxy. This method can return
+ * <code>null</code> if the service could not be imported.
*
* @param endpoint The Endpoint Description to be used for import.
* @return An Import Registration that combines the Endpoint Description and
- * the Service Reference or <code>null</code> if the endpoint could
+ * the Service Reference or <code>null</code> if the Endpoint could
* not be imported.
* @throws SecurityException If the caller does not have the appropriate
* <code>EndpointPermission[endpoint,IMPORT]</code> for the
- * endpoint, and the Java Runtime Environment supports permissions.
+ * Endpoint, and the Java Runtime Environment supports permissions.
*/
ImportRegistration importService(EndpointDescription endpoint);
@@ -98,9 +104,9 @@ public interface RemoteServiceAdmin {
*
* <p>
* If the caller does not have the appropriate
- * <code>EndpointPermission[endpoint,READ]</code> for an endpoint, and the
+ * <code>EndpointPermission[endpoint,READ]</code> for an Endpoint, and the
* Java Runtime Environment supports permissions, then returned collection
- * will not contain a reference to the exported endpoint.
+ * will not contain a reference to the exported Endpoint.
*
* @return A <code>Collection</code> of {@link ExportReference}s that are
* currently active.
@@ -112,9 +118,9 @@ public interface RemoteServiceAdmin {
*
* <p>
* If the caller does not have the appropriate
- * <code>EndpointPermission[endpoint,READ]</code> for an endpoint, and the
+ * <code>EndpointPermission[endpoint,READ]</code> for an Endpoint, and the
* Java Runtime Environment supports permissions, then returned collection
- * will not contain a reference to the imported endpoint.
+ * will not contain a reference to the imported Endpoint.
*
* @return A <code>Collection</code> of {@link ImportReference}s that are
* currently active.
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminEvent.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminEvent.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminEvent.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminEvent.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,14 +19,14 @@ package org.osgi.service.remoteservicead
import org.osgi.framework.Bundle;
/**
- * Provides the event information for a Remote Admin event.
+ * Provides the event information for a Remote Service Admin event.
*
* @Immutable
* @version $Revision$
*/
public class RemoteServiceAdminEvent {
/**
- * Add an import registration. The Remote Services Admin will call this
+ * Add an import registration. The Remote Service Admin will call this
* method when it imports a service. When this service is registered, the
* Remote Service Admin must notify the listener of all existing Import
* Registrations.
@@ -35,7 +35,7 @@ public class RemoteServiceAdminEvent {
public static final int IMPORT_REGISTRATION = 1;
/**
- * Add an export registration. The Remote Services Admin will call this
+ * Add an export registration. The Remote Service Admin will call this
* method when it exports a service. When this service is registered, the
* Remote Service Admin must notify the listener of all existing Export
* Registrations.
@@ -43,14 +43,14 @@ public class RemoteServiceAdminEvent {
public static final int EXPORT_REGISTRATION = 2;
/**
- * Remove an export registration. The Remote Services Admin will call this
+ * Remove an export registration. The Remote Service Admin will call this
* method when it removes the export of a service.
*
*/
public static final int EXPORT_UNREGISTRATION = 3;
/**
- * Remove an import registration. The Remote Services Admin will call this
+ * Remove an import registration. The Remote Service Admin will call this
* method when it removes the import of a service.
*
*/
Modified: cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.java?rev=925633&r1=925632&r2=925633&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-osgi-remote-service-admin-interfaces/src/main/java/org/osgi/service/remoteserviceadmin/RemoteServiceAdminListener.java Sat Mar 20 16:27:53 2010
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ package org.osgi.service.remoteservicead
public interface RemoteServiceAdminListener {
/**
* Receive notification of any export or import registrations and
- * unregistrations.
+ * unregistrations as well as errors and warnings.
*
* @param event The {@link RemoteServiceAdminEvent} object.
*/