/*
 * @(#)ImapMessageReceivedEvent.java
 *
 * Copyright (c) 2001-2002 JScape
 * 1147 S. 53rd Pl., Mesa, Arizona, 85206, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JScape. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JScape.
 */
package com.jscape.inet.imap;

import com.jscape.inet.email.EmailMessage;

import java.util.EventObject;


/**
 * Fired after retrieving a message from the IMAP server.
 */
public class ImapMessageEvent
        extends EventObject {
    private EmailMessage message;

    /**
     * Creates ImapMessageEvent.
     *
     * @param source  the source of the event
     * @param message the <code>EmailMessage</code> retrieved
     *
     * @see EmailMessage
     */
    public ImapMessageEvent(Object source, EmailMessage message) {
        super(source);
        this.message = message;
    }

    /**
     * Gets <code>EmailMessage</code> retrieved.
     *
     * @return the <code>EmailMessage</code> retrieved
     *
     * @see EmailMessage
     */
    public EmailMessage getMessage() {
        return message;
    }
}
