cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r768288 [2/2] - in /cxf/dosgi/trunk: discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ discovery/distributed/cxf-discovery/src/test/java/org/apache/cxf/dosgi/discovery/zookeeper/ discovery/local/src...
Date Fri, 24 Apr 2009 12:49:20 GMT
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceNotification.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceNotification.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceNotification.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceNotification.java Fri Apr 24 12:49:19 2009
@@ -1,102 +1,108 @@
-/*
- * Copyright (c) OSGi Alliance (2008). 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.
- * 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.osgi.service.discovery;
-
-import java.util.Collection;
-
-/**
- * Interface for notification on discovered services.
- * 
- * @version $Revision: 6510 $
- */
-public interface DiscoveredServiceNotification {
-
-	/**
-	 * Notification indicating that a service matching the listening criteria has been
-	 * discovered.
-	 * <p>
-	 * The value of <code>AVAILABLE</code> is 0x00000001.
-	 */
-	public final static int	AVAILABLE			= 0x00000001;
-
-	/**
-	 * Notification indicating that the properties of a previously discovered service
-	 * have changed.
-	 * <p>
-	 * The value of <code>MODIFIED</code> is 0x00000002.
-	 */
-	public final static int	MODIFIED			= 0x00000002;
-
-	/**
-	 * Notification indicating that a previously discovered service is no longer known
-	 * to discovery.
-	 * <p>
-	 * The value of <code>UNAVAILABLE</code> is 0x00000004.
-	 */
-	public final static int	UNAVAILABLE			= 0x00000004;
-
-	/**
-	 * Notification indicating that the properties of a previously discovered service
-	 * have changed and the new properties no longer match the listener's
-	 * filter.
-	 * <p>
-	 * The value of <code>MODIFIED_ENDMATCH</code> is 0x00000008.
-	 */
-	public final static int	MODIFIED_ENDMATCH	= 0x00000008;
-
-	/**
-	 * Returns information currently known to Discovery regarding the service
-	 * endpoint.
-	 * <p>
-	 * 
-	 * @return metadata of the service this Discovery notifies about.
-	 */
-	ServiceEndpointDescription getServiceEndpointDescription();
-
-	/**
-	 * Returns the type of notification. The type values are:
-	 * <ul>
-	 * <li>{@link #AVAILABLE}</li>
-	 * <li>{@link #MODIFIED}</li>
-	 * <li>{@link #MODIFIED_ENDMATCH}</li>
-	 * <li>{@link #UNAVAILABLE}</li>
-	 * </ul>
-	 * 
-	 * @return Type of notification regarding known service metadata.
-	 */
-	int getType();
-
-	/**
-	 * Returns interface name criteria of the {@link DiscoveredServiceTracker}
-	 * object matching with the interfaces of the ServiceEndpointDescription and
-	 * thus caused the notification.
-	 * 
-	 * @return matching interface name criteria of the
-	 *         {@link DiscoveredServiceTracker} object being notified.
-	 */
-	Collection/* <String> */getInterfaces();
-
-	/**
-	 * Returns filters of the {@link DiscoveredServiceTracker} object matching
-	 * with the ServiceEndpointDescription and thus caused the notification.
-	 * 
-	 * @return matching filters of the {@link DiscoveredServiceTracker} object
-	 *         being notified.
-	 */
-	Collection/* <String> */getFilters();
-}
-
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * 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.osgi.service.discovery;
+
+import java.util.Collection;
+
+/**
+ * Interface for notification on discovered services.
+ * <p>
+ * <code>DiscoveredServiceNotification</code> objects are immutable.
+ * 
+ * @Immutable
+ * @version $Revision: 6821 $
+ */
+public interface DiscoveredServiceNotification {
+
+	/**
+	 * Notification indicating that a service matching the listening criteria
+	 * has been discovered.
+	 * <p>
+	 * The value of <code>AVAILABLE</code> is 0x00000001.
+	 */
+	public final static int	AVAILABLE			= 0x00000001;
+
+	/**
+	 * Notification indicating that the properties of a previously discovered
+	 * service have changed.
+	 * <p>
+	 * The value of <code>MODIFIED</code> is 0x00000002.
+	 */
+	public final static int	MODIFIED			= 0x00000002;
+
+	/**
+	 * Notification indicating that a previously discovered service is no longer
+	 * known to <code>Discovery</code>.
+	 * <p>
+	 * The value of <code>UNAVAILABLE</code> is 0x00000004.
+	 */
+	public final static int	UNAVAILABLE			= 0x00000004;
+
+	/**
+	 * Notification indicating that the properties of a previously discovered
+	 * service have changed and the new properties no longer match the
+	 * listener's filter.
+	 * <p>
+	 * The value of <code>MODIFIED_ENDMATCH</code> is 0x00000008.
+	 */
+	public final static int	MODIFIED_ENDMATCH	= 0x00000008;
+
+	/**
+	 * Returns information currently known to <code>Discovery</code> regarding
+	 * the service endpoint.
+	 * 
+	 * @return metadata of the service <code>Discovery</code> notifies about. Is
+	 *         never <code>null</code>.
+	 */
+	ServiceEndpointDescription getServiceEndpointDescription();
+
+	/**
+	 * Returns the type of notification. The type values are:
+	 * <ul>
+	 * <li>{@link #AVAILABLE}</li>
+	 * <li>{@link #MODIFIED}</li>
+	 * <li>{@link #MODIFIED_ENDMATCH}</li>
+	 * <li>{@link #UNAVAILABLE}</li>
+	 * </ul>
+	 * 
+	 * @return Type of notification regarding known service metadata.
+	 */
+	int getType();
+
+	/**
+	 * Returns interface name criteria of the {@link DiscoveredServiceTracker}
+	 * object matching with the interfaces of the
+	 * <code>ServiceEndpointDescription</code> and thus caused the notification.
+	 * 
+	 * @return <code>Collection (&lt;? extends String&gt;)</code> of matching interface name criteria of the
+	 *         <code>DiscoveredServiceTracker</code> object being notified, or
+	 *         an empty collection if notification hasn't been caused by a
+	 *         matching interface name criteria.
+	 */
+	Collection/* <? extends String> */getInterfaces();
+
+	/**
+	 * Returns filters of the <code>DiscoveredServiceTracker</code> object
+	 * matching with the properties of the
+	 * <code>ServiceEndpointDescription</code> and thus caused the notification.
+	 * 
+	 * @return <code>Collection (&lt;? extends String&gt;)</code> of matching filters of the <code>DiscoveredServiceTracker</code>
+	 *         object being notified, or an empty collection if notification
+	 *         hasn't been caused by a matching filter criteria.
+	 */
+	Collection/* <? extends String> */getFilters();
+}
\ No newline at end of file

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceTracker.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceTracker.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceTracker.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/DiscoveredServiceTracker.java Fri Apr 24 12:49:19 2009
@@ -1,72 +1,82 @@
-/*
- * Copyright (c) OSGi Alliance (2008). 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.
- * 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.osgi.service.discovery;
-
-/**
- * Interface of trackers for discovered remote services. <br>
- * When such a service is registered with the framework, then {@link Discovery}
- * will notify it about remote services matching one of the provided criteria
- * and will keep notifying it on changes of information known to Discovery
- * regarding this services.
- * 
- * <code>Discovery</code> may deliver notifications on discovered services to a
- * <code>DiscoveredServiceTracker</code> out of order and may concurrently call
- * and/or reenter a <code>DiscoveredServiceTracker</code>.
- * 
- * @version $Revision: 6553 $
- */
-public interface DiscoveredServiceTracker {
-
-	/**
-	 * Optional ServiceRegistration property which contains service interfaces
-	 * this tracker is interested in. Value of this property is of type
-	 * Collection (<? extends String>). <br>
-	 * Property is optional, may be null.
-	 */
-	public static final String	PROP_KEY_MATCH_CRITERIA_INTERFACES	= "osgi.discovery.interest.interfaces";
-
-	/**
-	 * Optional ServiceRegistration property which contains filters for services
-	 * this tracker is interested in. <br>
-	 * Note that these filters need to take into account service publication
-	 * properties which are not necessarily the same as properties under which a
-	 * service is registered. See {@link ServicePublication} for some standard
-	 * properties used to publish service metadata. <br>
-	 * The following sample filter will make Discovery notify the
-	 * DiscoveredServiceTracker about services providing interface
-	 * 'my.company.foo' of version '1.0.1.3':<br>
-	 * "(&amp;(service.interface=my.company.foo)(service.interface.version=my.company.foo|1.0.1.3))". <br>
-	 * Value of this property is of type Collection (&lt;? extends String%gt;).
-	 * Property is optional, may be null.
-	 */
-	public static final String	PROP_KEY_MATCH_CRITERIA_FILTERS		= "osgi.discovery.interest.filters";
-
-	/**
-	 * Receives notification that information known to Discovery regarding a
-	 * remote service has changed. <br>
-	 * The tracker is only notified about remote services which fulfill the
-	 * matching criteria, either one of the interfaces or one of the filters,
-	 * provided as properties of this service. <br>
-	 * If multiple criteria match, then the tracker is notified about each of
-	 * them. This can be done either by a single notification callback or by
-	 * multiple subsequent ones.
-	 * 
-	 * @param notification the <code>DiscoveredServiceNotification</code> object
-	 *        describing the change.
-	 */
-	void serviceChanged(DiscoveredServiceNotification notification);
-}
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * 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.osgi.service.discovery;
+
+/**
+ * Interface of trackers for discovered remote services.
+ * <p>
+ * When a service implementing this interface is registered with the framework,
+ * then <code>Discovery</code> will notify it about remote services matching one
+ * of the provided criteria and will keep notifying it on changes of information
+ * known to Discovery regarding this services.
+ * 
+ * <code>Discovery</code> may deliver notifications on discovered services to a
+ * <code>DiscoveredServiceTracker</code> out of order and may concurrently call
+ * and/or reenter a <code>DiscoveredServiceTracker</code>.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 6845 $
+ */
+public interface DiscoveredServiceTracker {
+
+	/**
+	 * Optional ServiceRegistration property which contains service interfaces
+	 * this tracker is interested in.
+	 * <p>
+	 * Value of this property is of type
+	 * <code>Collection (&lt;? extends String&gt;)</code>. May be
+	 * <code>null</code> or empty.
+	 */
+	public static final String	INTERFACE_MATCH_CRITERIA	= "osgi.remote.discovery.interest.interfaces";
+
+	/**
+	 * Optional ServiceRegistration property which contains filters for services
+	 * this tracker is interested in.
+	 * <p>
+	 * Note that these filters need to take into account service publication
+	 * properties which are not necessarily the same as properties under which a
+	 * service is registered. See {@link ServicePublication} for some standard
+	 * properties used to publish service metadata.
+	 * <p>
+	 * The following sample filter will make <code>Discovery</code> notify the
+	 * <code>DiscoveredServiceTracker</code> about services providing interface
+	 * 'my.company.foo' of version '1.0.1.3':
+	 * <code>"(&amp;(service.interface=my.company.foo)(service.interface.version=my.company.foo|1.0.1.3))"</code>.
+	 * <p>
+	 * Value of this property is of type
+	 * <code>Collection (&lt;? extends String&gt;)</code>. May be
+	 * <code>null</code>. or empty
+	 */
+	public static final String	FILTER_MATCH_CRITERIA		= "osgi.remote.discovery.interest.filters";
+
+	/**
+	 * Receives notification that information known to <code>Discovery</code>
+	 * regarding a remote service has changed.
+	 * <p>
+	 * The tracker is only notified about remote services which fulfill the
+	 * matching criteria, either one of the interfaces or one of the filters,
+	 * provided as properties of this service.
+	 * <p>
+	 * If multiple criteria match, then the tracker is notified about each of
+	 * them. This can be done either by a single notification callback or by
+	 * multiple subsequent ones.
+	 * 
+	 * @param notification the <code>DiscoveredServiceNotification</code> object
+	 *        describing the change. Is never <code>null</code>.
+	 */
+	void serviceChanged(DiscoveredServiceNotification notification);
+}

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/Discovery.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/Discovery.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/Discovery.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/Discovery.java Fri Apr 24 12:49:19 2009
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
@@ -17,41 +17,51 @@
 package org.osgi.service.discovery;
 
 /**
- * Discovery registers a service implementing this interface. This service is
- * registered with extra properties identified at the beginning of this
- * interface to denote the name of the product providing Discovery
- * functionality, its version, vendor, used protocols etc.. 
- * 
+ * Every Discovery Provider registers a service implementing this interface.
+ * This service is registered with extra properties identified at the beginning
+ * of this interface to denote the name of the product providing Discovery
+ * functionality, its version, vendor, used protocols etc..
+ * <p>
  * Discovery allows to publish services exposed for remote access as well as to
  * search for remote services. Register a {@link ServicePublication} service in
  * order to publish service metadata and or a {@link DiscoveredServiceTracker}
- * service in order to search for remote services.<BR>
+ * service in order to search for remote services.
+ * <p>
  * Discovery service implementations usually rely on some discovery protocols or
  * other information distribution means.
  * 
+ * @ThreadSafe
  * @version $Revision$
  */
 public interface Discovery {
 
 	/**
-	 * Service Registration property for the name of the Discovery product.
+	 * ServiceRegistration property for the name of the Discovery product.
+	 * <p>
+	 * Value of this property is of type <code>String</code>.
 	 */
-	static final String PROP_KEY_PRODUCT_NAME = "osgi.remote.discovery.product";
+	static final String	PRODUCT_NAME		= "osgi.remote.discovery.product";
 
 	/**
-	 * Service Registration property for the version of the Discovery product.
+	 * ServiceRegistration property for the version of the Discovery product.
+	 * <p>
+	 * Value of this property is of type <code>String</code>.
 	 */
-	static final String PROP_KEY_PRODUCT_VERSION = "osgi.remote.discovery.product.version";
+	static final String	PRODUCT_VERSION		= "osgi.remote.discovery.product.version";
 
 	/**
-	 * Service Registration property for the Discovery product vendor name.
+	 * ServiceRegistration property for the Discovery product vendor name.
+	 * <p>
+	 * Value of this property is of type <code>String</code>.
 	 */
-	static final String PROP_KEY_VENDOR_NAME = "osgi.remote.discovery.vendor";
+	static final String	VENDOR_NAME			= "osgi.remote.discovery.vendor";
 
 	/**
-	 * Service Registration property that lists the discovery protocols used by
-	 * this Discovery service. Value of this property is of type Collection (<?
-	 * extends String>).
+	 * ServiceRegistration property that lists the discovery protocols used by
+	 * this Discovery service.
+	 * <p>
+	 * Value of this property is of type
+	 * <code>Collection (&lt;? extends String&gt;)</code>.
 	 */
-	static final String PROP_KEY_SUPPORTED_PROTOCOLS = "osgi.remote.discovery.supported_protocols";
+	static final String	SUPPORTED_PROTOCOLS	= "osgi.remote.discovery.supported_protocols";
 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java Fri Apr 24 12:49:19 2009
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2009). 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,7 +16,7 @@
 
 package org.osgi.service.discovery;
 
-import java.net.URL;
+import java.net.URI;
 import java.util.Collection;
 import java.util.Map;
 
@@ -25,91 +25,105 @@
  * considered as a wrapper around the property map of a published service and
  * its endpoint. It provides an API to conveniently access the most important
  * properties of the service.
+ * <p>
+ * <code>ServiceEndpointDescription</code> objects are immutable.
  * 
+ * @Immutable
  * @version $Revision$
  */
 public interface ServiceEndpointDescription {
 
 	/**
 	 * Returns the value of the property with key
-	 * {@link ServicePublication#PROP_KEY_SERVICE_INTERFACE_NAME}.
+	 * {@link ServicePublication#SERVICE_INTERFACE_NAME}.
 	 * 
-	 * @return service interface names provided by the advertised service
-	 *         (endpoint). The collection is never null or empty but contains at
+	 * @return <code>Collection (&lt;? extends String&gt;)</code> of service
+	 *         interface names provided by the advertised service endpoint. The
+	 *         collection is never <code>null</code> or empty but contains at
 	 *         least one service interface.
 	 */
 	Collection /* <? extends String> */getProvidedInterfaces();
 
 	/**
 	 * Returns non-Java endpoint interface name associated with the given
-	 * interface. Value of the property with key
-	 * {@link ServicePublication#PROP_KEY_ENDPOINT_INTERFACE_NAME} is used by
-	 * this operation.
-	 * 
-	 * @param interfaceName
-	 *            for which its non-Java endpoint interface name should be
-	 *            returned. 
-	 *            
-	 * @return non-Java endpoint interface name. Null, if it hasn't been
-	 *         provided.
+	 * interface.
+	 * <p>
+	 * Value of the property with key
+	 * {@link ServicePublication#ENDPOINT_INTERFACE_NAME} is used by this
+	 * operation.
+	 * 
+	 * @param interfaceName for which its non-Java endpoint interface name
+	 *        should be returned.
+	 * @return non-Java endpoint interface name, or <code>null</code> if it
+	 *         hasn't been provided or if given interface name is
+	 *         <code>null</code>.
 	 */
 	String getEndpointInterfaceName(String interfaceName);
 
 	/**
-	 * Returns version of the given interface. Value of the property with key
-	 * {@link ServicePublication#PROP_KEY_SERVICE_INTERFACE_VERSION} is used by
-	 * this operation.
-	 * 
-	 * @param interfaceName
-	 *            for which its version should be returned.
-	 * @return Version of given service interface. Null, if it hasn't been
-	 *         provided.
+	 * Returns version of the given interface.
+	 * <p>
+	 * Value of the property with key
+	 * {@link ServicePublication#SERVICE_INTERFACE_VERSION} is used by this
+	 * operation.
+	 * 
+	 * @param interfaceName for which its version should be returned.
+	 * @return Version of given service interface, or <code>null</code> if it
+	 *         hasn't been provided or if given interface name is
+	 *         <code>null</code>.
 	 */
 	String getVersion(String interfaceName);
 
 	/**
 	 * Returns the value of the property with key
-	 * {@link ServicePublication#PROP_KEY_ENDPOINT_LOCATION}.
+	 * {@link ServicePublication#ENDPOINT_LOCATION}.
 	 * 
-	 * @return The URL of the service location. Null, if it hasn't been
-	 *         provided.
+	 * @return The url of the service location, or <code>null</code> if it
+	 *         hasn't been provided.
 	 */
-	URL getLocation();
+	URI getLocation();
 
 	/**
 	 * Returns the value of the property with key
-	 * {@link ServicePublication#PROP_KEY_ENDPOINT_ID}.
+	 * {@link ServicePublication#ENDPOINT_ID}.
 	 * 
-	 * @return Unique id of service endpoint. Null, if it hasn't been provided.
+	 * @return Unique id of service endpoint, or <code>null</code> if it hasn't
+	 *         been provided.
 	 */
 	String getEndpointID();
 
 	/**
 	 * Getter method for the property value of a given key.
 	 * 
-	 * @param key
-	 *            Name of the property
-	 * @return The property value, null if none is found for the given key
+	 * @param key Name of the property
+	 * @return The property value, or <code>null</code> if none is found for the
+	 *         given key or if provided key is <code>null</code>.
 	 */
 	Object getProperty(String key);
 
 	/**
-	 * @return <code>java.util.Collection</code> of property names available in
-	 *         the ServiceEndpointDescription. The collection is never null or
-	 *         empty but contains at least basic properties like objectClass for
-	 *         the service interface. The collection represents a snapshot and
-	 *         as such is not going to be updated in case properties were added
-	 *         or removed at a later point of time.
+	 * Returns all names of service endpoint properties.
+	 * 
+	 * @return a <code>Collection (&lt;? extends String&gt;)</code> of property
+	 *         names available in the ServiceEndpointDescription. The collection
+	 *         is never <code>null</code> or empty but contains at least names
+	 *         of mandatory <code>ServicePublication</code> properties. Since
+	 *         <code>ServiceEndpointDescription</code> objects are immutable,
+	 *         the returned collection is also not going to be updated at a
+	 *         later point of time.
 	 */
 	Collection/* <? extends String> */getPropertyKeys();
 
 	/**
-	 * @return Returns all properties of the service as a
-	 *         <code>java.util.Map</code>. The map is never null or empty but
-	 *         contains at least basic properties like objectClass for the
-	 *         service interface. The collection represents a snapshot and as
-	 *         such is not going to be updated in case properties were added or
-	 *         removed at a later point of time.
+	 * Returns all service endpoint properties.
+	 * 
+	 * @return all properties of the service as a
+	 *         <code>Map (&lt;String, Object&gt;)</code>. The map is never
+	 *         <code>null</code> or empty but contains at least mandatory
+	 *         <code>ServicePublication</code> properties. Since
+	 *         <code>ServiceEndpointDescription</code> objects are immutable,
+	 *         the returned map is also not going to be updated at a later point
+	 *         of time.
 	 */
 	Map/* <String, Object> */getProperties();
 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServicePublication.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServicePublication.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServicePublication.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/discovery/ServicePublication.java Fri Apr 24 12:49:19 2009
@@ -1,116 +1,148 @@
-/*
- * Copyright (c) OSGi Alliance (2008). 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.
- * 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.osgi.service.discovery;
-
-/**
- * Register a service implementing the <code>ServicePublication</code> interface
- * in order to publish metadata of a particular service (endpoint) via
- * Discovery. Metadata which has to be published is given in form of properties
- * at registration. <br>
- * In order to update published service metadata, update the properties
- * registered with the <code>ServicePublication</code> service. Depending on
- * Discovery's implementation and underlying protocol it may result in an update
- * or new re-publication of the service. <br>
- * In order to unpublish the previously published service metadata, unregister
- * the <code>ServicePublication</code> service.<br>
- * 
- * Please note that providing the {@link #PROP_KEY_SERVICE_INTERFACE_NAME}
- * property is mandatory when a <code>ServicePublication</code> service is
- * registered. Note also that a Discovery implementation may require provision
- * of additional properties, e.g. some of the standard properties defined below,
- * or may make special use of them in case they are provided. For example an
- * SLP-based Discovery might use the value provided with the
- * {@link #PROP_KEY_ENDPOINT_LOCATION} property for construction of a SLP-URL
- * used to publish the service.<br>
- * 
- * Also important is that it's not guaranteed that after registering a
- * <code>ServicePublication</code> object its service metadata is actually
- * published. Beside the fact that at least one Discovery service has to be
- * present, the provided properties have to be valid, e.g. shouldn't contain
- * case variants of the same key name, and the actual publication via Discovery
- * mechanisms has to succeed.
- * 
- * @version $Revision: 6485 $
- */
-public interface ServicePublication {
-
-	/**
-	 * Mandatory ServiceRegistration property which contains a collection of
-	 * full qualified interface names offered by the advertised service
-	 * endpoint. Value of this property is of type Collection (<? extends
-	 * String>).
-	 */
-	public static final String	PROP_KEY_SERVICE_INTERFACE_NAME		= "service.interface";
-
-	/**
-	 * Optional ServiceRegistration property which contains a collection of
-	 * interface names with their associated version attributes separated by
-	 * {@link #SEPARATOR} e.g. 'my.company.foo|1.3.5 my.company.zoo|2.3.5'. In
-	 * case no version has been provided for an interface, Discovery may use the
-	 * String-value of <code>org.osgi.framework.Version.emptyVersion</code>
-	 * constant. <br>
-	 * Value of this property is of type Collection (<? extends String>).
-	 */
-	public static final String	PROP_KEY_SERVICE_INTERFACE_VERSION	= "service.interface.version";
-
-	/**
-	 * Optional ServiceRegistration property which contains a collection of
-	 * interface names with their associated (non-Java) endpoint interface names
-	 * separated by {@link #SEPARATOR} e.g.:<br>
-	 * 'my.company.foo|MyWebService my.company.zoo|MyWebService'.<br>
-	 * This (non-Java) endpoint interface name is usually a communication
-	 * protocol specific interface, for instance a web service interface name.
-	 * Though this information is usually contained in accompanying properties
-	 * e.g. a wsdl file, Discovery usually doesn't read and interprets such
-	 * service meta-data. Providing this information explicitly, might allow
-	 * external non-Java applications find services based on this endpoint
-	 * interface.
-	 * 
-	 * Value of this property is of type Collection (<? extends String>).
-	 */
-	public static final String	PROP_KEY_ENDPOINT_INTERFACE_NAME	= "osgi.remote.endpoint.interface";
-
-	/**
-	 * Optional ServiceRegistration property which contains a map of properties
-	 * of the published service. <br>
-	 * Property keys are handled in a case insensitive manner (as OSGi Framework
-	 * does). <br>
-	 * Value of this property is of type <code>java.util.Map<code>.
-	 */
-	public static final String	PROP_KEY_SERVICE_PROPERTIES			= "service.properties";
-
-	/**
-	 * Optional property of the published service identifying its location.
-	 * Value of this property is of type <code>java.net.URL<code>.
-	 */
-	public static final String	PROP_KEY_ENDPOINT_LOCATION			= "osgi.remote.endpoint.location";
-
-	/**
-	 * Optional property of the published service uniquely identifying its
-	 * endpoint. Value of this property is of type <code>String<code>.
-	 */
-	public static final String	PROP_KEY_ENDPOINT_ID				= "osgi.remote.endpoint.id";
-
-	/**
-	 * Separator constant for association of interface-specific values with the
-	 * particular interface name. See also
-	 * {@link #PROP_KEY_SERVICE_INTERFACE_VERSION} and
-	 * {@link #PROP_KEY_ENDPOINT_INTERFACE_NAME} properties which describe such
-	 * interface-specific values.
-	 */
-	public static final String	SEPARATOR							= "|";
-}
+/*
+ * Copyright (c) OSGi Alliance (2008, 2009). 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.
+ * 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.osgi.service.discovery;
+
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Register a service implementing the <code>ServicePublication</code> interface
+ * in order to publish metadata of a particular service (endpoint) via
+ * Discovery. Metadata which has to be published is given in form of properties
+ * at registration.
+ * <p>
+ * In order to update published service metadata, update the properties
+ * registered with the <code>ServicePublication</code> service. Depending on
+ * Discovery's implementation and underlying protocol it may result in an update
+ * or new re-publication of the service.
+ * <p>
+ * In order to unpublish the previously published service metadata, unregister
+ * the <code>ServicePublication</code> service.
+ * <p>
+ * Please note that providing the {@link #SERVICE_INTERFACE_NAME} property is
+ * mandatory when a <code>ServicePublication</code> service is registered. Note
+ * also that a Discovery implementation may require provision of additional
+ * properties, e.g. some of the standard properties defined below, or may make
+ * special use of them in case they are provided. For example an SLP-based
+ * Discovery might use the value provided with the {@link #ENDPOINT_LOCATION}
+ * property for construction of a SLP-URL used to publish the service.
+ * <p>
+ * Also important is that it's not guaranteed that after registering a
+ * <code>ServicePublication</code> object its service metadata is actually
+ * published. Beside the fact that at least one Discovery service has to be
+ * present, the provided properties have to be valid, e.g. shouldn't contain
+ * case variants of the same key name, and the actual publication via Discovery
+ * mechanisms has to succeed.
+ * 
+ * @ThreadSafe
+ * @version $Revision: 6845 $
+ */
+public interface ServicePublication {
+
+	/**
+	 * Mandatory ServiceRegistration property which contains a collection of
+	 * full qualified interface names offered by the advertised service
+	 * endpoint.
+	 * <p>
+	 * Value of this property is of type
+	 * <code>Collection (&lt;? extends String&gt;)</code>.
+	 */
+	public static final String	SERVICE_INTERFACE_NAME		= "osgi.remote.interfaces";
+
+	/**
+	 * Optional ServiceRegistration property which contains a collection of
+	 * interface names with their associated version attributes separated by
+	 * {@link #SEPARATOR} e.g. ["my.company.foo|1.3.5", "my.company.zoo|2.3.5"].
+	 * In case no version has been provided for an interface, Discovery may use
+	 * the String-value of <code>org.osgi.framework.Version.emptyVersion</code>
+	 * constant.
+	 * <p>
+	 * Value of this property is of type
+	 * <code>Collection (&lt;? extends String&gt;)</code>, may be
+	 * <code>null</code> or empty.
+	 */
+	public static final String	SERVICE_INTERFACE_VERSION	= "osgi.remote.interfaces.version";
+
+	/**
+	 * Optional ServiceRegistration property which contains a collection of
+	 * interface names with their associated (non-Java) endpoint interface names
+	 * separated by {@link #SEPARATOR} e.g.:<br>
+	 * ["my.company.foo|MyWebService", "my.company.zoo|MyWebService"].
+	 * <p>
+	 * This (non-Java) endpoint interface name is usually a communication
+	 * protocol specific interface, for instance a web service interface name.
+	 * Though this information is usually contained in accompanying properties
+	 * e.g. a wsdl file, Discovery usually doesn't read and interprets such
+	 * service meta-data. Providing this information explicitly, might allow
+	 * external non-Java applications find services based on this endpoint
+	 * interface.
+	 * <p>
+	 * Value of this property is of type
+	 * <code>Collection (&lt;? extends String&gt;)</code>, may be
+	 * <code>null</code> or empty.
+	 */
+	public static final String	ENDPOINT_INTERFACE_NAME		= "osgi.remote.endpoint.interfaces";
+
+	/**
+	 * Optional ServiceRegistration property which contains a map of properties
+	 * of the published service.
+	 * <p>
+	 * Property keys are handled in a case insensitive manner (as OSGi Framework
+	 * does).
+	 * <p>
+	 * Value of this property is of type <code>Map (String, Object)</code>, may
+	 * be <code>null</code> or empty.
+	 */
+	public static final String	SERVICE_PROPERTIES			= "osgi.remote.discovery.publication.service.properties";
+
+	/**
+	 * Optional property of the published service identifying its location. This
+	 * property is provided as part of the service property map referenced by
+	 * the {@link #SERVICE_PROPERTIES} ServiceRegistration property.
+	 * <p>
+	 * Value of this property is of type <code>java.net.URI</code>, may be
+	 * <code>null</code>.
+	 */
+	public static final String	ENDPOINT_LOCATION			= "osgi.remote.endpoint.location";
+
+	/**
+	 * Optional property of the published service uniquely identifying its
+	 * endpoint. This property is provided as part of the service property map
+	 * referenced by the {@link #SERVICE_PROPERTIES} ServiceRegistration
+	 * property.
+	 * <p>
+	 * Value of this property is of type <code>String</code>, may be
+	 * <code>null</code>.
+	 */
+	public static final String	ENDPOINT_ID					= "osgi.remote.endpoint.id";
+
+	/**
+	 * Separator constant for association of interface-specific values with the
+	 * particular interface name. See also {@link #SERVICE_INTERFACE_VERSION}
+	 * and {@link #ENDPOINT_INTERFACE_NAME} properties which describe such
+	 * interface-specific values.
+	 */
+	public static final String	SEPARATOR					= "|";
+
+	/**
+	 * Returns the <code>ServiceReference</code> this publication metadata is
+	 * associated with.
+	 * 
+	 * @return the <code>ServiceReference</code> being published. Is never
+	 *         <code>null</code>.
+	 */
+	ServiceReference getReference();
+}

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java Fri Apr 24 12:49:19 2009
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009). 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,76 +16,86 @@
 package org.osgi.service.distribution;
 
 /**
- * Defines standard names for distribution-related service properties.
+ * Defines standard names for distribution related service properties.
+ * 
+ * @Immutable
+ * @version $Revision$
  */
 public class DistributionConstants {
-    /** This class only contains static constants and should not be instantiated. 
-     */
-    private DistributionConstants() {}
-
-    /**
-     * This service registration property indicates that the provided service is
-     * to be made available remotely, which implies that it is suitable for
-     * remote invocations. This property lists a subset of service interface
-     * names specified in the <tt>BundleContext.registerService</tt> call, 
-     * denoting the interfaces that are suitable for remoting.
-     * If the list contains only one value, which is set to “*”, all of the interfaces 
-     * specified in the <tt>BundleContext.registerService</tt> call are being exposed
-     * remotely. 
-     * <p>
-     * The value of this property is of type String, String[] or a Collection of Strings.
-     */
-    public static final String  PROP_KEY_SERVICE_REMOTE_INTERFACES  = "osgi.remote.interfaces";
-
-    /**
-     * This optional service registration property contains a list of intents
-     * that should be satisfied when publishing this service remotely. If a
-     * Distribution Provider implementation cannot satisfy these intents when
-     * exposing the service remotely, it should not expose the service.
-     * <p>
-     * The value of this property is of type String, String[] or a Collection of Strings.
-     */
-    public static final String  PROP_KEY_SERVICE_REMOTE_REQUIRES_INTENTS = "osgi.remote.requires.intents";
-
-    /**
-     * This optional service registration property identifies the metadata type
-     * of additional metadata associated with the service provider or consumer,
-     * e.g. "sca" Multiple types and thus sets of additional metadata may be
-     * provided.
-     * <p>
-     * The value of this property is of type String, String[] or a Collection of Strings.
-     */
-    public static final String  PROP_KEY_SERVICE_REMOTE_CONFIG_TYPE = "osgi.remote.configuration.type";
-
-    /**
-     * This optional service registration property contains a list of intents
-     * provided by the service itself. The property advertises capabilities of the
-     * service implementation and can be used by the service consumer in the lookup 
-     * filter to only select a service that provides certain qualities of service.
-     * <p>
-     * These service intents may be interpreted by other framework components
-     * for example to take them into account when exposing that service
-     * remotely.
-     * <p>
-     * In case of proxies to remote services the value of this property is a
-     * union of the value specified by the service provider, plus its
-     * remote-specific intents (see {@link #PROP_KEY_SERVICE_REMOTE_REQUIRES_INTENTS}}), 
-     * plus any intents which the Distribution Software adds to describe characteristics 
-     * of the distribution mechanism.
-     * Therefore the value of this property can vary between the client side
-     * proxy and the server side service.
-     * <p>
-     * The value of this property is of type String, String[] or a Collection of Strings.
-     */
-    public static final String  PROP_KEY_DEPLOYMENT_INTENTS         = "deployment.intents";
-
-    /**
-     * This service registration property is set on client side service proxies
-     * registered in the OSGi Service Registry. This allows service consumers to
-     * identify remote services if needed. 
-     * <p>
-     * The value of this property is undefined. The simple fact that the property is set
-     * denotes that the service is running remotely.
-     */
-    public static final String  PROP_KEY_REMOTE_SERVICE             = "osgi.remote";
+	/**
+	 * This class only defines constants and must not be instantiated.
+	 */
+	private DistributionConstants() {
+		// empty
+	}
+
+	/**
+	 * This service registration property indicates that the provided service is
+	 * to be made available remotely, which implies that it is suitable for
+	 * remote invocations. This property lists a subset of service interface
+	 * names specified in the <tt>BundleContext.registerService</tt> call,
+	 * denoting the interfaces that are suitable for remoting. If the list
+	 * contains only one value, which is set to "*", all of the interfaces
+	 * specified in the <tt>BundleContext.registerService</tt> call are being
+	 * exposed remotely.
+	 * <p>
+	 * The value of this property is of type String, String[] or Collection of
+	 * String.
+	 */
+	public static final String	REMOTE_INTERFACES			= "osgi.remote.interfaces";
+
+	/**
+	 * This optional service registration property contains a list of intents
+	 * that should be satisfied when publishing this service remotely. If a
+	 * Distribution Provider implementation cannot satisfy these intents when
+	 * exposing the service remotely, it should not expose the service.
+	 * <p>
+	 * The value of this property is of type String, String[] or Collection of
+	 * String.
+	 */
+	public static final String	REMOTE_REQUIRES_INTENTS		= "osgi.remote.requires.intents";
+
+	/**
+	 * This optional service registration property identifies the metadata type
+	 * of additional metadata associated with the service provider or consumer,
+	 * e.g. "sca" Multiple types and thus sets of additional metadata may be
+	 * provided.
+	 * <p>
+	 * The value of this property is of type String, String[] or Collection of
+	 * String.
+	 */
+	public static final String	REMOTE_CONFIGURATION_TYPE	= "osgi.remote.configuration.type";
+
+	/**
+	 * This optional service registration property contains a list of intents
+	 * provided by the service itself. The property advertises capabilities of
+	 * the service implementation and can be used by the service consumer in the
+	 * lookup filter to only select a service that provides certain qualities of
+	 * service.
+	 * <p>
+	 * These service intents may be interpreted by other framework components
+	 * for example to take them into account when exposing that service
+	 * remotely.
+	 * <p>
+	 * In case of proxies to remote services the value of this property is a
+	 * union of the value specified by the service provider, plus its
+	 * remote-specific intents (see {@link #REMOTE_REQUIRES_INTENTS} ), plus any
+	 * intents which the Distribution Software adds to describe characteristics
+	 * of the distribution mechanism. Therefore the value of this property can
+	 * vary between the client side proxy and the server side service.
+	 * <p>
+	 * The value of this property is of type String, String[] or Collection of
+	 * String.
+	 */
+	public static final String	DEPLOYMENT_INTENTS			= "osgi.deployment.intents";
+
+	/**
+	 * This service registration property is set on client side service proxies
+	 * registered in the OSGi Service Registry. This allows service consumers to
+	 * identify remote services if needed.
+	 * <p>
+	 * The value of this property is undefined. The simple fact that the
+	 * property is set denotes that the service is running remotely.
+	 */
+	public static final String	REMOTE						= "osgi.remote";
 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java Fri Apr 24 12:49:19 2009
@@ -1,7 +1,5 @@
 /*
- * $Date$
- *
- * Copyright (c) OSGi Alliance (2004, 2007). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2008). 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.
@@ -27,34 +25,46 @@
  * ServiceRegistry implementing this interface. The service is registered with
  * extra properties identified at the beginning of this interface to denote the
  * Distribution Provider product name, version, vendor and supported intents.
+ *
+ * @ThreadSafe
+ * @version $Revision$
  */
 public interface DistributionProvider {
     /**
      * Service Registration property for the name of the Distribution Provider
      * product.
+	 * <p>
+	 * The value of this property is of type String.
      */
-    static final String PROP_KEY_PRODUCT_NAME = 
+    static final String PRODUCT_NAME = 
                             "osgi.remote.distribution.product";
 
     /**
      * Service Registration property for the version of the Distribution
      * Provider product.
+	 * <p>
+	 * The value of this property is of type String.
      */
-    static final String PROP_KEY_PRODUCT_VERSION =
+    static final String PRODUCT_VERSION =
                             "osgi.remote.distribution.product.version";
 
     /**
      * Service Registration property for the Distribution Provider product
      * vendor name.
+	 * <p>
+	 * The value of this property is of type String.
      */
-    static final String PROP_KEY_VENDOR_NAME = 
+    static final String VENDOR_NAME = 
                             "osgi.remote.distribution.vendor";
 
-    /**
-     * Service Registration property that lists the intents supported by this
-     * DistributionProvider.
-     */
-    static final String PROP_KEY_SUPPORTED_INTENTS =
+	/**
+	 * Service Registration property that lists the intents supported by this
+	 * DistributionProvider.
+	 * <p>
+	 * The value of this property is of type String, String[] or Collection of
+	 * String.
+	 */
+    static final String SUPPORTED_INTENTS =
                             "osgi.remote.distribition.supported_intents";
 
     /**
@@ -73,26 +83,25 @@
      */
     Collection /*<? extends ServiceReference>*/ getExposedServices();
 
-    /**
-     * Provides access to extra properties set by the DistributionProvider on
-     * endpoints, as they will appear on client side proxies given an exposed
-     * ServiceReference. 
-     * These properties are not always available on the server-side
-     * ServiceReference of the exposed
-     * service but will be on the remote client side proxy to this service.
-     * This API provides access to these extra properties from the exposing
-     * side.
-     * E.g. a service is exposed remotely, the distribution software is configured
-     * to add transactionality to the remote service. Because of this, on the 
-     * client-side proxy the property deployment.intents=”transactionality” is set. 
-     * However, these intents are *not* always set on the original
-     * ServiceRegistration on the server-side since on the server side the service
-     * object is a local pojo which doesn’t provide transactionality by itself.
-     * This QoS is added by the distribution.
-     * This API provides access to these extra properties from the server-side.
-     * 
-     * @param sr A ServiceReference of an exposed service.
-     * @return The map of extra properties.
-     */
+	/**
+	 * Provides access to extra properties set by the DistributionProvider on
+	 * endpoints, as they will appear on client side proxies given an exposed
+	 * ServiceReference. These properties are not always available on the
+	 * server-side ServiceReference of the exposed service but will be on the
+	 * remote client side proxy to this service. This API provides access to
+	 * these extra properties from the exposing side. E.g. a service is exposed
+	 * remotely, the distribution software is configured to add transactionality
+	 * to the remote service. Because of this, on the client-side proxy the
+	 * property serviceosgi.intents="transactionality" is set. However, these
+	 * intents are <i>not</i> always set on the original ServiceRegistration on
+	 * the server-side since on the server side the service object is a local
+	 * pojo which doesn't provide transactionality by itself. This QoS is added
+	 * by the distribution. This API provides access to these extra properties
+	 * from the server-side.
+	 * 
+	 * @param sr A ServiceReference of an exposed service.
+	 * @return The map of extra properties.
+	 */
     Map /*<String, String>*/ getExposedProperties(ServiceReference sr);
 }
+

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java Fri Apr 24 12:49:19 2009
@@ -127,10 +127,10 @@
         Dictionary serviceProps = services.get(dp);
         Set<String> expected = new HashSet<String>(Arrays.asList("A", "B"));
         assertEquals(expected, new HashSet<String>(Arrays.asList(
-            OsgiUtils.parseIntents((String) serviceProps.get(DistributionProvider.PROP_KEY_SUPPORTED_INTENTS)))));
-        assertNotNull(serviceProps.get(DistributionProvider.PROP_KEY_PRODUCT_NAME));
-        assertNotNull(serviceProps.get(DistributionProvider.PROP_KEY_PRODUCT_VERSION));
-        assertNotNull(serviceProps.get(DistributionProvider.PROP_KEY_VENDOR_NAME));
+            OsgiUtils.parseIntents((String) serviceProps.get(DistributionProvider.SUPPORTED_INTENTS)))));
+        assertNotNull(serviceProps.get(DistributionProvider.PRODUCT_NAME));
+        assertNotNull(serviceProps.get(DistributionProvider.PRODUCT_VERSION));
+        assertNotNull(serviceProps.get(DistributionProvider.VENDOR_NAME));
     }
     
     public void testPublishPreexistingServices() throws Exception {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java Fri Apr 24 12:49:19 2009
@@ -85,7 +85,7 @@
         Map<String, String> expected = new HashMap<String, String>();
         expected.put("osgi.remote.configuration.type", "pojo");
         expected.put("osgi.remote.configuration.pojo.address", "http://" + hostName + ":1327/myRunnable");
-        expected.put("deployment.intents", "a.b.c");
+        expected.put("osgi.deployment.intents", "a.b.c");
         assertEquals(expected, dp.getExposedProperties(sr));
     } 
     

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java Fri Apr 24 12:49:19 2009
@@ -141,7 +141,7 @@
         Map<String, String> expected = new HashMap<String, String>();
         expected.put("osgi.remote.configuration.type", "pojo");
         expected.put("osgi.remote.configuration.pojo.address", "http://somehost:54321/java/lang/String");
-        expected.put("deployment.intents", "A B");
+        expected.put("osgi.deployment.intents", "A B");
         assertEquals(expected, dp.getExposedProperties(sr));
     }
     

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfListenerHookTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfListenerHookTest.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfListenerHookTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfListenerHookTest.java Fri Apr 24 12:49:19 2009
@@ -18,8 +18,10 @@
   */
 package org.apache.cxf.dosgi.dsw.hooks;
 
+import static org.osgi.service.discovery.DiscoveredServiceNotification.AVAILABLE;
+import static org.osgi.service.discovery.DiscoveredServiceNotification.UNAVAILABLE;
+
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Dictionary;
@@ -41,14 +43,10 @@
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.framework.hooks.service.ListenerHook;
-
 import org.osgi.service.discovery.DiscoveredServiceNotification;
 import org.osgi.service.discovery.DiscoveredServiceTracker;
 import org.osgi.service.discovery.ServiceEndpointDescription;
-
-import static org.osgi.service.discovery.DiscoveredServiceNotification.AVAILABLE;
-import static org.osgi.service.discovery.DiscoveredServiceNotification.UNAVAILABLE;
-import static org.osgi.service.discovery.ServicePublication.PROP_KEY_SERVICE_INTERFACE_NAME;
+import org.osgi.service.discovery.ServicePublication;
 
 public class CxfListenerHookTest extends Assert {
 
@@ -104,7 +102,7 @@
     public void testTrackerPropertiesOnlyClassInFilterWithMatchingInterface() throws Exception {
         String filter = "(objectClass=" + TestService.class.getName() + ")";
         doTestTrackerPropertiesSet(filter,
-                                   "osgi.discovery.interest.interfaces",
+                                   "osgi.remote.discovery.interest.interfaces",
                                    TestService.class.getName(),
                                    asList(TestService.class.getName()),
                                    Collections.EMPTY_SET);
@@ -115,7 +113,7 @@
         String filter = "(&(objectClass=" + TestService.class.getName() 
                         + ")(colour=blue))";
         doTestTrackerPropertiesSet(filter,
-                                   "osgi.discovery.interest.filters",
+                                   "osgi.remote.discovery.interest.filters",
                                    replacePredicate(filter),
                                    asList(TestService.class.getName()),
                                    Collections.EMPTY_SET);
@@ -125,7 +123,7 @@
     public void testTrackerPropertiesOnlyClassInFilterWithMatchingFilter() throws Exception {
         String filter = "(objectClass=" + TestService.class.getName() + ")";
         doTestTrackerPropertiesSet(filter,
-                                   "osgi.discovery.interest.interfaces",
+                                   "osgi.remote.discovery.interest.interfaces",
                                    TestService.class.getName(),
                                    Collections.EMPTY_SET,
                                    asList(replacePredicate(filter)));
@@ -136,7 +134,7 @@
         String filter = "(&(objectClass=" + TestService.class.getName() 
                         + ")(colour=blue))";
         doTestTrackerPropertiesSet(filter,
-                                   "osgi.discovery.interest.filters",
+                                   "osgi.remote.discovery.interest.filters",
 				   replacePredicate(filter),
                                    Collections.EMPTY_SET,
                                    asList(replacePredicate(filter)));
@@ -146,7 +144,7 @@
     public void testTrackerPropertiesOnlyClassInFilterWithMatchingBoth() throws Exception {
         String filter = "(objectClass=" + TestService.class.getName() + ")";
         doTestTrackerPropertiesSet(filter,
-                                   "osgi.discovery.interest.interfaces",
+                                   "osgi.remote.discovery.interest.interfaces",
                                    TestService.class.getName(),
                                    asList(TestService.class.getName()),
                                    asList(replacePredicate(filter)));
@@ -157,7 +155,7 @@
         String filter = "(&(objectClass=" + TestService.class.getName() 
                         + ")(colour=blue))";
         doTestTrackerPropertiesSet(filter,
-                                   "osgi.discovery.interest.filters",
+                                   "osgi.remote.discovery.interest.filters",
 				   replacePredicate(filter),
                                    Collections.EMPTY_SET,
                                    asList(replacePredicate(filter)));
@@ -311,7 +309,7 @@
     }
 
     private String replacePredicate(String filter) {
-        return filter.replace("objectClass", "service.interface");
+        return filter.replace("objectClass", ServicePublication.SERVICE_INTERFACE_NAME);
     }
 
     private class Notification implements DiscoveredServiceNotification {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfPublishHookTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfPublishHookTest.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfPublishHookTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfPublishHookTest.java Fri Apr 24 12:49:19 2009
@@ -46,10 +46,10 @@
 import org.osgi.service.discovery.ServicePublication;
 
 import static org.apache.cxf.dosgi.dsw.Constants.POJO_ADDRESS_PROPERTY;
-import static org.osgi.service.discovery.ServicePublication.PROP_KEY_ENDPOINT_LOCATION;
-import static org.osgi.service.discovery.ServicePublication.PROP_KEY_SERVICE_INTERFACE_NAME;
-import static org.osgi.service.discovery.ServicePublication.PROP_KEY_SERVICE_PROPERTIES;
-import static org.osgi.service.discovery.ServicePublication.PROP_KEY_ENDPOINT_LOCATION;
+import static org.osgi.service.discovery.ServicePublication.ENDPOINT_LOCATION;
+import static org.osgi.service.discovery.ServicePublication.SERVICE_INTERFACE_NAME;
+import static org.osgi.service.discovery.ServicePublication.SERVICE_PROPERTIES;
+import static org.osgi.service.discovery.ServicePublication.ENDPOINT_LOCATION;
 
 public class CxfPublishHookTest extends Assert {
 
@@ -184,7 +184,7 @@
         assertEquals(serviceNames.length, propsList.size());
         for (Dictionary props : propsList) {
             Collection interfaces = 
-                (Collection)props.get(PROP_KEY_SERVICE_INTERFACE_NAME);
+                (Collection)props.get(SERVICE_INTERFACE_NAME);
             assertNotNull(interfaces);
             assertTrue(interfaces.contains(TestService.class.getName())
                        || interfaces.contains(AdditionalInterface.class.getName()));
@@ -295,7 +295,7 @@
                     Map props = sd.getProperties();
                     String address = (String)props.get(POJO_ADDRESS_PROPERTY);
                     if (address != null) {
-                        props.put(PROP_KEY_ENDPOINT_LOCATION, address);
+                        props.put(ENDPOINT_LOCATION, address);
                     }
                     return server;
                 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java?rev=768288&r1=768287&r2=768288&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java Fri Apr 24 12:49:19 2009
@@ -18,7 +18,7 @@
   */
 package org.apache.cxf.dosgi.dsw.hooks;
 
-import java.net.URL;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Dictionary;
@@ -83,14 +83,14 @@
     public void testPublish() throws Exception {        
         Map<String, Object> props = new HashMap<String, Object>();
         props.put("foo", "bar");
-        props.put(ServicePublication.PROP_KEY_ENDPOINT_LOCATION, "http://localhost/xyz");
+        props.put(ServicePublication.ENDPOINT_LOCATION, "http://localhost/xyz");
         ServiceEndpointDescriptionImpl sed = new ServiceEndpointDescriptionImpl(String.class.getName(), props);
-        assertEquals(new URL("http://localhost/xyz"), sed.getLocation());
+        assertEquals(new URI("http://localhost/xyz"), sed.getLocation());
         
         final Dictionary<String, Object> expectedProps = new Hashtable<String, Object>();
-        expectedProps.put(ServicePublication.PROP_KEY_SERVICE_PROPERTIES, props);
-        expectedProps.put(ServicePublication.PROP_KEY_SERVICE_INTERFACE_NAME, Collections.singleton(String.class.getName()));
-        expectedProps.put(ServicePublication.PROP_KEY_ENDPOINT_LOCATION, new URL("http://localhost/xyz"));
+        expectedProps.put(ServicePublication.SERVICE_PROPERTIES, props);
+        expectedProps.put(ServicePublication.SERVICE_INTERFACE_NAME, Collections.singleton(String.class.getName()));
+        expectedProps.put(ServicePublication.ENDPOINT_LOCATION, new URI("http://localhost/xyz"));
         
         BundleContext bc = EasyMock.createMock(BundleContext.class);
         EasyMock.expect(bc.registerService(
@@ -102,15 +102,15 @@
                         assertTrue(EasyMock.getCurrentArguments()[1] instanceof ServicePublication);
                         Dictionary<?, ?> actualProps = 
                             (Dictionary<?, ?>) EasyMock.getCurrentArguments()[2];
-                        UUID uuid = UUID.fromString(actualProps.get(ServicePublication.PROP_KEY_ENDPOINT_ID).toString());
-                        expectedProps.put(ServicePublication.PROP_KEY_ENDPOINT_ID, uuid.toString());
+                        UUID uuid = UUID.fromString(actualProps.get(ServicePublication.ENDPOINT_ID).toString());
+                        expectedProps.put(ServicePublication.ENDPOINT_ID, uuid.toString());
                         assertEquals(expectedProps, actualProps);
                         return EasyMock.createMock(ServiceRegistration.class);
                     }                
                 });
         EasyMock.replay(bc);
         
-        ServiceHookUtils.publish(bc, sed);
+        ServiceHookUtils.publish(bc, null, sed);
         EasyMock.verify(bc);
     }
     



Mime
View raw message