| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tuscany.sca.implementation.java.injection.ResourceObjectFactory<T>
public class ResourceObjectFactory<T>
Resolves a runtime resource to be injected on a field or method of a Java component type marked with Resource. If the mapped name of the resource is an absolute URI such as
 sca://localhost or jndi://localhost the host container namespace is searched; otherwise the
 URI is assumed to be relative and the parent composite is searched. If a mapped name is not provided, i.e. resolution
 is by type, the parent composite is first searched followed by the host namespace.
| Constructor Summary | |
|---|---|
ResourceObjectFactory(java.lang.Class<T> type,
                      boolean optional,
                      ResourceHost host)
Instantiates a factory that resolves resources by type  | 
|
ResourceObjectFactory(java.lang.Class<T> type,
                      java.lang.String mappedName,
                      boolean optional,
                      ResourceHost host)
Instantiates a factory that resolves resources by mapped name  | 
|
| Method Summary | |
|---|---|
 T | 
getInstance()
Return a instance of the type that this factory creates.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ResourceObjectFactory(java.lang.Class<T> type,
                             boolean optional,
                             ResourceHost host)
type - the type of the resource to injectoptional - true if an error should be thrown if the resource is not foundhost - the runtime resource provider
public ResourceObjectFactory(java.lang.Class<T> type,
                             java.lang.String mappedName,
                             boolean optional,
                             ResourceHost host)
type - the type of the resource to injectmappedName - the resource nameoptional - true if an error should be thrown if the resource is not foundhost - the runtime resource provider| Method Detail | 
|---|
public T getInstance()
              throws ObjectCreationException
ObjectFactory
getInstance in interface ObjectFactory<T>ObjectCreationException
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||