aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactQueryEvent.java
blob: 44c143cac35675d758ded263c35e06a7de3fbe39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.gui.main.contactlist.contactsource;

import java.util.*;

import net.java.sip.communicator.service.contactlist.*;

/**
 * The <tt>MetaContactQueryEvent</tt> is triggered each time a
 * <tt>MetaContact</tt> is received as a result of a <tt>MetaContactQuery</tt>.
 *
 * @author Yana Stamcheva
 */
public class MetaContactQueryEvent
    extends EventObject
{
    /**
     * The <tt>MetaContact</tt> this event is about.
     */
    private final MetaContact metaContact;

    /**
     * Creates an instance of <tt>MetaGroupQueryEvent</tt> by specifying the 
     * <tt>source</tt> query this event comes from and the <tt>metaContact</tt>
     * this event is about.
     *
     * @param source the <tt>MetaContactQuery</tt> that triggered this event
     * @param metaContact the <tt>MetaContact</tt> this event is about
     */
    public MetaContactQueryEvent(   MetaContactQuery source,
                                    MetaContact metaContact)
    {
        super(source);
        this.metaContact = metaContact;
    }

    /**
     * Returns the <tt>MetaContactQuery</tt> that triggered this event.
     * @return the <tt>MetaContactQuery</tt> that triggered this event
     */
    public MetaContactQuery getQuerySource()
    {
        return (MetaContactQuery) source;
    }

    /**
     * Returns the <tt>MetaContact</tt> this event is about.
     * @return the <tt>MetaContact</tt> this event is about
     */
    public MetaContact getMetaContact()
    {
        return metaContact;
    }
}