From 04ef75e0a7e0e5928a90ca53a686665c2c634573 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 29 Sep 2008 00:55:58 +0000 Subject: Pulled from trunk. 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@699935 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/osoa/sca/ComponentContext.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'branches/sca-equinox/modules/sca-api/src/main/java') diff --git a/branches/sca-equinox/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java b/branches/sca-equinox/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java index 616d4c6338..044deeb632 100644 --- a/branches/sca-equinox/modules/sca-api/src/main/java/org/osoa/sca/ComponentContext.java +++ b/branches/sca-equinox/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 the Java type of the business interface for the reference + * @return a Collection of objects that implements the business interface + */ + Collection getServices(Class 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 the Java type of the business interface for the reference + * @return a Collection of objects that implements the business interface + */ + Collection> getServiceReferences(Class businessInterface, String referenceName); } -- cgit v1.2.3