KickJava   Java API By Example, From Geeks To Geeks.

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


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.muc;
22
23 /**
24  * A listener that is fired anytime your 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 UserStatusListener {
30
31     /**
32      * Called when a moderator kicked your user from the room. This means that you are no longer
33      * participanting in the room.
34      *
35      * @param actor the moderator that kicked your user from the room (e.g. user@host.org).
36      * @param reason the reason provided by the actor to kick you from the room.
37      */

38     public abstract void kicked(String JavaDoc actor, String JavaDoc reason);
39
40     /**
41      * Called when a moderator grants voice to your user. This means that you were a visitor in
42      * the moderated room before and now you can participate in the room by sending messages to
43      * all occupants.
44      *
45      */

46     public abstract void voiceGranted();
47
48     /**
49      * Called when a moderator revokes voice from your user. This means that you were a
50      * participant in the room able to speak and now you are a visitor that can't send
51      * messages to the room occupants.
52      *
53      */

54     public abstract void voiceRevoked();
55
56     /**
57      * Called when an administrator or owner banned your user from the room. This means that you
58      * will no longer be able to join the room unless the ban has been removed.
59      *
60      * @param actor the administrator that banned your user (e.g. user@host.org).
61      * @param reason the reason provided by the administrator to banned you.
62      */

63     public abstract void banned(String JavaDoc actor, String JavaDoc reason);
64
65     /**
66      * Called when an administrator grants your user membership to the room. This means that you
67      * will be able to join the members-only room.
68      *
69      */

70     public abstract void membershipGranted();
71
72     /**
73      * Called when an administrator revokes your user membership to the room. This means that you
74      * will not be able to join the members-only room.
75      *
76      */

77     public abstract void membershipRevoked();
78
79     /**
80      * Called when an administrator grants moderator privileges to your user. This means that you
81      * will be able to kick users, grant and revoke voice, invite other users, modify room's
82      * subject plus all the partcipants privileges.
83      *
84      */

85     public abstract void moderatorGranted();
86
87     /**
88      * Called when an administrator revokes moderator privileges from your user. This means that
89      * you will no longer be able to kick users, grant and revoke voice, invite other users,
90      * modify room's subject plus all the partcipants privileges.
91      *
92      */

93     public abstract void moderatorRevoked();
94
95     /**
96      * Called when an owner grants to your user ownership on the room. This means that you
97      * will be able to change defining room features as well as perform all administrative
98      * functions.
99      *
100      */

101     public abstract void ownershipGranted();
102
103     /**
104      * Called when an owner revokes from your user ownership on the room. This means that you
105      * will no longer be able to change defining room features as well as perform all
106      * administrative functions.
107      *
108      */

109     public abstract void ownershipRevoked();
110
111     /**
112      * Called when an owner grants administrator privileges to your user. This means that you
113      * will be able to perform administrative functions such as banning users and edit moderator
114      * list.
115      *
116      */

117     public abstract void adminGranted();
118
119     /**
120      * Called when an owner revokes administrator privileges from your user. This means that you
121      * will no longer be able to perform administrative functions such as banning users and edit
122      * moderator list.
123      *
124      */

125     public abstract void adminRevoked();
126
127 }
128
Popular Tags