org.milyn.resource
Interface ContainerResourceLocator

All Superinterfaces:
ExternalResourceLocator
All Known Implementing Classes:
ClasspathResourceLocator, ServletResourceLocator, URIResourceLocator

public interface ContainerResourceLocator
extends ExternalResourceLocator

Interface for locating stream resources from the container..

Author:
tfennelly

Method Summary
 URI getBaseURI()
          Get the base URI for the locator instance.
 InputStream getResource(String configName, String defaultUri)
          Get the resource specified by the container 'config' value.
 
Methods inherited from interface org.milyn.resource.ExternalResourceLocator
getResource
 

Method Detail

getResource

InputStream getResource(String configName,
                        String defaultUri)
                        throws IllegalArgumentException,
                               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:
IllegalArgumentException - Illegal argument. Check the cause exception for more information.
IOException - Unable to get the resource stream.

getBaseURI

URI getBaseURI()
Get the base URI for the locator instance.

Returns:
The base URI for the locator instance.


Copyright © 2018. All rights reserved.