org.apache.tuscany.sca.api
Interface ComponentContextExtension

All Superinterfaces:
org.osoa.sca.ComponentContext
All Known Subinterfaces:
RuntimeComponentContext
All Known Implementing Classes:
ComponentContextImpl

public interface ComponentContextExtension
extends org.osoa.sca.ComponentContext

An extension of the OSOA ComponentContext that provides access to collections of references.


Method Summary
<B> java.util.Collection<org.osoa.sca.ServiceReference<B>>
getServiceReferences(java.lang.Class<B> businessInterface, java.lang.String referenceName)
          Returns a Collection of typed service reference for a business interface type and a reference name.
<B> java.util.Collection<B>
getServices(java.lang.Class<B> businessInterface, java.lang.String referenceName)
          Returns a Collection of typed service proxies for a business interface type and a reference name.
 
Methods inherited from interface org.osoa.sca.ComponentContext
cast, createSelfReference, createSelfReference, getProperty, getRequestContext, getService, getServiceReference, getURI
 

Method Detail

getServices

<B> java.util.Collection<B> getServices(java.lang.Class<B> businessInterface,
                                        java.lang.String referenceName)
Returns a Collection of typed service proxies for a business interface type and a reference name.

Type Parameters:
B - the Java type of the business interface for the reference
Parameters:
businessInterface - the interface that will be used to invoke the service
referenceName - the name of the reference
Returns:
a Collection of objects that implements the business interface

getServiceReferences

<B> java.util.Collection<org.osoa.sca.ServiceReference<B>> getServiceReferences(java.lang.Class<B> businessInterface,
                                                                                java.lang.String referenceName)
Returns a Collection of typed service reference for a business interface type and a reference name.

Type Parameters:
B - the Java type of the business interface for the reference
Parameters:
businessInterface - the interface that will be used to invoke the service
referenceName - the name of the reference
Returns:
a Collection of objects that implements the business interface