Package com.sodius.mdw.server.storage
Interface ContentProducer
-
- All Known Subinterfaces:
Storage
- All Known Implementing Classes:
NodeContentProducer
public interface ContentProducer
Provides access to a content. Developers are advised to subclass theAbstractStructureProvider
base implementation.Clients may implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStream
getContents(Map<?,?> options)
Returns the underlying content as a stream.
-
-
-
Method Detail
-
getContents
InputStream getContents(Map<?,?> options) throws IOException, UnsupportedOperationException
Returns the underlying content as a stream.The options configures the content to retrieve. Options can typically contain a
"Content-Type"
property to request data in a specific format.- Parameters:
options
- properties describing the content to retrieve.- Returns:
- the underlying content as a stream.
- Throws:
IOException
- if the content cannot be read.UnsupportedOperationException
- if the content cannot be read for the specified options. This can typically happen if a specificContent-Type
is requested and the producer does not support such format.
-
-