com.ibm.wsspi.resource

Interface ResourceFactory


  1. public interface ResourceFactory
Factory for resources accessible to applications. Implementations should be registered in the OSGi service registry with the CREATES_OBJECT_CLASS and "osgi.jndi.service.name" properties.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
CREATES_OBJECT_CLASS
The service registry property that specifies the String class (or String[] classes) that the factory supports creating.

Method Summary

Modifier and Type Method and Description
  1. java.lang.Object
createResource(ResourceInfo info)
Creates a resource handle of the specified type that respects the specified resource information.

Field Detail

CREATES_OBJECT_CLASS

  1. static 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:

Method Detail

createResource

  1. java.lang.Object createResource( ResourceInfo info)
  2. throws java.lang.Exception
Creates a resource handle of the specified type that respects the specified resource information. The ResourceInfo.getType() must match the CREATES_OBJECT_CLASS property.
Parameters:
info - the non-null resource information
Returns:
the resource handle
Throws:
java.lang.Exception - a resource-specific exception
See Also: