OfflineMessage.java 1.11 KB
Newer Older
1 2 3 4 5
/**
 * $RCSfile$
 * $Revision: 2674 $
 * $Date: 2005-08-17 13:36:11 -0300 (Wed, 17 Aug 2005) $
 *
6
 * Copyright (C) 2007 Jive Software. All rights reserved.
7 8 9 10 11
 *
 * This software is published under the terms of the GNU Public License (GPL),
 * a copy of which is included in this distribution.
 */

12
package org.jivesoftware.openfire;
13 14

import org.dom4j.Element;
15
import org.xmpp.packet.Message;
16 17 18 19 20 21 22 23 24 25 26 27 28 29

import java.util.Date;

/**
 * Subclass of Message that keeps the date when the offline message was stored in the database.
 * The creation date and the user may be used as a unique identifier of the offline message.
 *
 * @author Gaston Dombiak
 */
public class OfflineMessage extends Message {

    private Date creationDate;

    public OfflineMessage(Date creationDate, Element element) {
30
        super(element, true);
31 32 33 34 35 36 37 38 39 40 41 42
        this.creationDate = creationDate;
    }

    /**
     * Returns the date when the offline message was stored in the database.
     *
     * @return the date the offline message was stored.
     */
    public Date getCreationDate() {
        return creationDate;
    }
}