com.evermind.server.deployment
Interface ResourceProvider

All Known Implementing Classes:
ContextScanningResourceProvider

public interface ResourceProvider

Used to plug external resources (JMS implementations, DataSources, etc) into the server.


Method Summary
 ResourceInfo getDefaultResource(java.lang.String type)
          Get the default identifier for a specific resource type if any instance is provided of that type through this provider.
 java.lang.String getDescription()
          Returns a description of the provider or null if not specified.
 java.lang.String getDisplayName()
          Returns the display-friendly name of the provider.
 java.util.Set getHandledTypes()
          Returns a Set of handled resource types, or null if not specified (in which case the assumption is that all are handled).
 java.lang.String getName()
          Gets the name of this provider instance.
 EnvironmentPropertyDescription[] getPropertyDescriptions()
          Returns a list of valid properties for this provider or null if not specified.
 java.lang.Object getResource(java.lang.String name)
          Returns the actual resource for this name.
 java.util.Set getResources(java.lang.String type)
          Returns a Set of all available resources of this type in this provider.
 void init(java.util.Map properties)
          Initializes the provider with the specified properties, the Map contains the property names as keys and property values as values.
 void setName(java.lang.String name)
          Sets the name of this provider instance.
 

Method Detail

getDisplayName

java.lang.String getDisplayName()
Returns the display-friendly name of the provider.


getDescription

java.lang.String getDescription()
Returns a description of the provider or null if not specified.


getPropertyDescriptions

EnvironmentPropertyDescription[] getPropertyDescriptions()
Returns a list of valid properties for this provider or null if not specified.


init

void init(java.util.Map properties)
          throws java.lang.InstantiationException
Initializes the provider with the specified properties, the Map contains the property names as keys and property values as values.

Throws:
java.lang.InstantiationException

getHandledTypes

java.util.Set getHandledTypes()
Returns a Set of handled resource types, or null if not specified (in which case the assumption is that all are handled).


getDefaultResource

ResourceInfo getDefaultResource(java.lang.String type)
Get the default identifier for a specific resource type if any instance is provided of that type through this provider.


getResources

java.util.Set getResources(java.lang.String type)
Returns a Set of all available resources of this type in this provider. The Set elements are instances of the ResourceInfo class.


setName

void setName(java.lang.String name)
Sets the name of this provider instance.


getName

java.lang.String getName()
Gets the name of this provider instance.


getResource

java.lang.Object getResource(java.lang.String name)
                             throws java.lang.InstantiationException
Returns the actual resource for this name.

Throws:
java.lang.InstantiationException