org.freecompany.brimstone.core
Interface ResolverService.I2R
- All Superinterfaces:
- ResolverService
- All Known Subinterfaces:
- Resolver
- All Known Implementing Classes:
- DefaultResolver
- Enclosing interface:
- ResolverService
public static interface ResolverService.I2R
- extends ResolverService
Method Summary |
java.lang.Object |
getResource(java.net.URI uri)
Retrieve the resource identified by the URI, in its default format. |
|
getResource(java.net.URI uri,
java.lang.Class<T> cl)
Retrieve the resource identified by the URI, in a specified format. |
getResource
java.lang.Object getResource(java.net.URI uri)
throws URIResolutionException
- Retrieve the resource identified by the URI, in its default format.
It's up to the implementation to decide the format in which the resource is returned.
Most implementations will return an InputStream with the content of the resource.
- Parameters:
uri
- the URI to retrieve.
- Returns:
- the resource identified by the URI.
- Throws:
NoSuchURIException
- if the URI is definitively known not to represent a resource.
URIGoneException
- if the URI existed in the past but nothing is currently known about it.
URINotFoundException
- URI exists but there is no available output from this operation.
URIResolutionException
- If another problem prevents resolution of the URI.
getResource
<T> T getResource(java.net.URI uri,
java.lang.Class<T> cl)
throws URIResolutionException
- Retrieve the resource identified by the URI, in a specified format.
If the service cannot provide the resource as an instance of the requested class, it should return null.
- Parameters:
uri
- the URI to retrieve.cl
- a Class indicating the type of resource expected.
- Returns:
- the resource identified by the URI.
- Throws:
NoSuchURIException
- if the URI is definitively known not to represent a resource.
URIGoneException
- if the URI existed in the past but nothing is currently known about it.
URINotFoundException
- URI exists but there is no available output from this operation.
URIResolutionException
- If another problem prevents resolution of the URI.