james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <norman.mau...@googlemail.com>
Subject Re: great news
Date Sat, 23 Jul 2011 10:18:49 GMT
Hi,
comments inside again ;)


2011/7/23 Ioan Eugen Stan <stan.ieugen@gmail.com>:
> 2011/7/23 Norman Maurer <norman.maurer@googlemail.com>:
>> hi there,
>>
>> comments inside...
>
> Thanks Norman,
>
>>>
>>> 1. I have only access to the Message and Mailbox interfaces when
>>> saving/deleting messages?
>>
>> Sorry dont understand the question..
>
> I tried to cast Message to HBaseMessage, but when I ran
> HBaseMessageManagerTest it failed due to a ClassCast exception while
> trying to cast a SimpleMessage to HBaseMessage. So it seemed that I
> have to relay only on the interfaces. So I asked to make sure this was
> the case.

Yes you should better relay only on the interfaces or you can also
override the createMessage method in StoreMessageManager to return a
HBaseMessage.

See:
http://svn.apache.org/viewvc/james/mailbox/tags/apache-james-mailbox-0.3/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java?view=markup

    /**
     * Create a new {@link MailboxMembership} for the given data
     *
     * @param internalDate
     * @param size
     * @param bodyStartOctet
     * @param content
     * @param flags
     * @return membership
     * @throws MailboxException
     */
    protected Message<Id> createMessage(Date internalDate, final int
size, int bodyStartOctet,
            final SharedInputStream content, final Flags flags, final
PropertyBuilder propertyBuilder) throws MailboxException {
        return new SimpleMessage<Id>(internalDate, size,
bodyStartOctet, content, flags, propertyBuilder,
getMailboxEntity().getMailboxId());
    }

This is what JPAMessageManager does..

>
>>
>>> 4. What exactly are Properties from JPAMessage implementation and why
>>> is order important? Are they the header fields?
>>
>> its about extra infos that are needed for part fetches. The order is not
>> important, i think I changed the interface to not extend comperable
>> anymore..
>
> My main source for inspiration is JPA implementation. JPAProperties
> implementation keeps track of the order, but I think I will useorg.
> apache.james.mailbox.store.mail.model.impl.SimpleProperty
> instead of my own implementation.

make sense..

>
>>
>> bye
>> norman
>>
>
> Regards,
> --
> Ioan Eugen Stan
> http://ieugen.blogspot.com/

Bye,
Norman

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message