On Mon, 2011-07-18 at 13:08 +0200, Stefano Bagnara wrote:
> Hi all,
>
> I updated jDKIM and it worked fine. I'm also trying to update another
> local project I have depending on mime4j trunk and I'm a bit lost
> about using a custom DecodeMonitor via dom.
> Here is the code I'm updating...
> ----
> factory = MessageServiceFactory.newInstance();
> factory.setAttribute("StorageProvider", new MemoryStorageProvider());
> factory.setAttribute("MimeEntityConfig", mimeEntityConfig);
> MessageBuilder builder = factory.newMessageBuilder();
> builder.setDecodeMonitor(new CheckHandlerDecodeMonitor(eh));
> Message message = builder.parseMessage(is);
> -----
>
> setDecodeMonitor is not anymore exposed by the interface. I thought we
> discussed this very thing in past but I run some search with no
> success (so probably my memory is leaking).
> Is this feature exposed in a different way that I can't currently find?
> Or otherwise, how can we expose it again?
> - one more possibile attribute in the factory?
That'd be my preferred choice.
> - adding parseMessage(InputStream,DecodeMonitor) and
> parseHeader(InputStream,DecodeMonitor) methods to the MessageBuilder?
> - simply publishing the setDecodeMonitor from MessageBuilderImpl to
> MessageBuilder?
Setter methods in an interface that essentially represents a strategy
does not sound right to me.
Oleg