Milyn-Commons Version 0.6

org.milyn.resource
Interface ContainerResourceLocator

All Superinterfaces:
ExternalResourceLocator
All Known Implementing Classes:
ServletResourceLocator

public interface ContainerResourceLocator
extends ExternalResourceLocator

Interface for locating stream resources from the container..

Author:
tfennelly

Method Summary
 java.io.InputStream getResource(java.lang.String configName, java.lang.String defaultUri)
          Get the resource specified by the container 'config' value.
 
Methods inherited from interface org.milyn.resource.ExternalResourceLocator
getResource
 

Method Detail

getResource

public java.io.InputStream getResource(java.lang.String configName,
                                       java.lang.String defaultUri)
                                throws java.lang.IllegalArgumentException,
                                       java.io.IOException
Get the resource specified by the container 'config' value.

If the config value isn't specified, uses the defaultLocation.

Parameters:
configName - The container configuration entry name whose value specifies the location of the resource.
defaultUri - The default location for the resource.
Returns:
The InputStream associated with resource.
Throws:
java.lang.IllegalArgumentException - Illegal argument. Check the cause exception for more information.
java.io.IOException - Unable to get the resource stream.

Milyn-Commons Version 0.6