diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-18 14:54:01 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-18 14:54:01 +0000 |
commit | 76c424d8d41248ba25f5e14400723f826a6e5fd0 (patch) | |
tree | 9a21153f230b8c2489773a735d8f1dafc166617c /java/sca/modules/sca-api/src/main | |
parent | 27e63932d20286ec3783ff23099e92b73bd78620 (diff) |
TUSCANY-2281 provide a api to allow service references to be retrieved for references where the multiplicity >1. Thanks to Daniel Stucky for the patch.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696666 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/sca-api/src/main')
-rw-r--r-- | java/sca/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/java/sca/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java b/java/sca/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java index 616d4c6338..044deeb632 100644 --- a/java/sca/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java +++ b/java/sca/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java @@ -18,6 +18,8 @@ */ package org.osoa.sca; +import java.util.Collection; + /** * Interface providing programmatic access to a component's SCA context as an alternative to injection. * It provides access to reference and property values for the component and provides a mechanism for @@ -106,4 +108,26 @@ public interface ComponentContext { * @return the SCA request context; may be null */ RequestContext getRequestContext(); + + + /* ******************** Contribution for issue TUSCANY-2281 ******************** */ + + /** + * Returns a Collection of typed service proxies for a business interface type and a reference name. + * @param businessInterface the interface that will be used to invoke the service + * @param referenceName the name of the reference + * @param <B> the Java type of the business interface for the reference + * @return a Collection of objects that implements the business interface + */ + <B> Collection<B> getServices(Class<B> businessInterface, String referenceName); + + + /** + * Returns a Collection of typed service reference for a business interface type and a reference name. + * @param businessInterface the interface that will be used to invoke the service + * @param referenceName the name of the reference + * @param <B> the Java type of the business interface for the reference + * @return a Collection of objects that implements the business interface + */ + <B> Collection<ServiceReference<B>> getServiceReferences(Class<B> businessInterface, String referenceName); } |