Package com.ibm.wsspi.resource
Interface ResourceFactory
- 
 public interface ResourceFactoryFactory for resources accessible to applications. Implementations should be registered in the OSGi service registry with theJNDI_NAMEandCREATES_OBJECT_CLASSproperties.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringCREATES_OBJECT_CLASSThe service registry property that specifies the String class (or String[] classes) that the factory supports creating.static java.lang.StringJNDI_NAMEThe service registry property that specifies the JNDI lookup name of the factory.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectcreateResource(ResourceInfo info)Creates a resource handle of the specified type that respects the specified resource information.
 
- 
- 
- 
Field Detail- 
JNDI_NAMEstatic final java.lang.String JNDI_NAME The service registry property that specifies the JNDI lookup name of the factory.- See Also:
- Constant Field Values
 
 - 
CREATES_OBJECT_CLASSstatic final java.lang.String CREATES_OBJECT_CLASS The service registry property that specifies the String class (or String[] classes) that the factory supports creating.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
createResourcejava.lang.Object createResource(ResourceInfo info) throws java.lang.Exception Creates a resource handle of the specified type that respects the specified resource information. TheResourceInfo.getType()must match theCREATES_OBJECT_CLASSproperty. If the caller does not provide resource information, the implementation can useResourceConfigFactory.createResourceConfig(java.lang.String)to create a default.- Parameters:
- info- the resource information, or null if unavailable
- Returns:
- the resource handle
- Throws:
- java.lang.Exception- a resource-specific exception
- See Also:
- ResourceConfigFactory.createResourceConfig(java.lang.String)
 
 
- 
 
-