You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2012/05/11 22:19:07 UTC
svn commit: r1337360 [7/7] - in /felix/trunk/framework: ./
src/main/java/org/apache/felix/framework/
src/main/java/org/apache/felix/framework/resolver/
src/main/java/org/apache/felix/framework/wiring/
src/main/java/org/osgi/framework/ src/main/java/org...
Modified: felix/trunk/framework/src/main/java/org/osgi/service/startlevel/StartLevel.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/service/startlevel/StartLevel.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/service/startlevel/StartLevel.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/service/startlevel/StartLevel.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2002, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2011). 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.
@@ -68,7 +68,7 @@ import org.osgi.framework.Bundle;
*
* @ThreadSafe
* @noimplement
- * @version $Id: bf1b71ed6c9f9d75785b26dccb34362017d93f4a $
+ * @version $Id: ec0295bdf246c0258261374b3ac0e4aef11f7315 $
* @deprecated This service has been replaced by the
* <code>org.osgi.framework.startlevel</code> package.
*/
@@ -202,7 +202,7 @@ public interface StartLevel {
* is first installed.
*
* @return The initial start level value for Bundles.
- * @see #setInitialBundleStartLevel
+ * @see #setInitialBundleStartLevel(int)
*/
public int getInitialBundleStartLevel();
Modified: felix/trunk/framework/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/service/url/AbstractURLStreamHandlerService.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2002, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2012). 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,43 +19,38 @@ package org.osgi.service.url;
import java.net.*;
/**
- * Abstract implementation of the {@code URLStreamHandlerService}
- * interface. All the methods simply invoke the corresponding methods on
- * {@code java.net.URLStreamHandler} except for {@code parseURL}
- * and {@code setURL}, which use the {@code URLStreamHandlerSetter}
- * parameter. Subclasses of this abstract class should not need to override the
- * {@code setURL} and {@code parseURL(URLStreamHandlerSetter,...)}
- * methods.
+ * Abstract implementation of the {@code URLStreamHandlerService} interface. All
+ * the methods simply invoke the corresponding methods on
+ * {@code java.net.URLStreamHandler} except for {@code parseURL} and
+ * {@code setURL}, which use the {@code URLStreamHandlerSetter} parameter.
+ * Subclasses of this abstract class should not need to override the
+ * {@code setURL} and {@code parseURL(URLStreamHandlerSetter,...)} methods.
*
* @ThreadSafe
- * @version $Id: 465a0ed86f5d49b338ffc6a13bb68f60f04e54d6 $
+ * @version $Id: b86572a4f13b7bb4a343ac4d6b6fb3487e01bd31 $
*/
-public abstract class AbstractURLStreamHandlerService extends URLStreamHandler
- implements URLStreamHandlerService {
+public abstract class AbstractURLStreamHandlerService extends URLStreamHandler implements URLStreamHandlerService {
/**
* @see "java.net.URLStreamHandler.openConnection"
*/
- public abstract URLConnection openConnection(URL u)
- throws java.io.IOException;
+ public abstract URLConnection openConnection(URL u) throws java.io.IOException;
/**
- * The {@code URLStreamHandlerSetter} object passed to the parseURL
- * method.
+ * The {@code URLStreamHandlerSetter} object passed to the parseURL method.
*/
protected volatile URLStreamHandlerSetter realHandler;
/**
- * Parse a URL using the {@code URLStreamHandlerSetter} object. This
- * method sets the {@code realHandler} field with the specified
+ * Parse a URL using the {@code URLStreamHandlerSetter} object. This method
+ * sets the {@code realHandler} field with the specified
* {@code URLStreamHandlerSetter} object and then calls
* {@code parseURL(URL,String,int,int)}.
*
- * @param realHandler The object on which the {@code setURL} method
- * must be invoked for the specified URL.
+ * @param realHandler The object on which the {@code setURL} method must be
+ * invoked for the specified URL.
* @see "java.net.URLStreamHandler.parseURL"
*/
- public void parseURL(URLStreamHandlerSetter realHandler, URL u,
- String spec, int start, int limit) {
+ public void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit) {
this.realHandler = realHandler;
parseURL(u, spec, start, limit);
}
@@ -131,19 +126,18 @@ public abstract class AbstractURLStreamH
* @deprecated This method is only for compatibility with handlers written
* for JDK 1.1.
*/
- protected void setURL(URL u, String proto, String host, int port,
- String file, String ref) {
+ protected void setURL(URL u, String proto, String host, int port, String file, String ref) {
realHandler.setURL(u, proto, host, port, file, ref);
}
/**
* This method calls
- * {@code realHandler.setURL(URL,String,String,int,String,String,String,String)}.
+ * {@code realHandler.setURL(URL,String,String,int,String,String,String,String)}
+ * .
*
* @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)"
*/
- protected void setURL(URL u, String proto, String host, int port,
- String auth, String user, String path, String query, String ref) {
+ protected void setURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref) {
realHandler.setURL(u, proto, host, port, auth, user, path, query, ref);
}
}
Modified: felix/trunk/framework/src/main/java/org/osgi/service/url/URLConstants.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/service/url/URLConstants.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/service/url/URLConstants.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/service/url/URLConstants.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2002, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2012). 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.
@@ -18,16 +18,14 @@ package org.osgi.service.url;
/**
* Defines standard names for property keys associated with
- * {@link URLStreamHandlerService} and {@code java.net.ContentHandler}
- * services.
+ * {@link URLStreamHandlerService} and {@code java.net.ContentHandler} services.
*
* <p>
- * The values associated with these keys are of type
- * {@code java.lang.String[]} or {@code java.lang.String}, unless
- * otherwise indicated.
+ * The values associated with these keys are of type {@code java.lang.String[]}
+ * or {@code java.lang.String}, unless otherwise indicated.
*
* @noimplement
- * @version $Id: 5ec8db316249f4b956fe083b986c11153d0fa8fe $
+ * @version $Id: ac2b9670972d6e41d989c51067219ff7be459831 $
*/
public interface URLConstants {
/**
Modified: felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerService.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerService.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerService.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerService.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2002, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2012). 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,19 +23,17 @@ import java.net.*;
* {@code java.net.URLStreamHandler} methods.
* <p>
* The important differences between this interface and the
- * {@code URLStreamHandler} class are that the {@code setURL}
- * method is absent and the {@code parseURL} method takes a
- * {@link URLStreamHandlerSetter} object as the first argument. Classes
- * implementing this interface must call the {@code setURL} method on the
- * {@code URLStreamHandlerSetter} object received in the
- * {@code parseURL} method instead of
- * {@code URLStreamHandler.setURL} to avoid a
- * {@code SecurityException}.
+ * {@code URLStreamHandler} class are that the {@code setURL} method is absent
+ * and the {@code parseURL} method takes a {@link URLStreamHandlerSetter} object
+ * as the first argument. Classes implementing this interface must call the
+ * {@code setURL} method on the {@code URLStreamHandlerSetter} object received
+ * in the {@code parseURL} method instead of {@code URLStreamHandler.setURL} to
+ * avoid a {@code SecurityException}.
*
* @see AbstractURLStreamHandlerService
*
* @ThreadSafe
- * @version $Id: 4982ef5b407669975afe2856a9702246d2d9c2ba $
+ * @version $Id: 4a453f61b9acdc6449df389b2a0538d0ccb33ed2 $
*/
public interface URLStreamHandlerService {
/**
@@ -44,16 +42,15 @@ public interface URLStreamHandlerService
public URLConnection openConnection(URL u) throws java.io.IOException;
/**
- * Parse a URL. This method is called by the {@code URLStreamHandler}
- * proxy, instead of {@code java.net.URLStreamHandler.parseURL},
- * passing a {@code URLStreamHandlerSetter} object.
+ * Parse a URL. This method is called by the {@code URLStreamHandler} proxy,
+ * instead of {@code java.net.URLStreamHandler.parseURL}, passing a
+ * {@code URLStreamHandlerSetter} object.
*
- * @param realHandler The object on which {@code setURL} must be
- * invoked for this URL.
+ * @param realHandler The object on which {@code setURL} must be invoked for
+ * this URL.
* @see "java.net.URLStreamHandler.parseURL"
*/
- public void parseURL(URLStreamHandlerSetter realHandler, URL u,
- String spec, int start, int limit);
+ public void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit);
/**
* @see "java.net.URLStreamHandler.toExternalForm"
Modified: felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/service/url/URLStreamHandlerSetter.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2002, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2012). 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.
@@ -20,19 +20,18 @@ import java.net.URL;
/**
* Interface used by {@code URLStreamHandlerService} objects to call the
- * {@code setURL} method on the proxy {@code URLStreamHandler}
- * object.
+ * {@code setURL} method on the proxy {@code URLStreamHandler} object.
*
* <p>
* Objects of this type are passed to the
- * {@link URLStreamHandlerService#parseURL} method. Invoking the
- * {@code setURL} method on the {@code URLStreamHandlerSetter}
- * object will invoke the {@code setURL} method on the proxy
- * {@code URLStreamHandler} object that is actually registered with
+ * {@link URLStreamHandlerService#parseURL(URLStreamHandlerSetter, URL, String, int, int)}
+ * method. Invoking the {@code setURL} method on the
+ * {@code URLStreamHandlerSetter} object will invoke the {@code setURL} method
+ * on the proxy {@code URLStreamHandler} object that is actually registered with
* {@code java.net.URL} for the protocol.
*
* @ThreadSafe
- * @version $Id: f55d4c29678503c244f56dcb2b5621b3be11cc8d $
+ * @version $Id: 90f25e3961fea2150cfd31117a2237304f1518f9 $
*/
public interface URLStreamHandlerSetter {
/**
@@ -41,13 +40,10 @@ public interface URLStreamHandlerSetter
* @deprecated This method is only for compatibility with handlers written
* for JDK 1.1.
*/
- public void setURL(URL u, String protocol, String host, int port,
- String file, String ref);
+ public void setURL(URL u, String protocol, String host, int port, String file, String ref);
/**
* @see "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)"
*/
- public void setURL(URL u, String protocol, String host, int port,
- String authority, String userInfo, String path, String query,
- String ref);
+ public void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref);
}
Modified: felix/trunk/framework/src/main/java/org/osgi/util/tracker/AbstractTracked.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/util/tracker/AbstractTracked.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/util/tracker/AbstractTracked.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/util/tracker/AbstractTracked.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2007, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2007, 2012). 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.
@@ -34,7 +34,7 @@ import java.util.Map;
* @param <T> The value mapped to the tracked item.
* @param <R> The reason the tracked item is being tracked or untracked.
* @ThreadSafe
- * @version $Id: 79452e6c28683021f2bcf11d3689ec75c6b5642f $
+ * @version $Id: 16340086b98d308c2d12f13bcd87fc6467a5a367 $
* @since 1.4
*/
abstract class AbstractTracked<S, T, R> {
@@ -117,8 +117,8 @@ abstract class AbstractTracked<S, T, R>
* This method must be called from Tracker's open method while synchronized
* on this object in the same synchronized block as the add listener call.
*
- * @param list The initial list of items to be tracked. {@code null}
- * entries in the list are ignored.
+ * @param list The initial list of items to be tracked. {@code null} entries
+ * in the list are ignored.
* @GuardedBy this
*/
void setInitial(S[] list) {
@@ -162,8 +162,7 @@ abstract class AbstractTracked<S, T, R>
if (tracked.get(item) != null) {
/* if we are already tracking this item */
if (DEBUG) {
- System.out
- .println("AbstractTracked.trackInitial[already tracked]: " + item); //$NON-NLS-1$
+ System.out.println("AbstractTracked.trackInitial[already tracked]: " + item); //$NON-NLS-1$
}
continue; /* skip this item */
}
@@ -172,8 +171,7 @@ abstract class AbstractTracked<S, T, R>
* if this item is already in the process of being added.
*/
if (DEBUG) {
- System.out
- .println("AbstractTracked.trackInitial[already adding]: " + item); //$NON-NLS-1$
+ System.out.println("AbstractTracked.trackInitial[already adding]: " + item); //$NON-NLS-1$
}
continue; /* skip this item */
}
@@ -214,17 +212,14 @@ abstract class AbstractTracked<S, T, R>
if (adding.contains(item)) {
/* if this item is already in the process of being added. */
if (DEBUG) {
- System.out
- .println("AbstractTracked.track[already adding]: " + item); //$NON-NLS-1$
+ System.out.println("AbstractTracked.track[already adding]: " + item); //$NON-NLS-1$
}
return;
}
adding.add(item); /* mark this item is being added */
- }
- else { /* we are currently tracking this item */
+ } else { /* we are currently tracking this item */
if (DEBUG) {
- System.out
- .println("AbstractTracked.track[modified]: " + item); //$NON-NLS-1$
+ System.out.println("AbstractTracked.track[modified]: " + item); //$NON-NLS-1$
}
modified(); /* increment modification count */
}
@@ -232,8 +227,7 @@ abstract class AbstractTracked<S, T, R>
if (object == null) { /* we are not tracking the item */
trackAdding(item, related);
- }
- else {
+ } else {
/* Call customizer outside of synchronized region */
customizerModified(item, related, object);
/*
@@ -264,8 +258,7 @@ abstract class AbstractTracked<S, T, R>
* If the customizer throws an unchecked exception, it will
* propagate after the finally
*/
- }
- finally {
+ } finally {
synchronized (this) {
if (adding.remove(item) && !closed) {
/*
@@ -277,8 +270,7 @@ abstract class AbstractTracked<S, T, R>
modified(); /* increment modification count */
notifyAll(); /* notify any waiters */
}
- }
- else {
+ } else {
becameUntracked = true;
}
}
@@ -288,8 +280,7 @@ abstract class AbstractTracked<S, T, R>
*/
if (becameUntracked && (object != null)) {
if (DEBUG) {
- System.out
- .println("AbstractTracked.trackAdding[removed]: " + item); //$NON-NLS-1$
+ System.out.println("AbstractTracked.trackAdding[removed]: " + item); //$NON-NLS-1$
}
/* Call customizer outside of synchronized region */
customizerRemoved(item, related, object);
@@ -314,8 +305,7 @@ abstract class AbstractTracked<S, T, R>
* of initial references to process
*/
if (DEBUG) {
- System.out
- .println("AbstractTracked.untrack[removed from initial]: " + item); //$NON-NLS-1$
+ System.out.println("AbstractTracked.untrack[removed from initial]: " + item); //$NON-NLS-1$
}
return; /*
* we have removed it from the list and it will not be
@@ -328,8 +318,7 @@ abstract class AbstractTracked<S, T, R>
* being added
*/
if (DEBUG) {
- System.out
- .println("AbstractTracked.untrack[being added]: " + item); //$NON-NLS-1$
+ System.out.println("AbstractTracked.untrack[being added]: " + item); //$NON-NLS-1$
}
return; /*
* in case the item is untracked while in the process of
@@ -430,8 +419,8 @@ abstract class AbstractTracked<S, T, R>
/**
* Copy the tracked items and associated values into the specified map.
*
- * @param <M> Type of {@code Map} to hold the tracked items and
- * associated values.
+ * @param <M> Type of {@code Map} to hold the tracked items and associated
+ * values.
* @param map The map into which to copy the tracked items and associated
* values. This map must not be a user provided map so that user code
* is not executed while synchronized on this.
@@ -439,7 +428,7 @@ abstract class AbstractTracked<S, T, R>
* @GuardedBy this
* @since 1.5
*/
- <M extends Map< ? super S, ? super T>> M copyEntries(final M map) {
+ <M extends Map<? super S, ? super T>> M copyEntries(final M map) {
map.putAll(tracked);
return map;
}
@@ -450,8 +439,8 @@ abstract class AbstractTracked<S, T, R>
*
* @param item Item to be tracked.
* @param related Action related object.
- * @return Customized object for the tracked item or {@code null} if
- * the item is not to be tracked.
+ * @return Customized object for the tracked item or {@code null} if the
+ * item is not to be tracked.
*/
abstract T customizerAdding(final S item, final R related);
@@ -463,8 +452,7 @@ abstract class AbstractTracked<S, T, R>
* @param related Action related object.
* @param object Customized object for the tracked item.
*/
- abstract void customizerModified(final S item, final R related,
- final T object);
+ abstract void customizerModified(final S item, final R related, final T object);
/**
* Call the specific customizer removed method. This method must not be
@@ -474,6 +462,5 @@ abstract class AbstractTracked<S, T, R>
* @param related Action related object.
* @param object Customized object for the tracked item.
*/
- abstract void customizerRemoved(final S item, final R related,
- final T object);
+ abstract void customizerRemoved(final S item, final R related, final T object);
}
Modified: felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTracker.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTracker.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTracker.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2007, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2007, 2012). 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.
@@ -18,36 +18,33 @@ package org.osgi.util.tracker;
import java.util.HashMap;
import java.util.Map;
-
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
import org.osgi.framework.SynchronousBundleListener;
/**
- * The {@code BundleTracker} class simplifies tracking bundles much like
- * the {@code ServiceTracker} simplifies tracking services.
+ * The {@code BundleTracker} class simplifies tracking bundles much like the
+ * {@code ServiceTracker} simplifies tracking services.
* <p>
* A {@code BundleTracker} is constructed with state criteria and a
- * {@code BundleTrackerCustomizer} object. A {@code BundleTracker} can
- * use the {@code BundleTrackerCustomizer} to select which bundles are
- * tracked and to create a customized object to be tracked with the bundle. The
- * {@code BundleTracker} can then be opened to begin tracking all bundles
- * whose state matches the specified state criteria.
+ * {@code BundleTrackerCustomizer} object. A {@code BundleTracker} can use the
+ * {@code BundleTrackerCustomizer} to select which bundles are tracked and to
+ * create a customized object to be tracked with the bundle. The
+ * {@code BundleTracker} can then be opened to begin tracking all bundles whose
+ * state matches the specified state criteria.
* <p>
- * The {@code getBundles} method can be called to get the
- * {@code Bundle} objects of the bundles being tracked. The
- * {@code getObject} method can be called to get the customized object for
- * a tracked bundle.
+ * The {@code getBundles} method can be called to get the {@code Bundle} objects
+ * of the bundles being tracked. The {@code getObject} method can be called to
+ * get the customized object for a tracked bundle.
* <p>
* The {@code BundleTracker} class is thread-safe. It does not call a
* {@code BundleTrackerCustomizer} while holding any locks.
- * {@code BundleTrackerCustomizer} implementations must also be
- * thread-safe.
+ * {@code BundleTrackerCustomizer} implementations must also be thread-safe.
*
* @param <T> The type of the tracked object.
* @ThreadSafe
- * @version $Id: ebfd73a4e19f025d6ad9029d99c17944ee8c420a $
+ * @version $Id: f21db4fe54284d4810bd9b5fa2528957804e3a21 $
* @since 1.4
*/
public class BundleTracker<T> implements BundleTrackerCustomizer<T> {
@@ -88,28 +85,25 @@ public class BundleTracker<T> implements
final int mask;
/**
- * Create a {@code BundleTracker} for bundles whose state is present in
- * the specified state mask.
+ * Create a {@code BundleTracker} for bundles whose state is present in the
+ * specified state mask.
*
* <p>
* Bundles whose state is present on the specified state mask will be
* tracked by this {@code BundleTracker}.
*
- * @param context The {@code BundleContext} against which the tracking
- * is done.
- * @param stateMask The bit mask of the {@code OR}ing of the bundle
- * states to be tracked.
+ * @param context The {@code BundleContext} against which the tracking is
+ * done.
+ * @param stateMask The bit mask of the {@code OR}ing of the bundle states
+ * to be tracked.
* @param customizer The customizer object to call when bundles are added,
- * modified, or removed in this {@code BundleTracker}. If
- * customizer is {@code null}, then this
- * {@code BundleTracker} will be used as the
- * {@code BundleTrackerCustomizer} and this
- * {@code BundleTracker} will call the
- * {@code BundleTrackerCustomizer} methods on itself.
+ * modified, or removed in this {@code BundleTracker}. If customizer
+ * is {@code null}, then this {@code BundleTracker} will be used as
+ * the {@code BundleTrackerCustomizer} and this {@code BundleTracker}
+ * will call the {@code BundleTrackerCustomizer} methods on itself.
* @see Bundle#getState()
*/
- public BundleTracker(BundleContext context, int stateMask,
- BundleTrackerCustomizer<T> customizer) {
+ public BundleTracker(BundleContext context, int stateMask, BundleTrackerCustomizer<T> customizer) {
this.context = context;
this.mask = stateMask;
this.customizer = (customizer == null) ? this : customizer;
@@ -123,13 +117,12 @@ public class BundleTracker<T> implements
* {@code BundleTracker} was created are now tracked by this
* {@code BundleTracker}.
*
- * @throws java.lang.IllegalStateException If the {@code BundleContext}
- * with which this {@code BundleTracker} was created is no
- * longer valid.
+ * @throws java.lang.IllegalStateException If the {@code BundleContext} with
+ * which this {@code BundleTracker} was created is no longer valid.
* @throws java.lang.SecurityException If the caller and this class do not
* have the appropriate
- * {@code AdminPermission[context bundle,LISTENER]}, and the
- * Java Runtime Environment supports permissions.
+ * {@code AdminPermission[context bundle,LISTENER]}, and the Java
+ * Runtime Environment supports permissions.
*/
public void open() {
final Tracked t;
@@ -167,8 +160,8 @@ public class BundleTracker<T> implements
* Close this {@code BundleTracker}.
*
* <p>
- * This method should be called when this {@code BundleTracker} should
- * end the tracking of bundles.
+ * This method should be called when this {@code BundleTracker} should end
+ * the tracking of bundles.
*
* <p>
* This implementation calls {@link #getBundles()} to get the list of
@@ -190,8 +183,7 @@ public class BundleTracker<T> implements
tracked = null;
try {
context.removeBundleListener(outgoing);
- }
- catch (IllegalStateException e) {
+ } catch (IllegalStateException e) {
/* In case the context was stopped. */
}
}
@@ -220,8 +212,8 @@ public class BundleTracker<T> implements
* @param bundle The {@code Bundle} being added to this
* {@code BundleTracker} object.
* @param event The bundle event which caused this customizer method to be
- * called or {@code null} if there is no bundle event associated
- * with the call to this method.
+ * called or {@code null} if there is no bundle event associated with
+ * the call to this method.
* @return The specified bundle.
* @see BundleTrackerCustomizer#addingBundle(Bundle, BundleEvent)
*/
@@ -243,8 +235,8 @@ public class BundleTracker<T> implements
*
* @param bundle The {@code Bundle} whose state has been modified.
* @param event The bundle event which caused this customizer method to be
- * called or {@code null} if there is no bundle event associated
- * with the call to this method.
+ * called or {@code null} if there is no bundle event associated with
+ * the call to this method.
* @param object The customized object for the specified Bundle.
* @see BundleTrackerCustomizer#modifiedBundle(Bundle, BundleEvent, Object)
*/
@@ -265,8 +257,8 @@ public class BundleTracker<T> implements
*
* @param bundle The {@code Bundle} being removed.
* @param event The bundle event which caused this customizer method to be
- * called or {@code null} if there is no bundle event associated
- * with the call to this method.
+ * called or {@code null} if there is no bundle event associated with
+ * the call to this method.
* @param object The customized object for the specified bundle.
* @see BundleTrackerCustomizer#removedBundle(Bundle, BundleEvent, Object)
*/
@@ -275,11 +267,11 @@ public class BundleTracker<T> implements
}
/**
- * Return an array of {@code Bundle}s for all bundles being tracked by
- * this {@code BundleTracker}.
+ * Return an array of {@code Bundle}s for all bundles being tracked by this
+ * {@code BundleTracker}.
*
- * @return An array of {@code Bundle}s or {@code null} if no
- * bundles are being tracked.
+ * @return An array of {@code Bundle}s or {@code null} if no bundles are
+ * being tracked.
*/
public Bundle[] getBundles() {
final Tracked t = tracked();
@@ -296,13 +288,13 @@ public class BundleTracker<T> implements
}
/**
- * Returns the customized object for the specified {@code Bundle} if
- * the specified bundle is being tracked by this {@code BundleTracker}.
+ * Returns the customized object for the specified {@code Bundle} if the
+ * specified bundle is being tracked by this {@code BundleTracker}.
*
* @param bundle The {@code Bundle} being tracked.
* @return The customized object for the specified {@code Bundle} or
- * {@code null} if the specified {@code Bundle} is not
- * being tracked.
+ * {@code null} if the specified {@code Bundle} is not being
+ * tracked.
*/
public T getObject(Bundle bundle) {
final Tracked t = tracked();
@@ -317,10 +309,10 @@ public class BundleTracker<T> implements
/**
* Remove a bundle from this {@code BundleTracker}.
*
- * The specified bundle will be removed from this {@code BundleTracker}
- * . If the specified bundle was being tracked then the
- * {@code BundleTrackerCustomizer.removedBundle} method will be called
- * for that bundle.
+ * The specified bundle will be removed from this {@code BundleTracker} . If
+ * the specified bundle was being tracked then the
+ * {@code BundleTrackerCustomizer.removedBundle} method will be called for
+ * that bundle.
*
* @param bundle The {@code Bundle} to be removed.
*/
@@ -333,8 +325,7 @@ public class BundleTracker<T> implements
}
/**
- * Return the number of bundles being tracked by this
- * {@code BundleTracker}.
+ * Return the number of bundles being tracked by this {@code BundleTracker}.
*
* @return The number of bundles being tracked.
*/
@@ -377,13 +368,12 @@ public class BundleTracker<T> implements
}
/**
- * Return a {@code Map} with the {@code Bundle}s and customized
- * objects for all bundles being tracked by this {@code BundleTracker}.
+ * Return a {@code Map} with the {@code Bundle}s and customized objects for
+ * all bundles being tracked by this {@code BundleTracker}.
*
- * @return A {@code Map} with the {@code Bundle}s and customized
- * objects for all services being tracked by this
- * {@code BundleTracker}. If no bundles are being tracked, then
- * the returned map is empty.
+ * @return A {@code Map} with the {@code Bundle}s and customized objects for
+ * all services being tracked by this {@code BundleTracker}. If no
+ * bundles are being tracked, then the returned map is empty.
* @since 1.5
*/
public Map<Bundle, T> getTracked() {
@@ -421,9 +411,7 @@ public class BundleTracker<T> implements
* @ThreadSafe
* @since 1.4
*/
- private final class Tracked extends AbstractTracked<Bundle, T, BundleEvent>
- implements
- SynchronousBundleListener {
+ private final class Tracked extends AbstractTracked<Bundle, T, BundleEvent> implements SynchronousBundleListener {
/**
* Tracked constructor.
*/
@@ -432,9 +420,8 @@ public class BundleTracker<T> implements
}
/**
- * {@code BundleListener} method for the {@code BundleTracker}
- * class. This method must NOT be synchronized to avoid deadlock
- * potential.
+ * {@code BundleListener} method for the {@code BundleTracker} class.
+ * This method must NOT be synchronized to avoid deadlock potential.
*
* @param event {@code BundleEvent} object from the framework.
*/
@@ -449,8 +436,7 @@ public class BundleTracker<T> implements
final Bundle bundle = event.getBundle();
final int state = bundle.getState();
if (DEBUG) {
- System.out
- .println("BundleTracker.Tracked.bundleChanged[" + state + "]: " + bundle); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("BundleTracker.Tracked.bundleChanged[" + state + "]: " + bundle); //$NON-NLS-1$ //$NON-NLS-2$
}
if ((state & mask) != 0) {
@@ -459,8 +445,7 @@ public class BundleTracker<T> implements
* If the customizer throws an unchecked exception, it is safe
* to let it propagate
*/
- }
- else {
+ } else {
untrack(bundle, event);
/*
* If the customizer throws an unchecked exception, it is safe
@@ -475,8 +460,8 @@ public class BundleTracker<T> implements
*
* @param item Item to be tracked.
* @param related Action related object.
- * @return Customized object for the tracked item or {@code null}
- * if the item is not to be tracked.
+ * @return Customized object for the tracked item or {@code null} if the
+ * item is not to be tracked.
*/
T customizerAdding(final Bundle item, final BundleEvent related) {
return customizer.addingBundle(item, related);
@@ -490,8 +475,7 @@ public class BundleTracker<T> implements
* @param related Action related object.
* @param object Customized object for the tracked item.
*/
- void customizerModified(final Bundle item, final BundleEvent related,
- final T object) {
+ void customizerModified(final Bundle item, final BundleEvent related, final T object) {
customizer.modifiedBundle(item, related, object);
}
@@ -503,8 +487,7 @@ public class BundleTracker<T> implements
* @param related Action related object.
* @param object Customized object for the tracked item.
*/
- void customizerRemoved(final Bundle item, final BundleEvent related,
- final T object) {
+ void customizerRemoved(final Bundle item, final BundleEvent related, final T object) {
customizer.removedBundle(item, related, object);
}
}
Modified: felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTrackerCustomizer.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTrackerCustomizer.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/util/tracker/BundleTrackerCustomizer.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2007, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2007, 2012). 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.
@@ -20,32 +20,29 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.BundleEvent;
/**
- * The {@code BundleTrackerCustomizer} interface allows a
- * {@code BundleTracker} to customize the {@code Bundle}s that are
- * tracked. A {@code BundleTrackerCustomizer} is called when a bundle is
- * being added to a {@code BundleTracker}. The
- * {@code BundleTrackerCustomizer} can then return an object for the
- * tracked bundle. A {@code BundleTrackerCustomizer} is also called when a
- * tracked bundle is modified or has been removed from a
+ * The {@code BundleTrackerCustomizer} interface allows a {@code BundleTracker}
+ * to customize the {@code Bundle}s that are tracked. A
+ * {@code BundleTrackerCustomizer} is called when a bundle is being added to a
+ * {@code BundleTracker}. The {@code BundleTrackerCustomizer} can then return an
+ * object for the tracked bundle. A {@code BundleTrackerCustomizer} is also
+ * called when a tracked bundle is modified or has been removed from a
* {@code BundleTracker}.
*
* <p>
* The methods in this interface may be called as the result of a
- * {@code BundleEvent} being received by a {@code BundleTracker}.
- * Since {@code BundleEvent}s are received synchronously by the
- * {@code BundleTracker}, it is highly recommended that implementations of
- * these methods do not alter bundle states while being synchronized on any
- * object.
+ * {@code BundleEvent} being received by a {@code BundleTracker}. Since
+ * {@code BundleEvent}s are received synchronously by the {@code BundleTracker},
+ * it is highly recommended that implementations of these methods do not alter
+ * bundle states while being synchronized on any object.
*
* <p>
* The {@code BundleTracker} class is thread-safe. It does not call a
* {@code BundleTrackerCustomizer} while holding any locks.
- * {@code BundleTrackerCustomizer} implementations must also be
- * thread-safe.
+ * {@code BundleTrackerCustomizer} implementations must also be thread-safe.
*
* @param <T> The type of the tracked object.
* @ThreadSafe
- * @version $Id: 0e80f2555530b217faef57726a5938f0087a45c5 $
+ * @version $Id: 727e757d2fa2940c88c9b74c8d299de6b3a7d0d0 $
* @since 1.4
*/
public interface BundleTrackerCustomizer<T> {
@@ -54,20 +51,20 @@ public interface BundleTrackerCustomizer
*
* <p>
* This method is called before a bundle which matched the search parameters
- * of the {@code BundleTracker} is added to the
- * {@code BundleTracker}. This method should return the object to be
- * tracked for the specified {@code Bundle}. The returned object is
- * stored in the {@code BundleTracker} and is available from the
+ * of the {@code BundleTracker} is added to the {@code BundleTracker}. This
+ * method should return the object to be tracked for the specified
+ * {@code Bundle}. The returned object is stored in the
+ * {@code BundleTracker} and is available from the
* {@link BundleTracker#getObject(Bundle) getObject} method.
*
- * @param bundle The {@code Bundle} being added to the
- * {@code BundleTracker}.
+ * @param bundle The {@code Bundle} being added to the {@code BundleTracker}
+ * .
* @param event The bundle event which caused this customizer method to be
- * called or {@code null} if there is no bundle event associated
- * with the call to this method.
- * @return The object to be tracked for the specified {@code Bundle}
- * object or {@code null} if the specified {@code Bundle}
- * object should not be tracked.
+ * called or {@code null} if there is no bundle event associated with
+ * the call to this method.
+ * @return The object to be tracked for the specified {@code Bundle} object
+ * or {@code null} if the specified {@code Bundle} object should not
+ * be tracked.
*/
public T addingBundle(Bundle bundle, BundleEvent event);
@@ -80,12 +77,11 @@ public interface BundleTrackerCustomizer
*
* @param bundle The {@code Bundle} whose state has been modified.
* @param event The bundle event which caused this customizer method to be
- * called or {@code null} if there is no bundle event associated
- * with the call to this method.
+ * called or {@code null} if there is no bundle event associated with
+ * the call to this method.
* @param object The tracked object for the specified bundle.
*/
- public void modifiedBundle(Bundle bundle, BundleEvent event,
- T object);
+ public void modifiedBundle(Bundle bundle, BundleEvent event, T object);
/**
* A bundle tracked by the {@code BundleTracker} has been removed.
@@ -96,10 +92,9 @@ public interface BundleTrackerCustomizer
*
* @param bundle The {@code Bundle} that has been removed.
* @param event The bundle event which caused this customizer method to be
- * called or {@code null} if there is no bundle event associated
- * with the call to this method.
+ * called or {@code null} if there is no bundle event associated with
+ * the call to this method.
* @param object The tracked object for the specified bundle.
*/
- public void removedBundle(Bundle bundle, BundleEvent event,
- T object);
+ public void removedBundle(Bundle bundle, BundleEvent event, T object);
}
Modified: felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTracker.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTracker.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTracker.java Fri May 11 20:19:02 2012
@@ -1,6 +1,6 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2010). All Rights Reserved.
- *
+ * Copyright (c) OSGi Alliance (2000, 2012). 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
@@ -20,7 +20,6 @@ import java.lang.reflect.Array;
import java.util.Collections;
import java.util.SortedMap;
import java.util.TreeMap;
-
import org.osgi.framework.AllServiceListener;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
@@ -34,29 +33,26 @@ import org.osgi.framework.ServiceReferen
* The {@code ServiceTracker} class simplifies using services from the
* Framework's service registry.
* <p>
- * A {@code ServiceTracker} object is constructed with search criteria and
- * a {@code ServiceTrackerCustomizer} object. A {@code ServiceTracker}
- * can use a {@code ServiceTrackerCustomizer} to customize the service
- * objects to be tracked. The {@code ServiceTracker} can then be opened to
- * begin tracking all services in the Framework's service registry that match
- * the specified search criteria. The {@code ServiceTracker} correctly
- * handles all of the details of listening to {@code ServiceEvent}s and
- * getting and ungetting services.
+ * A {@code ServiceTracker} object is constructed with search criteria and a
+ * {@code ServiceTrackerCustomizer} object. A {@code ServiceTracker} can use a
+ * {@code ServiceTrackerCustomizer} to customize the service objects to be
+ * tracked. The {@code ServiceTracker} can then be opened to begin tracking all
+ * services in the Framework's service registry that match the specified search
+ * criteria. The {@code ServiceTracker} correctly handles all of the details of
+ * listening to {@code ServiceEvent}s and getting and ungetting services.
* <p>
- * The {@code getServiceReferences} method can be called to get references
- * to the services being tracked. The {@code getService} and
- * {@code getServices} methods can be called to get the service objects for
- * the tracked service.
+ * The {@code getServiceReferences} method can be called to get references to
+ * the services being tracked. The {@code getService} and {@code getServices}
+ * methods can be called to get the service objects for the tracked service.
* <p>
* The {@code ServiceTracker} class is thread-safe. It does not call a
* {@code ServiceTrackerCustomizer} while holding any locks.
- * {@code ServiceTrackerCustomizer} implementations must also be
- * thread-safe.
+ * {@code ServiceTrackerCustomizer} implementations must also be thread-safe.
*
* @param <S> The type of the service being tracked.
* @param <T> The type of the tracked object.
* @ThreadSafe
- * @version $Id: df62459c90f49d06e89ff8f20915a9eec401217e $
+ * @version $Id: 21926ad8717a91633face6bbf570febfcd23b1c7 $
*/
public class ServiceTracker<S, T> implements ServiceTrackerCustomizer<S, T> {
/* set this to true to compile in debug messages */
@@ -66,8 +62,8 @@ public class ServiceTracker<S, T> implem
*/
protected final BundleContext context;
/**
- * The Filter used by this {@code ServiceTracker} which specifies the
- * search criteria for the services to track.
+ * The Filter used by this {@code ServiceTracker} which specifies the search
+ * criteria for the services to track.
*
* @since 1.1
*/
@@ -123,44 +119,38 @@ public class ServiceTracker<S, T> implem
private volatile T cachedService;
/**
- * Create a {@code ServiceTracker} on the specified
- * {@code ServiceReference}.
+ * Create a {@code ServiceTracker} on the specified {@code ServiceReference}
+ * .
*
* <p>
- * The service referenced by the specified {@code ServiceReference}
- * will be tracked by this {@code ServiceTracker}.
+ * The service referenced by the specified {@code ServiceReference} will be
+ * tracked by this {@code ServiceTracker}.
*
- * @param context The {@code BundleContext} against which the tracking
- * is done.
+ * @param context The {@code BundleContext} against which the tracking is
+ * done.
* @param reference The {@code ServiceReference} for the service to be
* tracked.
* @param customizer The customizer object to call when services are added,
- * modified, or removed in this {@code ServiceTracker}. If
- * customizer is {@code null}, then this
- * {@code ServiceTracker} will be used as the
- * {@code ServiceTrackerCustomizer} and this
+ * modified, or removed in this {@code ServiceTracker}. If customizer
+ * is {@code null}, then this {@code ServiceTracker} will be used as
+ * the {@code ServiceTrackerCustomizer} and this
* {@code ServiceTracker} will call the
* {@code ServiceTrackerCustomizer} methods on itself.
*/
- public ServiceTracker(final BundleContext context,
- final ServiceReference<S> reference,
- final ServiceTrackerCustomizer<S, T> customizer) {
+ public ServiceTracker(final BundleContext context, final ServiceReference<S> reference, final ServiceTrackerCustomizer<S, T> customizer) {
this.context = context;
this.trackReference = reference;
this.trackClass = null;
this.customizer = (customizer == null) ? this : customizer;
- this.listenerFilter = "(" + Constants.SERVICE_ID + "="
- + reference.getProperty(Constants.SERVICE_ID).toString() + ")";
+ this.listenerFilter = "(" + Constants.SERVICE_ID + "=" + reference.getProperty(Constants.SERVICE_ID).toString() + ")";
try {
this.filter = context.createFilter(listenerFilter);
- }
- catch (InvalidSyntaxException e) {
+ } catch (InvalidSyntaxException e) {
/*
* we could only get this exception if the ServiceReference was
* invalid
*/
- IllegalArgumentException iae = new IllegalArgumentException(
- "unexpected InvalidSyntaxException: " + e.getMessage());
+ IllegalArgumentException iae = new IllegalArgumentException("unexpected InvalidSyntaxException: " + e.getMessage());
iae.initCause(e);
throw iae;
}
@@ -173,63 +163,54 @@ public class ServiceTracker<S, T> implem
* Services registered under the specified class name will be tracked by
* this {@code ServiceTracker}.
*
- * @param context The {@code BundleContext} against which the tracking
- * is done.
+ * @param context The {@code BundleContext} against which the tracking is
+ * done.
* @param clazz The class name of the services to be tracked.
* @param customizer The customizer object to call when services are added,
- * modified, or removed in this {@code ServiceTracker}. If
- * customizer is {@code null}, then this
- * {@code ServiceTracker} will be used as the
- * {@code ServiceTrackerCustomizer} and this
+ * modified, or removed in this {@code ServiceTracker}. If customizer
+ * is {@code null}, then this {@code ServiceTracker} will be used as
+ * the {@code ServiceTrackerCustomizer} and this
* {@code ServiceTracker} will call the
* {@code ServiceTrackerCustomizer} methods on itself.
*/
- public ServiceTracker(final BundleContext context, final String clazz,
- final ServiceTrackerCustomizer<S, T> customizer) {
+ public ServiceTracker(final BundleContext context, final String clazz, final ServiceTrackerCustomizer<S, T> customizer) {
this.context = context;
this.trackReference = null;
this.trackClass = clazz;
this.customizer = (customizer == null) ? this : customizer;
// we call clazz.toString to verify clazz is non-null!
- this.listenerFilter = "(" + Constants.OBJECTCLASS + "="
- + clazz.toString() + ")";
+ this.listenerFilter = "(" + Constants.OBJECTCLASS + "=" + clazz.toString() + ")";
try {
this.filter = context.createFilter(listenerFilter);
- }
- catch (InvalidSyntaxException e) {
+ } catch (InvalidSyntaxException e) {
/*
* we could only get this exception if the clazz argument was
* malformed
*/
- IllegalArgumentException iae = new IllegalArgumentException(
- "unexpected InvalidSyntaxException: " + e.getMessage());
+ IllegalArgumentException iae = new IllegalArgumentException("unexpected InvalidSyntaxException: " + e.getMessage());
iae.initCause(e);
throw iae;
}
}
/**
- * Create a {@code ServiceTracker} on the specified {@code Filter}
- * object.
+ * Create a {@code ServiceTracker} on the specified {@code Filter} object.
*
* <p>
- * Services which match the specified {@code Filter} object will be
- * tracked by this {@code ServiceTracker}.
+ * Services which match the specified {@code Filter} object will be tracked
+ * by this {@code ServiceTracker}.
*
- * @param context The {@code BundleContext} against which the tracking
- * is done.
- * @param filter The {@code Filter} to select the services to be
- * tracked.
+ * @param context The {@code BundleContext} against which the tracking is
+ * done.
+ * @param filter The {@code Filter} to select the services to be tracked.
* @param customizer The customizer object to call when services are added,
- * modified, or removed in this {@code ServiceTracker}. If
- * customizer is null, then this {@code ServiceTracker} will be
- * used as the {@code ServiceTrackerCustomizer} and this
- * {@code ServiceTracker} will call the
- * {@code ServiceTrackerCustomizer} methods on itself.
+ * modified, or removed in this {@code ServiceTracker}. If customizer
+ * is null, then this {@code ServiceTracker} will be used as the
+ * {@code ServiceTrackerCustomizer} and this {@code ServiceTracker}
+ * will call the {@code ServiceTrackerCustomizer} methods on itself.
* @since 1.1
*/
- public ServiceTracker(final BundleContext context, final Filter filter,
- final ServiceTrackerCustomizer<S, T> customizer) {
+ public ServiceTracker(final BundleContext context, final Filter filter, final ServiceTrackerCustomizer<S, T> customizer) {
this.context = context;
this.trackReference = null;
this.trackClass = null;
@@ -251,20 +232,18 @@ public class ServiceTracker<S, T> implem
* Services registered under the name of the specified class will be tracked
* by this {@code ServiceTracker}.
*
- * @param context The {@code BundleContext} against which the tracking
- * is done.
+ * @param context The {@code BundleContext} against which the tracking is
+ * done.
* @param clazz The class of the services to be tracked.
* @param customizer The customizer object to call when services are added,
- * modified, or removed in this {@code ServiceTracker}. If
- * customizer is {@code null}, then this
- * {@code ServiceTracker} will be used as the
- * {@code ServiceTrackerCustomizer} and this
+ * modified, or removed in this {@code ServiceTracker}. If customizer
+ * is {@code null}, then this {@code ServiceTracker} will be used as
+ * the {@code ServiceTrackerCustomizer} and this
* {@code ServiceTracker} will call the
* {@code ServiceTrackerCustomizer} methods on itself.
* @since 1.5
*/
- public ServiceTracker(final BundleContext context, final Class<S> clazz,
- final ServiceTrackerCustomizer<S, T> customizer) {
+ public ServiceTracker(final BundleContext context, final Class<S> clazz, final ServiceTrackerCustomizer<S, T> customizer) {
this(context, clazz.getName(), customizer);
}
@@ -274,9 +253,8 @@ public class ServiceTracker<S, T> implem
* <p>
* This implementation calls {@code open(false)}.
*
- * @throws java.lang.IllegalStateException If the {@code BundleContext}
- * with which this {@code ServiceTracker} was created is no
- * longer valid.
+ * @throws java.lang.IllegalStateException If the {@code BundleContext} with
+ * which this {@code ServiceTracker} was created is no longer valid.
* @see #open(boolean)
*/
public void open() {
@@ -291,16 +269,14 @@ public class ServiceTracker<S, T> implem
* {@code ServiceTracker} was created are now tracked by this
* {@code ServiceTracker}.
*
- * @param trackAllServices If {@code true}, then this
- * {@code ServiceTracker} will track all matching services
- * regardless of class loader accessibility. If {@code false},
- * then this {@code ServiceTracker} will only track matching
- * services which are class loader accessible to the bundle whose
- * {@code BundleContext} is used by this
- * {@code ServiceTracker}.
- * @throws java.lang.IllegalStateException If the {@code BundleContext}
- * with which this {@code ServiceTracker} was created is no
- * longer valid.
+ * @param trackAllServices If {@code true}, then this {@code ServiceTracker}
+ * will track all matching services regardless of class loader
+ * accessibility. If {@code false}, then this {@code ServiceTracker}
+ * will only track matching services which are class loader
+ * accessible to the bundle whose {@code BundleContext} is used by
+ * this {@code ServiceTracker}.
+ * @throws java.lang.IllegalStateException If the {@code BundleContext} with
+ * which this {@code ServiceTracker} was created is no longer valid.
* @since 1.3
*/
public void open(boolean trackAllServices) {
@@ -318,28 +294,21 @@ public class ServiceTracker<S, T> implem
context.addServiceListener(t, listenerFilter);
ServiceReference<S>[] references = null;
if (trackClass != null) {
- references = getInitialReferences(trackAllServices,
- trackClass, null);
- }
- else {
+ references = getInitialReferences(trackAllServices, trackClass, null);
+ } else {
if (trackReference != null) {
if (trackReference.getBundle() != null) {
ServiceReference<S>[] single = new ServiceReference[] {trackReference};
references = single;
}
- }
- else { /* user supplied filter */
- references = getInitialReferences(trackAllServices,
- null, listenerFilter);
+ } else { /* user supplied filter */
+ references = getInitialReferences(trackAllServices, null, listenerFilter);
}
}
/* set tracked with the initial references */
t.setInitial(references);
- }
- catch (InvalidSyntaxException e) {
- throw new RuntimeException(
- "unexpected InvalidSyntaxException: "
- + e.getMessage(), e);
+ } catch (InvalidSyntaxException e) {
+ throw new RuntimeException("unexpected InvalidSyntaxException: " + e.getMessage(), e);
}
}
tracked = t;
@@ -356,18 +325,13 @@ public class ServiceTracker<S, T> implem
* {@code getAllServiceReferences}.
* @param className The class name with which the service was registered, or
* {@code null} for all services.
- * @param filterString The filter criteria or {@code null} for all
- * services.
+ * @param filterString The filter criteria or {@code null} for all services.
* @return The list of initial {@code ServiceReference}s.
* @throws InvalidSyntaxException If the specified filterString has an
* invalid syntax.
*/
- private ServiceReference<S>[] getInitialReferences(
- boolean trackAllServices, String className, String filterString)
- throws InvalidSyntaxException {
- ServiceReference<S>[] result = (ServiceReference<S>[]) ((trackAllServices) ? context
- .getAllServiceReferences(className, filterString)
- : context.getServiceReferences(className, filterString));
+ private ServiceReference<S>[] getInitialReferences(boolean trackAllServices, String className, String filterString) throws InvalidSyntaxException {
+ ServiceReference<S>[] result = (ServiceReference<S>[]) ((trackAllServices) ? context.getAllServiceReferences(className, filterString) : context.getServiceReferences(className, filterString));
return result;
}
@@ -375,8 +339,8 @@ public class ServiceTracker<S, T> implem
* Close this {@code ServiceTracker}.
*
* <p>
- * This method should be called when this {@code ServiceTracker} should
- * end the tracking of services.
+ * This method should be called when this {@code ServiceTracker} should end
+ * the tracking of services.
*
* <p>
* This implementation calls {@link #getServiceReferences()} to get the list
@@ -398,8 +362,7 @@ public class ServiceTracker<S, T> implem
tracked = null;
try {
context.removeServiceListener(outgoing);
- }
- catch (IllegalStateException e) {
+ } catch (IllegalStateException e) {
/* In case the context was stopped. */
}
}
@@ -414,8 +377,7 @@ public class ServiceTracker<S, T> implem
}
if (DEBUG) {
if ((cachedReference == null) && (cachedService == null)) {
- System.out.println("ServiceTracker.close[cached cleared]: "
- + filter);
+ System.out.println("ServiceTracker.close[cached cleared]: " + filter);
}
}
}
@@ -429,10 +391,9 @@ public class ServiceTracker<S, T> implem
* constructed with a {@code null ServiceTrackerCustomizer} argument.
*
* <p>
- * This implementation returns the result of calling {@code getService}
- * on the {@code BundleContext} with which this
- * {@code ServiceTracker} was created passing the specified
- * {@code ServiceReference}.
+ * This implementation returns the result of calling {@code getService} on
+ * the {@code BundleContext} with which this {@code ServiceTracker} was
+ * created passing the specified {@code ServiceReference}.
* <p>
* This method can be overridden in a subclass to customize the service
* object to be tracked for the service being added. In that case, take care
@@ -480,8 +441,8 @@ public class ServiceTracker<S, T> implem
*
* <p>
* This implementation calls {@code ungetService}, on the
- * {@code BundleContext} with which this {@code ServiceTracker}
- * was created, passing the specified {@code ServiceReference}.
+ * {@code BundleContext} with which this {@code ServiceTracker} was created,
+ * passing the specified {@code ServiceReference}.
* <p>
* This method can be overridden in a subclass. If the default
* implementation of {@link #addingService(ServiceReference) addingService}
@@ -501,8 +462,8 @@ public class ServiceTracker<S, T> implem
* {@code ServiceTracker} is closed.
*
* <p>
- * It is strongly recommended that {@code waitForService} is not used
- * during the calling of the {@code BundleActivator} methods.
+ * It is strongly recommended that {@code waitForService} is not used during
+ * the calling of the {@code BundleActivator} methods.
* {@code BundleActivator} methods are expected to complete in a short
* period of time.
*
@@ -521,8 +482,14 @@ public class ServiceTracker<S, T> implem
if (timeout < 0) {
throw new IllegalArgumentException("timeout value is negative");
}
+
T object = getService();
- while (object == null) {
+ if (object != null) {
+ return object;
+ }
+
+ final long endTime = (timeout == 0) ? 0 : (System.currentTimeMillis() + timeout);
+ do {
final Tracked t = tracked();
if (t == null) { /* if ServiceTracker is not open */
return null;
@@ -533,10 +500,13 @@ public class ServiceTracker<S, T> implem
}
}
object = getService();
- if (timeout > 0) {
- return object;
+ if (endTime > 0) { // if we have a timeout
+ timeout = endTime - System.currentTimeMillis();
+ if (timeout <= 0) { // that has expired
+ break;
+ }
}
- }
+ } while (object == null);
return object;
}
@@ -544,8 +514,8 @@ public class ServiceTracker<S, T> implem
* Return an array of {@code ServiceReference}s for all services being
* tracked by this {@code ServiceTracker}.
*
- * @return Array of {@code ServiceReference}s or {@code null} if
- * no services are being tracked.
+ * @return Array of {@code ServiceReference}s or {@code null} if no services
+ * are being tracked.
*/
public ServiceReference<S>[] getServiceReferences() {
final Tracked t = tracked();
@@ -563,32 +533,30 @@ public class ServiceTracker<S, T> implem
}
/**
- * Returns a {@code ServiceReference} for one of the services being
- * tracked by this {@code ServiceTracker}.
+ * Returns a {@code ServiceReference} for one of the services being tracked
+ * by this {@code ServiceTracker}.
*
* <p>
* If multiple services are being tracked, the service with the highest
* ranking (as specified in its {@code service.ranking} property) is
* returned. If there is a tie in ranking, the service with the lowest
- * service ID (as specified in its {@code service.id} property); that
- * is, the service that was registered first is returned. This is the same
+ * service ID (as specified in its {@code service.id} property); that is,
+ * the service that was registered first is returned. This is the same
* algorithm used by {@code BundleContext.getServiceReference}.
*
* <p>
* This implementation calls {@link #getServiceReferences()} to get the list
* of references for the tracked services.
*
- * @return A {@code ServiceReference} or {@code null} if no
- * services are being tracked.
+ * @return A {@code ServiceReference} or {@code null} if no services are
+ * being tracked.
* @since 1.1
*/
public ServiceReference<S> getServiceReference() {
ServiceReference<S> reference = cachedReference;
if (reference != null) {
if (DEBUG) {
- System.out
- .println("ServiceTracker.getServiceReference[cached]: "
- + filter);
+ System.out.println("ServiceTracker.getServiceReference[cached]: " + filter);
}
return reference;
}
@@ -606,18 +574,14 @@ public class ServiceTracker<S, T> implem
int count = 0;
int maxRanking = Integer.MIN_VALUE;
for (int i = 0; i < length; i++) {
- Object property = references[i]
- .getProperty(Constants.SERVICE_RANKING);
- int ranking = (property instanceof Integer) ? ((Integer) property)
- .intValue()
- : 0;
+ Object property = references[i].getProperty(Constants.SERVICE_RANKING);
+ int ranking = (property instanceof Integer) ? ((Integer) property).intValue() : 0;
rankings[i] = ranking;
if (ranking > maxRanking) {
index = i;
maxRanking = ranking;
count = 1;
- }
- else {
+ } else {
if (ranking == maxRanking) {
count++;
}
@@ -627,9 +591,7 @@ public class ServiceTracker<S, T> implem
long minId = Long.MAX_VALUE;
for (int i = 0; i < length; i++) {
if (rankings[i] == maxRanking) {
- long id = ((Long) (references[i]
- .getProperty(Constants.SERVICE_ID)))
- .longValue();
+ long id = ((Long) (references[i].getProperty(Constants.SERVICE_ID))).longValue();
if (id < minId) {
index = i;
minId = id;
@@ -642,14 +604,13 @@ public class ServiceTracker<S, T> implem
}
/**
- * Returns the service object for the specified
- * {@code ServiceReference} if the specified referenced service is
- * being tracked by this {@code ServiceTracker}.
+ * Returns the service object for the specified {@code ServiceReference} if
+ * the specified referenced service is being tracked by this
+ * {@code ServiceTracker}.
*
* @param reference The reference to the desired service.
- * @return A service object or {@code null} if the service referenced
- * by the specified {@code ServiceReference} is not being
- * tracked.
+ * @return A service object or {@code null} if the service referenced by the
+ * specified {@code ServiceReference} is not being tracked.
*/
public T getService(ServiceReference<S> reference) {
final Tracked t = tracked();
@@ -671,8 +632,8 @@ public class ServiceTracker<S, T> implem
* {@link #getService(ServiceReference)} for each reference to get the
* tracked service object.
*
- * @return An array of service objects or {@code null} if no services
- * are being tracked.
+ * @return An array of service objects or {@code null} if no services are
+ * being tracked.
*/
public Object[] getServices() {
final Tracked t = tracked();
@@ -708,8 +669,7 @@ public class ServiceTracker<S, T> implem
T service = cachedService;
if (service != null) {
if (DEBUG) {
- System.out.println("ServiceTracker.getService[cached]: "
- + filter);
+ System.out.println("ServiceTracker.getService[cached]: " + filter);
}
return service;
}
@@ -726,10 +686,10 @@ public class ServiceTracker<S, T> implem
/**
* Remove a service from this {@code ServiceTracker}.
*
- * The specified service will be removed from this
- * {@code ServiceTracker}. If the specified service was being tracked
- * then the {@code ServiceTrackerCustomizer.removedService} method will
- * be called for that service.
+ * The specified service will be removed from this {@code ServiceTracker}.
+ * If the specified service was being tracked then the
+ * {@code ServiceTrackerCustomizer.removedService} method will be called for
+ * that service.
*
* @param reference The reference to the service to be removed.
*/
@@ -804,21 +764,20 @@ public class ServiceTracker<S, T> implem
}
/**
- * Return a {@code SortedMap} of the {@code ServiceReference}s and
- * service objects for all services being tracked by this
- * {@code ServiceTracker}. The map is sorted in reverse natural order
- * of {@code ServiceReference}. That is, the first entry is the service
- * with the highest ranking and the lowest service id.
- *
- * @return A {@code SortedMap} with the {@code ServiceReference}s
- * and service objects for all services being tracked by this
- * {@code ServiceTracker}. If no services are being tracked,
- * then the returned map is empty.
+ * Return a {@code SortedMap} of the {@code ServiceReference}s and service
+ * objects for all services being tracked by this {@code ServiceTracker}.
+ * The map is sorted in reverse natural order of {@code ServiceReference}.
+ * That is, the first entry is the service with the highest ranking and the
+ * lowest service id.
+ *
+ * @return A {@code SortedMap} with the {@code ServiceReference}s and
+ * service objects for all services being tracked by this
+ * {@code ServiceTracker}. If no services are being tracked, then
+ * the returned map is empty.
* @since 1.5
*/
public SortedMap<ServiceReference<S>, T> getTracked() {
- SortedMap<ServiceReference<S>, T> map = new TreeMap<ServiceReference<S>, T>(
- Collections.reverseOrder());
+ SortedMap<ServiceReference<S>, T> map = new TreeMap<ServiceReference<S>, T>(Collections.reverseOrder());
final Tracked t = tracked();
if (t == null) { /* if ServiceTracker is not open */
return map;
@@ -884,8 +843,7 @@ public class ServiceTracker<S, T> implem
return array;
}
if (length > array.length) {
- array = (T[]) Array.newInstance(array.getClass()
- .getComponentType(), length);
+ array = (T[]) Array.newInstance(array.getClass().getComponentType(), length);
}
for (int i = 0; i < length; i++) {
array[i] = getService(references[i]);
@@ -903,9 +861,7 @@ public class ServiceTracker<S, T> implem
*
* @ThreadSafe
*/
- private class Tracked extends
- AbstractTracked<ServiceReference<S>, T, ServiceEvent>
- implements ServiceListener {
+ private class Tracked extends AbstractTracked<ServiceReference<S>, T, ServiceEvent> implements ServiceListener {
/**
* Tracked constructor.
*/
@@ -914,9 +870,8 @@ public class ServiceTracker<S, T> implem
}
/**
- * {@code ServiceListener} method for the
- * {@code ServiceTracker} class. This method must NOT be
- * synchronized to avoid deadlock potential.
+ * {@code ServiceListener} method for the {@code ServiceTracker} class.
+ * This method must NOT be synchronized to avoid deadlock potential.
*
* @param event {@code ServiceEvent} object from the framework.
*/
@@ -928,11 +883,9 @@ public class ServiceTracker<S, T> implem
if (closed) {
return;
}
- final ServiceReference<S> reference = (ServiceReference<S>) event
- .getServiceReference();
+ final ServiceReference<S> reference = (ServiceReference<S>) event.getServiceReference();
if (DEBUG) {
- System.out.println("ServiceTracker.Tracked.serviceChanged["
- + event.getType() + "]: " + reference);
+ System.out.println("ServiceTracker.Tracked.serviceChanged[" + event.getType() + "]: " + reference);
}
switch (event.getType()) {
@@ -972,11 +925,10 @@ public class ServiceTracker<S, T> implem
*
* @param item Item to be tracked.
* @param related Action related object.
- * @return Customized object for the tracked item or {@code null}
- * if the item is not to be tracked.
+ * @return Customized object for the tracked item or {@code null} if the
+ * item is not to be tracked.
*/
- final T customizerAdding(final ServiceReference<S> item,
- final ServiceEvent related) {
+ final T customizerAdding(final ServiceReference<S> item, final ServiceEvent related) {
return customizer.addingService(item);
}
@@ -988,8 +940,7 @@ public class ServiceTracker<S, T> implem
* @param related Action related object.
* @param object Customized object for the tracked item.
*/
- final void customizerModified(final ServiceReference<S> item,
- final ServiceEvent related, final T object) {
+ final void customizerModified(final ServiceReference<S> item, final ServiceEvent related, final T object) {
customizer.modifiedService(item, object);
}
@@ -1001,8 +952,7 @@ public class ServiceTracker<S, T> implem
* @param related Action related object.
* @param object Customized object for the tracked item.
*/
- final void customizerRemoved(final ServiceReference<S> item,
- final ServiceEvent related, final T object) {
+ final void customizerRemoved(final ServiceReference<S> item, final ServiceEvent related, final T object) {
customizer.removedService(item, object);
}
}
Modified: felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTrackerCustomizer.java?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTrackerCustomizer.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/util/tracker/ServiceTrackerCustomizer.java Fri May 11 20:19:02 2012
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2012). 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.
@@ -20,34 +20,32 @@ import org.osgi.framework.ServiceReferen
/**
* The {@code ServiceTrackerCustomizer} interface allows a
- * {@code ServiceTracker} to customize the service objects that are
- * tracked. A {@code ServiceTrackerCustomizer} is called when a service is
- * being added to a {@code ServiceTracker}. The
- * {@code ServiceTrackerCustomizer} can then return an object for the
- * tracked service. A {@code ServiceTrackerCustomizer} is also called when
- * a tracked service is modified or has been removed from a
+ * {@code ServiceTracker} to customize the service objects that are tracked. A
+ * {@code ServiceTrackerCustomizer} is called when a service is being added to a
+ * {@code ServiceTracker}. The {@code ServiceTrackerCustomizer} can then return
+ * an object for the tracked service. A {@code ServiceTrackerCustomizer} is also
+ * called when a tracked service is modified or has been removed from a
* {@code ServiceTracker}.
*
* <p>
* The methods in this interface may be called as the result of a
- * {@code ServiceEvent} being received by a {@code ServiceTracker}.
- * Since {@code ServiceEvent}s are synchronously delivered by the
- * Framework, it is highly recommended that implementations of these methods do
- * not register ({@code BundleContext.registerService}), modify (
+ * {@code ServiceEvent} being received by a {@code ServiceTracker}. Since
+ * {@code ServiceEvent}s are synchronously delivered by the Framework, it is
+ * highly recommended that implementations of these methods do not register (
+ * {@code BundleContext.registerService}), modify (
* {@code ServiceRegistration.setProperties}) or unregister (
- * {@code ServiceRegistration.unregister}) a service while being
- * synchronized on any object.
+ * {@code ServiceRegistration.unregister}) a service while being synchronized on
+ * any object.
*
* <p>
* The {@code ServiceTracker} class is thread-safe. It does not call a
* {@code ServiceTrackerCustomizer} while holding any locks.
- * {@code ServiceTrackerCustomizer} implementations must also be
- * thread-safe.
+ * {@code ServiceTrackerCustomizer} implementations must also be thread-safe.
*
* @param <S> The type of the service being tracked.
* @param <T> The type of the tracked object.
* @ThreadSafe
- * @version $Id: c654a963336cee74762b8f54c8cef8d5774f8b4d $
+ * @version $Id: c14b8d47026b6bd4ba1f2db7bf7e755d00fc6f6a $
*/
public interface ServiceTrackerCustomizer<S, T> {
/**
@@ -56,11 +54,10 @@ public interface ServiceTrackerCustomize
* <p>
* This method is called before a service which matched the search
* parameters of the {@code ServiceTracker} is added to the
- * {@code ServiceTracker}. This method should return the service object
- * to be tracked for the specified {@code ServiceReference}. The
- * returned service object is stored in the {@code ServiceTracker} and
- * is available from the {@code getService} and
- * {@code getServices} methods.
+ * {@code ServiceTracker}. This method should return the service object to
+ * be tracked for the specified {@code ServiceReference}. The returned
+ * service object is stored in the {@code ServiceTracker} and is available
+ * from the {@code getService} and {@code getServices} methods.
*
* @param reference The reference to the service being added to the
* {@code ServiceTracker}.
Modified: felix/trunk/framework/src/main/resources/default.properties
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/default.properties?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/resources/default.properties (original)
+++ felix/trunk/framework/src/main/resources/default.properties Fri May 11 20:19:02 2012
@@ -53,18 +53,20 @@ ee-1.3=J2SE-1.3,J2SE-1.2,JRE-1.1,JRE-1.0
ee-1.2=J2SE-1.2,JRE-1.1,JRE-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.0
# Default packages exported by system bundle.
-org.osgi.framework.system.packages=org.osgi.framework; version=1.6.0, \
- org.osgi.framework.launch; version=1.0.0, \
- org.osgi.framework.wiring; version=1.0.0, \
- org.osgi.framework.startlevel; version=1.0.0, \
- org.osgi.framework.hooks.bundle; version=1.0.0, \
+org.osgi.framework.system.packages=org.osgi.framework; version=1.7.0, \
+ org.osgi.framework.hooks.bundle; version=1.1.0, \
org.osgi.framework.hooks.resolver; version=1.0.0, \
org.osgi.framework.hooks.service; version=1.1.0, \
org.osgi.framework.hooks.weaving; version=1.0.0, \
+ org.osgi.framework.launch; version=1.1.0, \
+ org.osgi.framework.namespace; version=1.0.0, \
+ org.osgi.framework.startlevel; version=1.0.0, \
+ org.osgi.framework.wiring; version=1.1.0, \
+ org.osgi.resource; version=1.0.0, \
org.osgi.service.packageadmin; version=1.2.0, \
org.osgi.service.startlevel; version=1.1.0, \
org.osgi.service.url; version=1.0.0, \
- org.osgi.util.tracker; version=1.5.0 \
+ org.osgi.util.tracker; version=1.5.1 \
${dollar}{jre-${dollar}{java.specification.version}}
#
Modified: felix/trunk/framework/src/main/resources/org/osgi/framework/hooks/bundle/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/org/osgi/framework/hooks/bundle/packageinfo?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/resources/org/osgi/framework/hooks/bundle/packageinfo (original)
+++ felix/trunk/framework/src/main/resources/org/osgi/framework/hooks/bundle/packageinfo Fri May 11 20:19:02 2012
@@ -1 +1 @@
-version 1.0
+version 1.1
Modified: felix/trunk/framework/src/main/resources/org/osgi/framework/launch/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/org/osgi/framework/launch/packageinfo?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/resources/org/osgi/framework/launch/packageinfo (original)
+++ felix/trunk/framework/src/main/resources/org/osgi/framework/launch/packageinfo Fri May 11 20:19:02 2012
@@ -1 +1 @@
-version 1.0
+version 1.1
Added: felix/trunk/framework/src/main/resources/org/osgi/framework/namespace/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/org/osgi/framework/namespace/packageinfo?rev=1337360&view=auto
==============================================================================
--- felix/trunk/framework/src/main/resources/org/osgi/framework/namespace/packageinfo (added)
+++ felix/trunk/framework/src/main/resources/org/osgi/framework/namespace/packageinfo Fri May 11 20:19:02 2012
@@ -0,0 +1 @@
+version 1.0
Modified: felix/trunk/framework/src/main/resources/org/osgi/framework/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/org/osgi/framework/packageinfo?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/resources/org/osgi/framework/packageinfo (original)
+++ felix/trunk/framework/src/main/resources/org/osgi/framework/packageinfo Fri May 11 20:19:02 2012
@@ -1 +1 @@
-version 1.6
+version 1.7
Modified: felix/trunk/framework/src/main/resources/org/osgi/framework/wiring/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/org/osgi/framework/wiring/packageinfo?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/resources/org/osgi/framework/wiring/packageinfo (original)
+++ felix/trunk/framework/src/main/resources/org/osgi/framework/wiring/packageinfo Fri May 11 20:19:02 2012
@@ -1 +1 @@
-version 1.0
+version 1.1
Added: felix/trunk/framework/src/main/resources/org/osgi/resource/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/org/osgi/resource/packageinfo?rev=1337360&view=auto
==============================================================================
--- felix/trunk/framework/src/main/resources/org/osgi/resource/packageinfo (added)
+++ felix/trunk/framework/src/main/resources/org/osgi/resource/packageinfo Fri May 11 20:19:02 2012
@@ -0,0 +1 @@
+version 1.0
Modified: felix/trunk/framework/src/main/resources/org/osgi/util/tracker/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/resources/org/osgi/util/tracker/packageinfo?rev=1337360&r1=1337359&r2=1337360&view=diff
==============================================================================
--- felix/trunk/framework/src/main/resources/org/osgi/util/tracker/packageinfo (original)
+++ felix/trunk/framework/src/main/resources/org/osgi/util/tracker/packageinfo Fri May 11 20:19:02 2012
@@ -1 +1 @@
-version 1.5
+version 1.5.1