[
https://issues.apache.org/jira/browse/MIME4J-83?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Markus Wiederkehr updated MIME4J-83:
------------------------------------
Attachment: mime4j-storageprovider.patch
Updated patch for current trunk.
> Add a more generic machanism for storing message bodies
> -------------------------------------------------------
>
> Key: MIME4J-83
> URL: https://issues.apache.org/jira/browse/MIME4J-83
> Project: JAMES Mime4j
> Issue Type: New Feature
> Affects Versions: 0.5
> Reporter: Markus Wiederkehr
> Attachments: mime4j-storageprovider.patch
>
>
> Currently Mime4j uses TempStorage, TempPath and TempFile to store the
> contents of a text or binary body of a message. While this design allows for
> TempStorage to be replaced with a custom implementation it does not seem to
> be generic enough.
> A TempStorage implementation may choose to keep the data in memory but it
> still has to deal with things like file name prefixes/suffixes or creating
> subdirectories. The entire interface TempPath and many methods in TempFile
> seem to be unnecessary.
> Also while an application can configure what TempStorage instance it wants to
> use (by means of a system property and a static setInstance method) there is
> no way to inject a TempStorage instance into a MessageBuilder.
> An alternative storage mechanism should be simpler and more generic. It
> should be possible to provide implementations that store the data in memory
> or on disk in the system's temp folder for example. Other implementations
> could keep the data in memory as long as a certain threshold size does not
> get exceeded or use a specific folder on disk to store the files.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]