KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > smackx > MessageEventRequestListener


1 /**
2  * $RCSfile$
3  * $Revision: 2407 $
4  * $Date: 2004-11-02 20:37:00 -0300 (Tue, 02 Nov 2004) $
5  *
6  * Copyright 2003-2004 Jive Software.
7  *
8  * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */

20
21 package org.jivesoftware.smackx;
22
23 /**
24  *
25  * A listener that is fired anytime a message event request is received.
26  * Message event requests are received when the received message includes an extension
27  * like this:
28  *
29  * <pre>
30  * &lt;x xmlns='jabber:x:event'&gt;
31  * &lt;offline/&gt;
32  * &lt;delivered/&gt;
33  * &lt;composing/&gt;
34  * &lt;/x&gt;
35  * </pre>
36  *
37  * In this example you can see that the sender of the message requests to be notified
38  * when the user couldn't receive the message because he/she is offline, the message
39  * was delivered or when the receiver of the message is composing a reply.
40  *
41  * @author Gaston Dombiak
42  */

43 public interface MessageEventRequestListener {
44
45     /**
46      * Called when a request for message delivered notification is received.
47      *
48      * @param from the user that sent the notification.
49      * @param packetID the id of the message that was sent.
50      * @param messageEventManager the messageEventManager that fired the listener.
51      */

52     public void deliveredNotificationRequested(String JavaDoc from, String JavaDoc packetID,
53             MessageEventManager messageEventManager);
54
55     /**
56      * Called when a request for message displayed notification is received.
57      *
58      * @param from the user that sent the notification.
59      * @param packetID the id of the message that was sent.
60      * @param messageEventManager the messageEventManager that fired the listener.
61      */

62     public void displayedNotificationRequested(String JavaDoc from, String JavaDoc packetID,
63             MessageEventManager messageEventManager);
64
65     /**
66      * Called when a request that the receiver of the message is composing a reply notification is
67      * received.
68      *
69      * @param from the user that sent the notification.
70      * @param packetID the id of the message that was sent.
71      * @param messageEventManager the messageEventManager that fired the listener.
72      */

73     public void composingNotificationRequested(String JavaDoc from, String JavaDoc packetID,
74                 MessageEventManager messageEventManager);
75
76     /**
77      * Called when a request that the receiver of the message is offline is received.
78      *
79      * @param from the user that sent the notification.
80      * @param packetID the id of the message that was sent.
81      * @param messageEventManager the messageEventManager that fired the listener.
82      */

83     public void offlineNotificationRequested(String JavaDoc from, String JavaDoc packetID,
84             MessageEventManager messageEventManager);
85
86 }
87
Popular Tags