james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukáš Vlček <lukas.vl...@gmail.com>
Subject Re: Is MessageBuilder#parseMessage thread safe?
Date Thu, 15 Dec 2011 12:23:56 GMT
BTW,

what is recommended way of getting MessageBuilder?

MessageBuilder mb = new DefaultMessageBuilder();
or
MessageBuilder mb = MessagebuilderFactory.newInstance().newMessageBuilder();

Is there any difference in this? Especially, is MessageBuilder
preconfigured in some specific way?

Regards,
Lukas

On Thu, Dec 15, 2011 at 1:19 PM, Lukáš Vlček <lukas.vlcek@gmail.com> wrote:

> Thanks.
>
> Lukas
>
>
> On Thu, Dec 15, 2011 at 1:12 PM, Oleg Kalnichevski <olegk@apache.org>wrote:
>
>> On Thu, 2011-12-15 at 10:52 +0100, Lukáš Vlček wrote:
>> > Hi,
>> >
>> > is MessageBuilder#parseMessage thread safe?
>>
>> MessageBuilder interface is immutable and is expected to be state-less.
>> Therefore, it is also expected to be thread-safe. DefaultMessageBuilder
>> is conditionally thread-safe but it is also cheap, so it is perfectly ok
>> to create a new instance of it for each message.
>>
>> Oleg
>>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message