You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2009/07/01 09:23:34 UTC
svn commit: r790051 - in /geronimo/sandbox/blueprint:
blueprint-api/src/main/java/org/osgi/service/blueprint/container/
blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/
blueprint-core/src/main/java/org/apache/geronimo/blueprint/
Author: gnodet
Date: Wed Jul 1 07:23:33 2009
New Revision: 790051
URL: http://svn.apache.org/viewvc?rev=790051&view=rev
Log:
Update to latest (final?) api
Added:
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo
Modified:
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java
geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintContainer.java Wed Jul 1 07:23:33 2009
@@ -15,113 +15,89 @@
*/
package org.osgi.service.blueprint.container;
-import java.util.Collection;
-import java.util.Set;
+import java.util.*;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.*;
/**
- * Blueprint Container providing access to the components, exported services,
- * and service references of a bundle using Blueprint services. Only bundles in
- * the <code>ACTIVE</code> (or also <code>STARTING</code> for bundles with a
- * lazy activation policy) state may have an associated Blueprint Container. A
+ * Blueprint Container provides access to all the managers. These are the beans,
+ * registered services, and service references. Only bundles in the
+ * <code>ACTIVE</code> (or also <code>STARTING</code> for bundles with a
+ * lazy activation policy) state can have an associated Blueprint Container. A
* given Bundle Context has at most one associated Blueprint Container.
- *
- * A Blueprint Container may be obtained by injecting the predefined
- * "blueprintContainer" component instance. Alternatively you can look up a
- * Blueprint Container services in the service registry. The
- * {@link org.osgi.framework.Constants#BUNDLE_SYMBOLICNAME} and
- * {@link org.osgi.framework.Constants#BUNDLE_VERSION} service properties can be
- * used to determine which bundle the published Blueprint Container service is
- * associated with.
- *
- * A Blueprint Container implementation must support safe concurrent access. It
- * is legal for the set of named components and component Metadata to change
- * between invocations on the same thread if another thread is concurrently
- * modifying the same mutable Blueprint Container implementation object.
- *
+ *
+ * A Blueprint Container can be obtained by injecting the predefined
+ * "blueprintContainer" environment manager. Alternatively the Blueprint
+ * Container is registered as a service and its managers can be looked up.
+ *
* @see org.osgi.framework.Constants
+ *
+ * @ThreadSafe
*/
public interface BlueprintContainer {
/**
- * The set of component names recognized by the blueprint context.
- *
- * @return an immutable set (of Strings) containing the names of all of the
- * components within the context.
+ * The set of manager ids recognized by the Blueprint Container.
+ *
+ * @return an immutable Set of Strings, containing the ids of all of the
+ * managers within the Blueprint Container.
*/
Set<String> getComponentIds();
/**
- * Get the component instance for a given named component. If the component
- * has not yet been instantiated, calling this operation will cause the
+ * Get the component instance for a given named component. If the manager
+ * has not yet been activated, calling this operation will cause the
* component instance to be created and initialized. If the component has a
- * prototype scope then each call to getComponentInstance will return a new
- * component instance. If the component has a bundle scope then the
- * component instance returned will be the instance for the caller's bundle
- * (and that instance will be instantiated if it has not already been
- * created).
- *
- * Note: calling getComponent from logic executing during the instantiation
- * and configuration of a component, before the init method (if specified)
- * has returned, may trigger a circular dependency (for a trivial example,
- * consider a component that looks itself up by name during its init
- * method). Implementations of the Blueprint Service are not required to
- * support cycles in the dependency graph and may throw an exception if a
- * cycle is detected. Implementations that can support certain kinds of
- * cycles are free to do so.
- *
+ * prototype scope then each call to the <code>getComponentInstance</code>
+ * method will return a new component instance.
+ *
+ * Calling {link #getComponentInstance} from logic executing during the
+ * construction of a component, before the <code>initMethod</code> (if
+ * specified) has returned, may trigger a circular dependency.
+ *
* @param id
- * the name of the component for which the instance is to be
- * retrieved.
- *
- * @return the component instance, the type of the returned object is
- * dependent on the component definition, and may be determined by
- * introspecting the component Metadata.
- *
+ * The id of the manager for which the instance is to be
+ * provided.
+ *
+ * @return The component instance, the type of the returned object is
+ * dependent on the manager, and may be determined with the
+ * Metadata.
+ *
* @throws NoSuchComponentException
- * if the name specified is not the name of a component within
- * the context.
+ * If the id specified is not the id of a manager within the
+ * context.
*/
Object getComponentInstance(String id);
/**
- * Get the component Metadata for a given named component.
- *
+ * Get the Metadata for a given manager id.
+ *
* @param id
- * the name of the component for which the Metadata is to be
+ * the id of the manager for which the Metadata is to be
* retrieved.
- *
- * @return the component Metadata for the component.
- *
+ *
+ * @return the Metadata for the manager with the given id.
+ *
* @throws NoSuchComponentException
- * if the name specified is not the name of a component within
- * the context.
+ * if the id specified is not the id of a manager within the
+ * Blueprint Container.
*/
ComponentMetadata getComponentMetadata(String id);
/**
- * Returns all ComponentMetadata instances of the given type. The supported
- * Metadata types are ComponentMetadata (which returns the Metadata for all
- * defined component types), BeanMetadata, ServiceReferenceMetadata (which
- * returns both ReferenceMetadata and ReferenceListMetadata instances),
- * ReferenceMetadata, ReferenceListMetadata, and ServiceMetadata. The collection
- * will include all Metadata instances of the requested type, including
- * components that are declared as inline values.
- *
- * @param type
- *
- * @return an immutable collection of ComponentMetadata objects of the
+ * Returns all {@link ComponentMetadata} instances of the given type. The
+ * supported Metadata types are {@link ComponentMetadata} (which returns the
+ * Metadata for all defined manager types), {@link BeanMetadata},
+ * {@link ServiceReferenceMetadata} (which returns both
+ * {@link ReferenceMetadata} and {@link ReferenceListMetadata} instances),
+ * and {@link ServiceMetadata}. The collection will include all Metadata
+ * instances of the requested type, including components that are declared
+ * as inline values.
+ *
+ * @param type The super type or type of all returned Metadata
+ *
+ * @return An immutable collection of {@link ComponentMetadata} objects of the
* matching type.
*/
<T extends ComponentMetadata> Collection<T> getMetadata(
Class<T> type);
-
- /**
- * Get the bundle context of the bundle this blueprint context is associated
- * with.
- *
- * @return the blueprint context's bundle context
- */
- BundleContext getBundleContext();
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/BlueprintListener.java Wed Jul 1 07:23:33 2009
@@ -16,14 +16,23 @@
package org.osgi.service.blueprint.container;
/**
- * Listener for <code>BlueprintEvent</code>s.
+ * Listener for <code>BlueprintEvent</code>s. Implementers should register
+ * this a Blueprint Event Listener service. The Blueprint extender must inform
+ * the Blueprint Event Listener synchronously with the registration the last
+ * non-DESTROYED event of all managed bundles with the replay flag set before
+ * any of the other events are delivered. The delivery must maintain the time
+ * ordering.
*
* @see BlueprintEvent
+ *
+ * @ThreadSafe
*/
public interface BlueprintListener {
/**
- * Receives notifications of a Blueprint Event.
+ * Receives synchronous notifications of a Blueprint Event.
+ *
+ * Implementers should quickly process the events and return.
*
* @param event
* The <code>BlueprintEvent</code>.
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/Converter.java Wed Jul 1 07:23:33 2009
@@ -36,18 +36,17 @@
boolean canConvert(Object s, ReifiedType T);
/**
- * Convert an object to an instance of the given class, using the built-in
- * and user-registered type converters as necessary.
+ * Convert an object to an instance of the given class.
*
* @param s
* The source object to convert from
* @param T
* The target type
- * @return an instance of the class 'toType'
+ * @return an instance with a type that is assignable from T's raw class
* @throws Exception
- * if the conversion cannot succeed. This exception is checked
- * because callers should expect that not all source objects can
- * be successfully converted.
+ * If the conversion cannot succeed. This exception should not
+ * be thrown when the {@link #canConvert} method has returned
+ * <code>true</code>.
*/
Object convert(Object s, ReifiedType T) throws Exception;
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/EventConstants.java Wed Jul 1 07:23:33 2009
@@ -18,7 +18,7 @@
import org.osgi.framework.*;
/**
- * Event property names used in Event Admin events published for a Blueprint
+ * Event property names used in Event Admin events published by a Blueprint
* container.
*
* Each type of event is sent to a different topic:<br/>
@@ -78,7 +78,7 @@
/**
* The bundle id property defining the id of the blueprint bundle for which
- * an event has been issued. This property is of type <code>Integer</code>.
+ * an event has been issued. This property is of type <code>Long</code>.
*/
public static final String BUNDLE_ID = "bundle.id";
@@ -91,13 +91,13 @@
/**
* The bundle id property defining the id of the blueprint bundle for which
- * an event has been issued. This property is of type <code>Integer</code>.
+ * an event has been issued. This property is of type <code>Version</code>.
*/
public static final String BUNDLE_VERSION = "bundle.version";
/**
* The extender bundle property defining the extender bundle processing the
- * blueprint container for which an event has been issued. This property is
+ * Blueprint Container for which an event has been issued. This property is
* of type {@link org.osgi.framework.Bundle}.
*
* @see Bundle
@@ -105,23 +105,23 @@
public static final String EXTENDER_BUNDLE = "extender.bundle";
/**
- * The extender bundle id property defining the id of the extender bundle
- * processing the blueprint container for which an event has been issued.
- * This property is of type <code>Integer</code>.
+ * The Blueprint extender bundle id property defining the id of the extender bundle
+ * processing the Blueprint Container for which an event has been issued.
+ * This property is of type <code>Long</code>.
*/
public static final String EXTENDER_BUNDLE_ID = "extender.bundle.id";
/**
* The extender bundle symbolic name property defining the symbolic name of
- * the extender bundle processing the blueprint container for which an event
+ * the extender bundle processing the Blueprint Container for which an event
* has been issued. This property is of type <code>String</code>.
*/
public static final String EXTENDER_BUNDLE_SYMBOLICNAME = "extender.bundle.symbolicName";
/**
- * The extender bundle version property defining the version of the extender
- * bundle processing the blueprint container for which an event has been
- * issued. This property is of type <code>Integer</code>.
+ * The Blueprint extender bundle version property defining the version of the Blueprint extender
+ * bundle processing the Blueprint Container for which an event has been
+ * issued. This property is of type <code>Version</code>.
*/
public static final String EXTENDER_BUNDLE_VERSION = "extender.bundle.version";
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/NoSuchComponentException.java Wed Jul 1 07:23:33 2009
@@ -17,34 +17,34 @@
/**
* Thrown when an attempt is made to lookup a component by id and no such
- * component exists in the blueprint container.
+ * component exists in the Blueprint Container.
*/
public class NoSuchComponentException extends RuntimeException {
private static final long serialVersionUID = 1L;
/**
- * The name of the component request that generated the exception.
+ * The id of the component request that generated the exception.
*/
- private final String componentName;
+ private final String managerId;
/**
- * Create an exception for a single component name request.
+ * Create an exception for a single manager id request.
*
- * @param componentName
- * The name of the non-existent component.
+ * @param id
+ * The id of the non-existent manager.
*/
- public NoSuchComponentException(String componentName) {
- this.componentName = componentName;
+ public NoSuchComponentException(String id) {
+ this.managerId = id;
}
/**
- * Returns the component name that generated the exception.
+ * Returns the manager id that generated the Exception.
*
- * @return The String name of the component associated with an unresolved
+ * @return The id of the component associated with an unresolved
* request.
*/
- public String getComponentName() {
- return this.componentName;
+ public String getComponentId() {
+ return this.managerId;
}
/**
@@ -53,8 +53,8 @@
* @return The descriptive message for the exception.
*/
public String getMessage() {
- return "No component named '"
- + (this.componentName == null ? "<null>" : this.componentName)
+ return "No manager with id '"
+ + (this.managerId == null ? "<null>" : this.managerId)
+ "' could be found";
}
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ReifiedType.java Wed Jul 1 07:23:33 2009
@@ -16,18 +16,22 @@
package org.osgi.service.blueprint.container;
/**
- * Provides access to a concrete type and its optional generic type argument.
+ * Provides access to a concrete type and its optional generic type arguments.
*
- * A Collapsed Type converts a type declaration to a generalized form that is
- * directly usable for conversion.It provides access to the concrete Class of
- * the type as well of the optional type arguments.
+ * Java 5 and later support generic types. These types consist of a raw class
+ * with type arguments. This class models such a <code>Type</code> class but
+ * ensures that the type is <em>reified</em>. Reification means that the Type
+ * graph associated with a Java 5 <code>Type</code> instance is traversed
+ * until the type becomes a concrete class. In Java 1.4 a class has no
+ * arguments. This concrete class implements the Reified Type for Java 1.4.
*
- * In Java 1.4, this class only works on non-generic types. In those cases, a
- * Collapsed Type provides to the class and has no type arguments. Blueprint
+ * In Java 1.4, this class works with non-generic types. In that cases, a
+ * Reified Type provides access to the class and has zero type arguments, though
+ * a subclass that provide type arguments should be respected. Blueprint
* extender implementations can subclass this class and provide access to the
- * generics type graph if used in a declaration. Such a subclass must
- * <em>collapse<em> the different <code>Type</code> instances into the
- * collapsed form. That is, a form where the raw Class is available with its optional type arguments.
+ * generics type graph if used in a conversion. Such a subclass must
+ * <em>reify<em> the different Java 5 <code>Type</code> instances into the
+ * reified form. That is, a form where the raw Class is available with its optional type arguments as Reified Types.
*
* @Immutable
*/
@@ -37,11 +41,12 @@
private final Class clazz;
/**
- * Create a Collapsed Type for a normal Java class without any generics
- * information.
+ * Create a Reified Type for a raw Java class without any generic arguments.
+ * Subclasses can provide the optional generic argument information. Without
+ * subclassing, this instance has no type arguments.
*
* @param clazz
- * The class that is the collapsed type.
+ * The raw class of the Reified Type.
*/
public ReifiedType(Class clazz) {
this.clazz = clazz;
@@ -70,10 +75,12 @@
* Access to a type argument.
*
* The type argument refers to a argument in a generic type declaration
- * given by index <code>i</code>. This method returns a Collapsed Type
- * that has Object as class when no generic type information is available.
- * Any object is assignable to Object and therefore no conversion is then
- * necessary, this is compatible with older Javas.
+ * given by index <code>i</code>. This method returns a Reified Type that
+ * has Object as class when no generic type information is available. Any
+ * object is assignable to Object and therefore no conversion is then
+ * necessary, this is compatible with older Javas than 5. For this reason,
+ * the implementation in this class always returns the
+ * <code>Object<code> class, regardless of the given index.
*
* This method should be overridden by a subclass that provides access to
* the generic information.
@@ -89,18 +96,19 @@
*
* @param i
* The index of the type argument
- * @return A Collapsed Type that represents a type argument. If
+ * @return <code>ReifiedType(Object.class)<code>, subclasses must override this and return the generic argument at index <code>i</code>
*/
public ReifiedType getActualTypeArgument(int i) {
return ALL;
}
-
+
/**
* Return the number of type arguments.
*
- * This method should be overridden by a subclass for Java 5 types.
+ * This method should be overridden by a subclass to support Java 5 types.
*
- * @return 0, subclasses must override this
+ * @return 0, subclasses must override this and return the number of generic
+ * arguments
*/
public int size() {
return 0;
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/ServiceUnavailableException.java Wed Jul 1 07:23:33 2009
@@ -18,7 +18,7 @@
import org.osgi.framework.ServiceException;
/**
- * Thrown when an invocation is made on an OSGi service reference component, and
+ * Thrown when an invocation is made on a service reference, and
* a backing service is not available.
*/
public class ServiceUnavailableException extends ServiceException {
Added: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html?rev=790051&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html (added)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/package.html Wed Jul 1 07:23:33 2009
@@ -0,0 +1,21 @@
+<!-- $Revision: 5654 $ -->
+<BODY>
+<p>Blueprint Service Container Package Version 1.0.</p>
+<p>Bundles wishing to use this package must list the package
+in the Import-Package header of the bundle's manifest.
+For example:</p>
+<pre>
+Import-Package: org.osgi.service.blueprint.container; version="[1.0,2.0)"
+</pre>
+<p>
+ This package defines the primary interface to a blueprint container,
+ <code>BlueprintContainer</code>. An instance of this type is available
+ inside a blueprint context as an implicitly defined component with name
+ "blueprintContainer".
+</p>
+<p>
+ This package also declares the supporting exception types, listener, and constants for working with a blueprint
+ container.
+</p>
+</BODY>
+
Added: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo?rev=790051&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo (added)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/container/packageinfo Wed Jul 1 07:23:33 2009
@@ -0,0 +1 @@
+version 1.0
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanArgument.java Wed Jul 1 07:23:33 2009
@@ -16,36 +16,36 @@
package org.osgi.service.blueprint.reflect;
/**
- * Metadata used in a Bean Component to inject arguments in a method or
- * constructor. This metadata class describes the <code>argument</element>
+ * Metadata used in a Bean Manager to inject arguments in a method or
+ * constructor. This Metadata class describes the <code>argument</element>
*/
public interface BeanArgument {
/**
- * The metadata for the value to inject into the parameter.
+ * The Metadata for the value to inject into the argument.
*
* This is the <code>value</code> attribute.
*
- * @return the metadata for the value
+ * @return the Metadata for the value
*/
Metadata getValue();
/**
* The type to convert the value into when invoking the constructor or
- * factory method. If no explicit type was specified on the component
- * definition then this method returns null.
+ * factory method. If no explicit type was specified on the
+ * definition then this method returns <code>null</code>.
*
* This is the <code>type</code> attribute.
*
- * @return the explicitly specified type to convert the value into, or null
- * if no type was specified in the component definition.
+ * @return the explicitly specified type to convert the value into, or <code>null</code>
+ * if no type was specified in the definition.
*/
String getValueType();
/**
* The (zero-based) index into the parameter list of the method or
- * constructor to be invoked for this parameter. This is determined either
- * by explicitly specifying the index attribute in the component
+ * constructor to be invoked for this argument. This is determined either
+ * by explicitly specifying the <code>index</code> attribute in the component
* declaration. If not explicitly set, this will return -1.
*
* This is the <code>index</code> attribute.
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java Wed Jul 1 07:23:33 2009
@@ -18,9 +18,8 @@
import java.util.List;
/**
- * Metadata for a Bean Component.
+ * Metadata for a Bean Manager.
*
- * This class describes a <code>bean</code> element.
*/
public interface BeanMetadata extends Target, ComponentMetadata {
@@ -37,33 +36,33 @@
static final String SCOPE_PROTOTYPE = "prototype";
/**
- * The name of the class type specified for this component.
+ * The name of the class specified for this bean.
*
* This is the <code>class</code> attribute.
*
- * @return the name of the component class. If no class was specified in the
- * component definition (because the a factory component is used
- * instead) then this method will return null.
+ * @return the name of the bean class. If no class was specified in the
+ * definition (because the a factory component is used instead) then
+ * this method will return <code>null</code>.
*/
String getClassName();
/**
- * The name of the init method specified for this component, if any.
+ * The name of the init method specified for this bean, if any.
*
* This is the <code>init-method</code> attribute.
*
- * @return the method name of the specified init method, or null if no init
- * method was specified.
+ * @return the method name of the specified init method, or
+ * <code>null</code> if no init method was specified.
*/
String getInitMethod();
/**
- * The name of the destroy method specified for this component, if any.
+ * The name of the destroy method specified for this bean, if any.
*
* This is the <code>destroy-method</code> attribute.
*
- * @return the method name of the specified destroy method, or null if no
- * destroy method was specified.
+ * @return the method name of the specified destroy method, or
+ * <code>null</code> if no destroy method was specified.
*/
String getDestroyMethod();
@@ -73,19 +72,18 @@
* Specified in all the child
* <code>argument<code> elements. The return is a list of {@link BeanArgument} objects.
*
- * @return The Metadata for the factory method or constructor. Can be empty if no arguments are specified
+ * @return The arguments Metadata for the factory method or constructor, can be empty if no arguments are specified
*/
List<BeanArgument> getArguments();
/**
- * The property injection metadata for this component.
+ * The property injection Metadata for this component.
*
* Specified in all the child <code>property</code> elements.
*
- * @return an immutable collection of {@link BeanProperty}, with one entry
- * for each property to be injected. If no property injection was
- * specified for this component then an empty collection will be
- * returned.
+ * @return an immutable List of {@link BeanProperty}, with one entry for
+ * each property to be injected. If no property injection was
+ * specified for this bean then an empty List will be returned.
*
*/
List<BeanProperty> getProperties();
@@ -105,22 +103,25 @@
*
* The component is defined in the <code>factory-component</code>.
*
- * @return when a factory method and factory component has been specified
- * for this component, this operation returns the metadata
- * specifying the component on which the factory method is to be
- * invoked. When no factory component has been specified this
- * operation will return null. A return value of null with a
- * non-null factory method indicates that the factory method should
- * be invoked as a static method on the component class itself. For
- * a non-null return value, the Metadata object returned will be a
- * {@link Target} instance.
+ * When a factory method and factory ref has been specified for this
+ * component, this operation returns the Metadata specifying the manager on
+ * which component instance the factory method is to be invoked. When no
+ * factory component has been specified this operation will return
+ * <code>null</code>.
+ *
+ * A return value of <code>null with a <code>non-null</code> factory method indicates that the
+ * factory method should be invoked as a static method on the given
+ * class itself. For a <code>non-null</code> return value, the Metadata returned
+ * will be a {@link Target} instance.
+ *
+ * @return A {@link Target} or <code>null</code> if no factory component was specified.
*/
Target getFactoryComponent();
/**
- * The specified scope for the component lifecycle.
+ * The specified scope for the manager's lifecycle.
*
- * @return a String indicating the scope specified for the component.
+ * @return The scope specified for the component.
*
* @see #SCOPE_SINGLETON
* @see #SCOPE_PROTOTYPE
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanProperty.java Wed Jul 1 07:23:33 2009
@@ -17,12 +17,12 @@
/**
* Metadata describing a property to be injected. Properties are defined
- * following JavaBeans conventions.
+ * following Java Beans conventions.
*/
public interface BeanProperty {
/**
- * The name of the property to be injected, following JavaBeans conventions.
+ * The name of the property to be injected, following Java Beans conventions.
*
* Defined in the <code>name</code> attribute.
*
@@ -31,11 +31,11 @@
String getName();
/**
- * The metadata for the value to inject the property with.
+ * The Metadata for the value to inject the property with.
*
- * Defined in the <code>value</code> attribute or inlined component.
+ * Defined in the <code>value</code> attribute or in an inlined definition.
*
- * @return the metadata for the property value.
+ * @return the Metadata for the property value.
*/
Metadata getValue();
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/CollectionMetadata.java Wed Jul 1 07:23:33 2009
@@ -18,8 +18,9 @@
import java.util.List;
/**
- * Metadata for a collection based value. Members of the collection are instances of
- * Metadata. The Collection metadata can constrain to a specific type.
+ * Metadata for a collection based value. Members of the collection are
+ * instances of Metadata. This Metadata can constrain the members to a specific
+ * type.
*/
public interface CollectionMetadata extends NonNullMetadata {
@@ -27,28 +28,28 @@
/**
* Provide the interface that this collection must implement.
*
- * This is used for Arrays (Object[]), Set, and List. This information is
- * encoded in the element name.
+ * This is used for <code>Arrays (Object[])</code>, <code>Set</code>,
+ * and <code>List</code>. This information is encoded in the element
+ * name.
*
- *
- * @return The interface class that the collection must implement.
+ * @return The interface class that the collection must implement or
+ * <code>Object[]</code> for arrays.
*/
Class<?> getCollectionClass();
/**
- * The value-type specified for the array
+ * The value-type specified for the members of the collection or array.
*
* The <code>value-type</code> attribute.
*
- * @return The value type for this metadata
+ * @return The value type for this Collection Metadata
*/
String getValueType();
/**
- * The of Metadata objects that describe the value.
+ * The of Metadata that describe the actual Collection or array.
*
- * @return A list of {@link Metadata} objects for the values of a
- * collection.
+ * @return A list of Metadata for the values of a collection or array.
*/
List<Metadata> getValues();
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ComponentMetadata.java Wed Jul 1 07:23:33 2009
@@ -18,38 +18,39 @@
import java.util.List;
/**
- * Base class for all components.
+ * Base class for all managers.
*
* @see BeanMetadata
* @see ServiceReferenceMetadata
* @see ServiceMetadata
+ * @see Target
*/
public interface ComponentMetadata extends NonNullMetadata {
/**
- * The component will be eagerly activate
+ * The manager will be eagerly activate
*/
static final int ACTIVATION_EAGER = 1;
/**
- * The component will be lazily activated
+ * The manager will be lazily activated
*/
static final int ACTIVATION_LAZY = 2;
/**
- * The id of the component.
+ * The id of the manager.
*
- * @return component id. The component id can be <code>null</code> if this
- * is an anonymously defined inner component.
+ * @return manager id. The manager id can be <code>null</code> if this
+ * is an anonymously defined and/or inlined manager.
*/
String getId();
/**
- * How should this component be activated?
+ * Activation strategy for this manager.
*
* This is the <code>activation</code> attribute or the
* <code>default-activation</code> in the <code>blueprint</code> element
- * if not set.
+ * if not set. If this is also not set, it is {@link #ACTIVATION_EAGER}.
*
* @return the activation method
* @see #ACTIVATION_EAGER
@@ -58,11 +59,11 @@
int getActivation();
/**
- * The names of any components listed in a "depends-on" attribute for this
- * component.
+ * The id of any managers listed in a <code>depends-on</code> attribute for this
+ * manager.
*
- * @return an immutable List of component ids for components that we have
- * explicitly declared a dependency on, or an empty set if none.
+ * @return an immutable List of manager ids that are
+ * explicitly declared as a dependency, or an empty List if none.
*/
List<String> getDependsOn();
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/IdRefMetadata.java Wed Jul 1 07:23:33 2009
@@ -16,16 +16,16 @@
package org.osgi.service.blueprint.reflect;
/**
- * A value which represents the id of another component in the Blueprint Container.
- * The id itself will be injected, not the component that the id refers to.
+ * A value which represents the id of another manager in the Blueprint Container.
+ * The id itself will be injected, not the manager that the id refers to.
*
*/
public interface IdRefMetadata extends NonNullMetadata {
/**
- * The id of the referenced component. Defined in the
+ * The id of the referenced manager. Defined in the
* <code>component-id</code> attribute.
*
- * @return The referred component id.
+ * @return The referred manager id.
*/
String getComponentId();
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapEntry.java Wed Jul 1 07:23:33 2009
@@ -17,28 +17,29 @@
package org.osgi.service.blueprint.reflect;
/**
- * Metadata for an entry. An entry is the member of a MapMetadata so that it can
- * be treated as a CollectionMetadata with entries.
+ * Metadata for an entry. An entry is the member of a {@link MapMetadata} so that it can
+ * be treated as a {@link CollectionMetadata} with entries.
*
* Defined in the <code>entry</code> element.
*
*/
public interface MapEntry {
/**
- * Keys must be non-null.
+ * Keys must be <code>non-null</code>.
+ *
*
* Defined in the <code>key</code> attribute or element.
*
- * @return the metadata for the key
+ * @return the Metadata for the key
*/
NonNullMetadata getKey();
/**
- * Return the metadata for the value.
+ * Return the Metadata for the value.
*
* Defined in the <code>value</code> attribute or element<.
*
- * @return the metadata for the value
+ * @return the Metadata for the value
*/
Metadata getValue();
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/MapMetadata.java Wed Jul 1 07:23:33 2009
@@ -18,15 +18,14 @@
import java.util.List;
/**
- * A map-based value. This represented as a collection of entries (as it is done
- * in the schema).
+ * A Map-based value. This represented as a Collection of {@link MapEntry}.
*
- * A map is defined in the <code>map</code> element.
+ * A Map is defined in the <code>map</code> element.
*
*/
public interface MapMetadata extends NonNullMetadata {
/**
- * The key-type specified for map keys, or null if none given
+ * The key-type specified for map keys, or <code>null</code> if none given
*
* Defined in the <code>key-type</code> attribute.
*
@@ -35,7 +34,7 @@
String getKeyType();
/**
- * The value-type specified for the array
+ * The value-type specified for the value.
*
* The <code>value-type</code> attribute.
*
@@ -44,7 +43,7 @@
String getValueType();
/**
- * The of Metadata objects that describe the value.
+ * The Metadata that describe the value.
*
* @return A list of {@link MapEntry} objects describing the
* <code>Map<code> contents.
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Metadata.java Wed Jul 1 07:23:33 2009
@@ -16,7 +16,7 @@
package org.osgi.service.blueprint.reflect;
/**
- * Top level Metadata. This represents any possible value.
+ * Top level Metadata.
*
*/
public interface Metadata {
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NonNullMetadata.java Wed Jul 1 07:23:33 2009
@@ -16,9 +16,9 @@
package org.osgi.service.blueprint.reflect;
/**
- * Base interfaces for Metadata that cannot be null. The {@link NullMetadata} is
- * the only element not implementing this. Mainly used for keys in maps because
- * they cannot be <code>null</code>.
+ * Base interfaces for Metadata that cannot result in a <code>null</code>
+ * value. The {@link NullMetadata} is the only element not implementing this.
+ * Mainly used for keys in Maps because they cannot be <code>null</code>.
*/
public interface NonNullMetadata extends Metadata {
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/NullMetadata.java Wed Jul 1 07:23:33 2009
@@ -16,7 +16,7 @@
package org.osgi.service.blueprint.reflect;
/**
- * A value specified to be null via the <null/> element.
+ * A value specified to be <code>null</code> via the <null/> element.
*/
public interface NullMetadata extends Metadata {
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/PropsMetadata.java Wed Jul 1 07:23:33 2009
@@ -19,8 +19,7 @@
/**
* A <code>java.util.Properties</code> based value. The properties are
- * defined as string to string. This means that the actual value can be
- * returned.
+ * defined as string to string.
*
* Defined in the <code>props</code> element.
*
@@ -28,9 +27,9 @@
public interface PropsMetadata extends NonNullMetadata {
/**
- * Defined in <code>prop</code> elements for an Object Value.
+ * Defined in <code>prop</code> elements.
*
- * @return list of <code>MapEntry</code> objects, never <code>null</code>
+ * @return List of <code>MapEntry</code> objects, never <code>null</code>
*/
List<MapEntry> getEntries();
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RefMetadata.java Wed Jul 1 07:23:33 2009
@@ -16,11 +16,11 @@
package org.osgi.service.blueprint.reflect;
/**
- * A value which refers by its id to another component in the Blueprint Container.
+ * A value which refers by its id to another manager in the Blueprint Container.
*/
public interface RefMetadata extends Target, NonNullMetadata {
/**
- * The id of the referenced component. Defined in the
+ * The id of the referenced manager. Defined in the
* <code>component-id</code> attribute.
*
* @return The component id
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java Wed Jul 1 07:23:33 2009
@@ -16,19 +16,17 @@
package org.osgi.service.blueprint.reflect;
/**
- * Service reference that binds to a collection of matching services from the
- * OSGi service registry. This is the <code>reference-list</code> element.
- *
+ * A reference-list Metadata
*/
public interface ReferenceListMetadata extends ServiceReferenceMetadata {
/**
- * Use the service objects to compare or include in the collection
+ * The List member types must be the proxies to the service objects
*/
public static final int USE_SERVICE_OBJECT = 1;
/**
- * Use the service references to compare or include in the collection
+ * The List member types must be Service Reference objects
*/
public static final int USE_SERVICE_REFERENCE = 2;
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceListener.java Wed Jul 1 07:23:33 2009
@@ -16,25 +16,24 @@
package org.osgi.service.blueprint.reflect;
/**
- * Metadata for a listener interested in service bind and unbind events for a
+ * Metadata for a reference listener interested in the reference bind and unbind events for a
* service reference.
*/
public interface ReferenceListener {
/**
* The component instance that will receive bind and unbind events. The
- * returned value must reference a TargetListenerComponent either directly
- * or indirectly. The return type will be either a RefMetadata instance or
- * an TargetListenerComponent instance.
+ * returned value must reference a {@link Target} either directly
+ * or indirectly.
*
- * Defined in the <code>ref</code> attribute or inlined component.
+ * Defined in the <code>ref</code> attribute or via an inlined manager.
*
- * @return the listener component reference.
+ * @return the listener component instance Metadata.
*/
Target getListenerComponent();
/**
- * The name of the method to invoke on the listener component when a
+ * The name of the method to invoke on the reference listener when a
* matching service is bound to the reference
*
* @return the bind callback method name.
@@ -42,7 +41,7 @@
String getBindMethod();
/**
- * The name of the method to invoke on the listener component when a service
+ * The name of the method to invoke on the reference listener when a service
* is unbound from the reference.
*
* @return the unbind callback method name.
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ReferenceMetadata.java Wed Jul 1 07:23:33 2009
@@ -17,7 +17,7 @@
/**
*
- * Service reference that will bind to a single matching service in the service
+ * A reference that will bind to a single matching service in the service
* registry.
*
* Defines the <code>reference</code> element.
@@ -26,8 +26,8 @@
public interface ReferenceMetadata extends ServiceReferenceMetadata, Target {
/**
- * Timeout for service invocations when a matching backing service is
- * unavailable. Defined in the <code>timeout</code> attribute.
+ * Timeout for service invocations when a backing service is
+ * is unavailable. Defined in the <code>timeout</code> attribute.
*
* @return service invocation timeout in milliseconds
*/
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/RegistrationListener.java Wed Jul 1 07:23:33 2009
@@ -16,36 +16,38 @@
package org.osgi.service.blueprint.reflect;
/**
- * Metadata for a listener interested in service registration and unregistration
- * events for an exported service.
+ * Metadata for a registration listener interested in service registration and
+ * unregistration events.
*/
public interface RegistrationListener {
/**
* The component instance that will receive registration and unregistration
* events. The returned value must reference a {@link Target} either
- * directly or indirectly. The return type will be either a
- * {@link RefMetadata} instance or an {@link Target} instance.
+ * directly or indirectly. The return type will be a {@link Target}
+ * instance.
*
* Defined in the <code>registration-listener</code> child element.
*
- * @return the registration listener component reference.
+ * @return The registration listener target.
*/
Target getListenerComponent();
/**
- * The name of the method to invoke on the listener component when the
- * exported service is registered with the service registry.
+ * The name of the method to invoke on the registration listener when the
+ * associated service is registered with the service registry. This method
+ * is also be called with the initial state when the listener is actuated.
*
* Defined in the <code>registration-method</code> attribute.
*
- * @return the registration callback method name.
+ * @return The registration callback method name.
*/
String getRegistrationMethod();
/**
* The name of the method to invoke on the listener component when the
- * exported service is unregistered from the service registry.
+ * exported service is unregistered from the service registry. This method
+ * can also be called with the initial state when the listener is actuated.
*
* Defined in the <code>unregistration-method</code> attribute.
*
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java Wed Jul 1 07:23:33 2009
@@ -19,7 +19,7 @@
import java.util.List;
/**
- * Metadata representing a service to be exported by a Blueprint Container.
+ * Metadata representing a service to registered by the Blueprint Container.
*
*/
public interface ServiceMetadata extends ComponentMetadata {
@@ -32,15 +32,15 @@
public static final int AUTO_EXPORT_DISABLED = 1;
/**
- * Advertise all Java interfaces implemented by the exported component as
- * service interfaces.
+ * Advertise all Java interfaces implemented by the component instance type
+ * as service interfaces.
*
* @see #getAutoExport()
*/
public static final int AUTO_EXPORT_INTERFACES = 2;
/**
- * Advertise all Java classes in the hierarchy of the exported component's
+ * Advertise all Java classes in the hierarchy of the component instance
* type as service interfaces.
*
* @see #getAutoExport()
@@ -48,8 +48,8 @@
public static final int AUTO_EXPORT_CLASS_HIERARCHY = 3;
/**
- * Advertise all Java classes and interfaces in the exported component's
- * type as service interfaces.
+ * Advertise all Java classes and interfaces in the component instance type
+ * as service interfaces.
*
* @see #getAutoExport()
*/
@@ -57,24 +57,23 @@
/**
* The component that is to be exported as a service. Value must refer to a
- * component and therefore be either a {@link RefMetadata},
- * {@link BeanMetadata}, or {@link ReferenceMetadata}.
+ * component and therefore be a {@link Target}.
*
- * Defined in the <code>registration-method</code> attribute.
+ * Defined inline or via the <code>ref</code> attribute.
*
* @return the component to be exported as a service.
*/
Target getServiceComponent();
/**
- * The type names of the set of interface types that the service should be
- * advertised as supporting, as specified in the component declaration.
+ * The type names of the set of interfaces that the service should be
+ * advertised as supporting.
*
* Defined in the <code>interface</code> attribute or
* <code>interfaces</code> element.
*
- * @return an immutable set of (<code>String</code>) type names, or an
- * empty set if using auto-export
+ * @return an immutable set of (<code>String</code>) interface names, or an
+ * empty set if using <code>auto-export</code> or not set.
*/
List<String> getInterfaces();
@@ -95,8 +94,7 @@
*
* Defined in the <code>service-properties</code> element.
*
- * @return <code>Map</code> containing the set of user declared service
- * properties (may be empty if no properties were specified).
+ * @return <code>List</code> containing {@link MapEntry} objects, can be empty.
*/
List<MapEntry> getServiceProperties();
@@ -111,12 +109,12 @@
int getRanking();
/**
- * The listeners that have registered to be notified when the exported
+ * The registration listeners to be notified when the
* service is registered and unregistered with the framework.
*
* Defined in the <code>registration-listener</code> elements.
*
- * @return an immutable collection of RegistrationListenerMetadata
+ * @return an immutable collection of {@link RegistrationListener}
*/
Collection<RegistrationListener> getRegistrationListeners();
}
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java Wed Jul 1 07:23:33 2009
@@ -18,8 +18,7 @@
import java.util.*;
/**
- * Metadata describing a reference to a service that is to be imported into the
- * module context from the OSGi service registry.
+ * Metadata describing a reference to am OSGi service.
*
*/
public interface ServiceReferenceMetadata extends ComponentMetadata {
@@ -53,13 +52,13 @@
*
* Defined in the <code>interface</code> attribute.
*
- * @return the String name of the requested service interface
+ * @return the name of the requested service interface or <code>null</code> when no interface name is defined.
*/
String getInterface();
/**
* The value of the <code>component-name</code> attribute, if specified.
- * This specifies the name of a component that is registered in the service
+ * This specifies the id of a component that is registered in the service
* registry. This will create an automatic filter (appended with the filter
* if set) to select this component based on its automatic <code>id</code>
* attribute.
@@ -76,15 +75,14 @@
*
* Defined in the <code>filter</code> attribute.
*
- * @return filter expression
+ * @return An OSGi filter expression
*/
String getFilter();
/**
- * The set of listeners registered to receive bind and unbind events for
- * backing services.
+ * The set of registration listeners defined to receive bind and unbind events.
*
- * Defined in the <code>listener</code> elements.
+ * Defined in the <code>registration-listener</code> element.
*
* @return an immutable collection of {@link ReferenceListener} objects
*/
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/Target.java Wed Jul 1 07:23:33 2009
@@ -16,9 +16,9 @@
package org.osgi.service.blueprint.reflect;
/**
- * Provides a common interface for components that can be used as a direct
- * target for method calls. These are <code>bean</code>,
- * <code>reference</code>, and <code>ref</code>.
+ * Provides a common interface for managers that can be used as a direct target
+ * for method calls. These are <code>bean</code>, <code>reference</code>,
+ * and <code>ref</code>.
*
* @see BeanMetadata
* @see ReferenceMetadata
Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java (original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ValueMetadata.java Wed Jul 1 07:23:33 2009
@@ -17,26 +17,26 @@
/**
* A simple <code>String</code> value that will be type-converted if necessary
- * before injecting into a target.
+ * before injecting.
*
* This class is representing the <code>value</code> element.
*
*/
public interface ValueMetadata extends NonNullMetadata {
/**
- * The string value (unconverted) of this value).
+ * The string value (unconverted) of this value.
*
- * Defined in the <code>value</code> attribute or text part.
+ * Defined in the <code>value</code> attribute or text part of the <code>value</code> element.
*
* @return The content of the <code>value</code>
*/
String getStringValue();
/**
- * The name of the type to which this value should be coerced. May be null.
+ * The name of the type to which this value should be converted. May be <code>null</code>.
* Defined in the <code>type</code> attribute.
*
- * @return Optional type name for this value
+ * @return Optional class name for this value
*/
String getType();
}
Added: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html?rev=790051&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html (added)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/package.html Wed Jul 1 07:23:33 2009
@@ -0,0 +1,12 @@
+<!-- $Revision: 5654 $ -->
+<p>Blueprint Reflection Package Version 1.0.
+<p>Bundles wishing to use this package must list the package
+in the Import-Package header of the bundle's manifest.
+For example:
+<pre>
+Import-Package: org.osgi.service.blueprint.reflect; version="[1.0,2.0)"
+</pre>
+<p> This package provides a reflection-based view of the configuration information for a given
+ Blueprint Container.
+</p>
+
Added: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo?rev=790051&view=auto
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo (added)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/packageinfo Wed Jul 1 07:23:33 2009
@@ -0,0 +1 @@
+version 1.0
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java?rev=790051&r1=790050&r2=790051&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/ExtendedBlueprintContainer.java Wed Jul 1 07:23:33 2009
@@ -20,6 +20,7 @@
import org.apache.geronimo.blueprint.di.Repository;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.container.BlueprintListener;
import org.osgi.service.blueprint.container.Converter;
@@ -32,6 +33,8 @@
*/
public interface ExtendedBlueprintContainer extends BlueprintContainer {
+ BundleContext getBundleContext();
+
Bundle getExtenderBundle();
BlueprintListener getEventDispatcher();