public class ConfiguredContentTypeProvider extends ContentTypeProviderImpl
Note that the content type character set will be derived from
AdaptrisMessage.getCharEncoding()
so configuring a mime type of text/xml
when the
message has a char encoding of UTF-8
will return text/xml; charset=UTF-8
In the adapter configuration file this class is aliased as http-configured-content-type-provider which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
ConfiguredContentTypeProvider() |
ConfiguredContentTypeProvider(java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType(AdaptrisMessage msg)
Get the content type.
|
java.lang.String |
getMimeType() |
void |
setMimeType(java.lang.String type)
Set the base content type.
|
build
public ConfiguredContentTypeProvider()
public ConfiguredContentTypeProvider(java.lang.String type)
public java.lang.String getContentType(AdaptrisMessage msg) throws CoreException
ContentTypeProvider
msg
- the Adaptris MessageCoreException
- wrapping other exceptionspublic java.lang.String getMimeType()
public void setMimeType(java.lang.String type)
type
- the base content type; defaults to text/plain