KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > smackx > muc > ParticipantStatusListener


1 /**
2  * $RCSfile$
3  * $Revision: 2438 $
4  * $Date: 2004-12-26 18:59:59 -0300 (Sun, 26 Dec 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.muc;
22
23 /**
24  * A listener that is fired anytime a participant's status in a room is changed, such as the
25  * user being kicked, banned, or granted admin permissions.
26  *
27  * @author Gaston Dombiak
28  */

29 public interface ParticipantStatusListener {
30
31     /**
32      * Called when a new room occupant has joined the room. Note: Take in consideration that when
33      * you join a room you will receive the list of current occupants in the room. This message will
34      * be sent for each occupant.
35      *
36      * @param participant the participant that has just joined the room
37      * (e.g. room@conference.jabber.org/nick).
38      */

39     public abstract void joined(String JavaDoc participant);
40
41     /**
42      * Called when a room occupant has left the room on its own. This means that the occupant was
43      * neither kicked nor banned from the room.
44      *
45      * @param participant the participant that has left the room on its own.
46      * (e.g. room@conference.jabber.org/nick).
47      */

48     public abstract void left(String JavaDoc participant);
49
50     /**
51      * Called when a room participant has been kicked from the room. This means that the kicked
52      * participant is no longer participating in the room.
53      *
54      * @param participant the participant that was kicked from the room
55      * (e.g. room@conference.jabber.org/nick).
56      */

57     public abstract void kicked(String JavaDoc participant);
58
59     /**
60      * Called when a moderator grants voice to a visitor. This means that the visitor
61      * can now participate in the moderated room sending messages to all occupants.
62      *
63      * @param participant the participant that was granted voice in the room
64      * (e.g. room@conference.jabber.org/nick).
65      */

66     public abstract void voiceGranted(String JavaDoc participant);
67
68     /**
69      * Called when a moderator revokes voice from a participant. This means that the participant
70      * in the room was able to speak and now is a visitor that can't send messages to the room
71      * occupants.
72      *
73      * @param participant the participant that was revoked voice from the room
74      * (e.g. room@conference.jabber.org/nick).
75      */

76     public abstract void voiceRevoked(String JavaDoc participant);
77
78     /**
79      * Called when an administrator or owner banned a participant from the room. This means that
80      * banned participant will no longer be able to join the room unless the ban has been removed.
81      *
82      * @param participant the participant that was banned from the room
83      * (e.g. room@conference.jabber.org/nick).
84      */

85     public abstract void banned(String JavaDoc participant);
86
87     /**
88      * Called when an administrator grants a user membership to the room. This means that the user
89      * will be able to join the members-only room.
90      *
91      * @param participant the participant that was granted membership in the room
92      * (e.g. room@conference.jabber.org/nick).
93      */

94     public abstract void membershipGranted(String JavaDoc participant);
95
96     /**
97      * Called when an administrator revokes a user membership to the room. This means that the
98      * user will not be able to join the members-only room.
99      *
100      * @param participant the participant that was revoked membership from the room
101      * (e.g. room@conference.jabber.org/nick).
102      */

103     public abstract void membershipRevoked(String JavaDoc participant);
104
105     /**
106      * Called when an administrator grants moderator privileges to a user. This means that the user
107      * will be able to kick users, grant and revoke voice, invite other users, modify room's
108      * subject plus all the partcipants privileges.
109      *
110      * @param participant the participant that was granted moderator privileges in the room
111      * (e.g. room@conference.jabber.org/nick).
112      */

113     public abstract void moderatorGranted(String JavaDoc participant);
114
115     /**
116      * Called when an administrator revokes moderator privileges from a user. This means that the
117      * user will no longer be able to kick users, grant and revoke voice, invite other users,
118      * modify room's subject plus all the partcipants privileges.
119      *
120      * @param participant the participant that was revoked moderator privileges in the room
121      * (e.g. room@conference.jabber.org/nick).
122      */

123     public abstract void moderatorRevoked(String JavaDoc participant);
124
125     /**
126      * Called when an owner grants a user ownership on the room. This means that the user
127      * will be able to change defining room features as well as perform all administrative
128      * functions.
129      *
130      * @param participant the participant that was granted ownership on the room
131      * (e.g. room@conference.jabber.org/nick).
132      */

133     public abstract void ownershipGranted(String JavaDoc participant);
134
135     /**
136      * Called when an owner revokes a user ownership on the room. This means that the user
137      * will no longer be able to change defining room features as well as perform all
138      * administrative functions.
139      *
140      * @param participant the participant that was revoked ownership on the room
141      * (e.g. room@conference.jabber.org/nick).
142      */

143     public abstract void ownershipRevoked(String JavaDoc participant);
144
145     /**
146      * Called when an owner grants administrator privileges to a user. This means that the user
147      * will be able to perform administrative functions such as banning users and edit moderator
148      * list.
149      *
150      * @param participant the participant that was granted administrator privileges
151      * (e.g. room@conference.jabber.org/nick).
152      */

153     public abstract void adminGranted(String JavaDoc participant);
154
155     /**
156      * Called when an owner revokes administrator privileges from a user. This means that the user
157      * will no longer be able to perform administrative functions such as banning users and edit
158      * moderator list.
159      *
160      * @param participant the participant that was revoked administrator privileges
161      * (e.g. room@conference.jabber.org/nick).
162      */

163     public abstract void adminRevoked(String JavaDoc participant);
164
165     /**
166      * Called when a participant changed his/her nickname in the room. The new participant's
167      * nickname will be informed with the next available presence.
168      *
169      * @param nickname the old nickname that the participant decided to change.
170      */

171     public abstract void nicknameChanged(String JavaDoc nickname);
172
173 }
174
Popular Tags