public class DefaultDataContentHandlerFactory extends Object implements DataContentHandlerFactory
Modifier and Type | Method and Description |
---|---|
DataContentHandler |
createDataContentHandler(String contentType) |
String |
getContentType(Class clazz) |
DataContentHandler |
getDataContentHandler(Class clazz) |
static DefaultDataContentHandlerFactory |
getInstance() |
void |
register(DataContentHandler handler)
Registers a
DataContentHandler for use with certain mime types. |
void |
register(String contentType,
Class clazz,
DataContentHandler handler)
Register a DataContentHandler for a particular MIME type.
|
public static DefaultDataContentHandlerFactory getInstance()
public DataContentHandler createDataContentHandler(String contentType)
createDataContentHandler
in interface DataContentHandlerFactory
public DataContentHandler getDataContentHandler(Class clazz)
public void register(String contentType, Class clazz, DataContentHandler handler)
contentType
- The Content Type.handler
- The DataContentHandler.public void register(DataContentHandler handler)
DataContentHandler
for use with certain mime types. To use this registration
method the DataHandler has to be implmented correctly. This method uses the DataFalvour of the
DataHandler to obtain the mimeType and DefaultRepresentation class. If there is more than one DataFlavour
on the DataHandler, then each flavour will be registered seperately.handler
- Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.