Package org.daisy.dotify.api.writer
Interface PagedMediaWriterFactoryMakerService
-
- All Known Implementing Classes:
PagedMediaWriterFactoryMaker
public interface PagedMediaWriterFactoryMakerService
Provides an interface for a PagedMediaWriterFactoryMaker service. The purpose of this interface is to expose an implementation of a PagedMediaWriterFactoryMaker as an OSGi service.
To comply with this interface, an implementation must be thread safe and address both the possibility that only a single instance is created and used throughout and that new instances are created as desired.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PagedMediaWriterFactory
getFactory(String mediaType)
Gets a PagedMediaWriterFactory that supports the specified media type.Collection<String>
listMediaTypes()
Returns a list of supported Internet media types.PagedMediaWriter
newPagedMediaWriter(String mediaType)
Creates a new PagedMediaWriter.
-
-
-
Method Detail
-
getFactory
PagedMediaWriterFactory getFactory(String mediaType) throws PagedMediaWriterConfigurationException
Gets a PagedMediaWriterFactory that supports the specified media type.- Parameters:
mediaType
- the target Internet media type- Returns:
- returns a integer2text factory for the specified media type
- Throws:
PagedMediaWriterConfigurationException
- if the media type is not supported
-
newPagedMediaWriter
PagedMediaWriter newPagedMediaWriter(String mediaType) throws PagedMediaWriterConfigurationException
Creates a new PagedMediaWriter. This is a convenience method for getFactory(target).newPagedMediaWriter(target). Using this method excludes the possibility of setting features of the PagedMediaWriter factory.- Parameters:
mediaType
- the target Internet media type- Returns:
- returns a new PagedMediaWriter
- Throws:
PagedMediaWriterConfigurationException
- if the media type is not supported
-
listMediaTypes
Collection<String> listMediaTypes()
Returns a list of supported Internet media types.- Returns:
- returns a list of media types
-
-