Home | History | Annotate | Download | only in muc

Lines Matching refs:room

70  * room. A room could have many occupants with different affiliation and roles.
87 private String room;
148 * Creates a new multi user chat with the specified connection and room name. Note: no
150 * {@link #join(String) join} the chat room. On some server implementations,
151 * the room will not be created until the first person joins it.<p>
154 * for the XMPP server example.com). You must ensure that the room address you're
158 * @param room the name of the room in the form "roomName@service", where
162 public MultiUserChat(Connection connection, String room) {
164 this.room = room.toLowerCase();
189 * The Iterator will contain Strings where each String represents a room
190 * (e.g. room@muc.jabber.org).
200 // Return an iterator on an empty collection (i.e. the user never joined a room)
206 * contain Strings where each String represents a room (e.g. room@muc.jabber.org).
232 * Returns the discovered information of a given room without actually having to join the room.
235 * @param connection the XMPP connection to use for discovering information about the room.
236 * @param room the name of the room in the form "roomName@service" of which we want to discover
238 * @return the discovered information of a given room without actually having to join the room.
239 * @throws XMPPException if an error occured while trying to discover information of a room.
241 public static RoomInfo getRoomInfo(Connection connection, String room)
243 DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(room);
275 * Returns a collection of HostedRooms where each HostedRoom has the XMPP address of the room
276 * and the room's name. Once discovered the rooms hosted by a chat service it is possible to
277 * discover more detailed room information or join the room.
296 * Returns the name of the room this MultiUserChat object represents.
298 * @return the multi user chat room name.
301 return room;
305 * Creates the room according to some default configuration, assign the requesting user
306 * as the room owner, and add the owner to the room but not allow anyone else to enter
307 * the room (effectively "locking" the room). The requesting user will join the room
308 * under the specified nickname as soon as the room has been created.<p>
310 * To create an "Instant Room", that means a room with some default configuration that is
311 * available for immediate access, the room's owner should send an empty form after creating
312 * the room. {@link #sendConfigurationForm(Form)}<p>
314 * To create a "Reserved Room", that means a room manually configured by the room creator
315 * before anyone is allowed to enter, the room's owner should complete and send a form after
316 * creating the room. Once the completed configutation form is sent to the server, the server
317 * will unlock the room. {@link #sendConfigurationForm(Form)}
320 * @throws XMPPException if the room couldn't be created for some reason
321 * (e.g. room already exists; user already joined to an existant room or
322 * 405 error if the user is not allowed to create the room)
328 // If we've already joined the room, leave it before joining under a new
331 throw new IllegalStateException("Creation failed - User already joined the room.");
333 // We create a room by sending a presence packet to room@service/nick
334 // and signal support for MUC. The owner will be automatically logged into the room.
336 joinPresence.setTo(room + "/" + nickname);
347 room + "/" + nickname),
364 // Whether the room existed before or was created, the user has joined the room
369 // Look for confirmation of room creation from the server
373 // Room was created and the user has joined the room
377 // We need to leave the room since it seems that the room already existed
379 throw new XMPPException("Creation failed - Missing acknowledge of room creation.");
383 * Joins the chat room using the specified nickname. If already joined
384 * using another nickname, this method will first leave the room and then
387 * joining the room, the room will decide the amount of history to send.
390 * @throws XMPPException if an error occurs joining the room. In particular, a
393 * 404 error can occur if the room does not exist or is locked; or a
402 * Joins the chat room using the specified nickname and password. If already joined
403 * using another nickname, this method will first leave the room and then
406 * joining the room, the room will decide the amount of history to send.<p>
408 * A password is required when joining password protected rooms. If the room does
413 * @throws XMPPException if an error occurs joining the room. In particular, a
416 * 404 error can occur if the room does not exist or is locked; or a
425 * Joins the chat room using the specified nickname and password. If already joined
426 * using another nickname, this method will first leave the room and then
429 * To control the amount of history to receive while joining a room you will need to provide
432 * A password is required when joining password protected rooms. If the room does
435 * If the room does not already exist when the user seeks to enter it, the server will
436 * decide to create a new room or not.
440 * @param history the amount of discussion history to receive while joining a room.
442 * @throws XMPPException if an error occurs joining the room. In particular, a
445 * 404 error can occur if the room does not exist or is locked; or a
458 // If we've already joined the room, leave it before joining under a new
463 // We join a room by sending a presence packet where the "to"
466 joinPresence.setTo(room + "/" + nickname);
485 new FromMatchesFilter(room + "/" + nickname),
518 * @return true if currently in the multi user chat room.
525 * Leave the chat room.
532 // We leave a room by sending a presence packet where the "to"
535 leavePresence.setTo(room + "/" + nickname);
549 * Returns the room's configuration form that the room's owner can use or <tt>null</tt> if
550 * no configuration is possible. The configuration form allows to set the room's language,
551 * enable logging, specify room's type, etc..
555 * @throws XMPPException if an error occurs asking the configuration form for the room.
559 iq.setTo(room);
582 * Sends the completed configuration form to the server. The room will be configured
584 * will create an instant room (will use default configuration).
591 iq.setTo(room);
614 * Returns the room's registration form that an unaffiliated user, can use to become a member
615 * of the room or <tt>null</tt> if no registration is possible. Some rooms may restrict the
616 * privilege to register members and allow only room admins to add new members.<p>
618 * If the user requesting registration requirements is not allowed to register with the room
619 * (e.g. because that privilege has been restricted), the room will return a "Not Allowed"
624 * @throws XMPPException if an error occurs asking the registration form for the room or a
625 * 405 error if the user is not allowed to register with the room.
630 reg.setTo(room);
649 * the form, the room may queue the request for review by the room admins or may immediately
652 * If the desired room nickname is already reserved for that room, the room will return a
653 * "Conflict" error to the user (error code 409). If the room does not support registration,
658 * 409 error can occur if the desired room nickname is already reserved for that room;
659 * or a 503 error can occur if the room does not support registration.
664 reg.setTo(room);
682 * Sends a request to the server to destroy the room. The sender of the request
683 * should be the room's owner. If the sender of the destroy request is not the room's owner
686 * @param reason the reason for the room destruction.
688 * @throws XMPPException if an error occurs while trying to destroy the room.
695 iq.setTo(room);
698 // Create the reason for the room destruction
707 // Send the room destruction request.
728 * Invites another user to the room in which one is an occupant. The invitation
729 * will be sent to the room which in turn will forward the invitation to the invitee.<p>
731 * If the room is password-protected, the invitee will receive a password to use to join
732 * the room. If the room is members-only, the the invitee may be added to the member list.
734 * @param user the user to invite to the room.(e.g. hecate@shakespeare.lit)
742 * Invites another user to the room in which one is an occupant using a given Message. The invitation
743 * will be sent to the room which in turn will forward the invitation to the invitee.<p>
745 * If the room is password-protected, the invitee will receive a password to use to join
746 * the room. If the room is members-only, the the invitee may be added to the member list.
749 * @param user the user to invite to the room.(e.g. hecate@shakespeare.lit)
754 message.setTo(room);
770 * will be sent to the room which in turn will forward the rejection to the inviter.
773 * @param room the room that sent the original invitation.
777 public static void decline(Connection conn, String room, String inviter, String reason) {
778 Message message = new Message(room);
859 * the room's subject changes.
873 * anytime the room's subject changes.
920 * Returns the last known room's subject or <tt>null</tt> if the user hasn't joined the room
921 * or the room does not have a subject yet. In case the room has a subject, as soon as the
922 * user joins the room a message with the current room's subject will be received.<p>
924 * To be notified every time the room's subject change you should add a listener
925 * to this room. {@link #addSubjectUpdatedListener(SubjectUpdatedListener)}<p>
927 * To change the room's subject use {@link #changeSubject(String)}.
929 * @return the room's subject or <tt>null</tt> if the user hasn't joined the room or the
930 * room does not have a subject yet.
937 * Returns the reserved room nickname for the user in the room. A user may have a reserved
938 * nickname, for example through explicit room registration or database integration. In such
940 * to enter the room.
942 * @return the reserved room nickname or <tt>null</tt> if none.
948 room,
956 // If no Identity was found then the user does not have a reserved room nickname
966 * Returns the nickname that was used to join the room, or <tt>null</tt> if not
976 * Changes the occupant's nickname to a new nickname within the room. Each room occupant
982 * @param nickname the new nickname within the room.
989 // Check that we already have joined the room before attempting to change the
992 throw new IllegalStateException("Must be logged into the room to change nickname.");
998 joinPresence.setTo(room + "/" + nickname);
1007 new FromMatchesFilter(room + "/" + nickname),
1028 * Changes the occupant's availability status within the room. The presence type
1039 // Check that we already have joined the room before attempting to change the
1043 "Must be logged into the room to change the " + "availability status.");
1045 // We change the availability status by sending a presence packet to the room with the
1050 joinPresence.setTo(room + "/" + nickname);
1061 * Kicks a visitor or participant from the room. The kicked occupant will receive a presence
1064 * was kicked from the room, the rest of the occupants will receive a presence of type
1066 * was kicked from the room.
1068 * @param nickname the nickname of the participant or visitor to kick from the room
1070 * @param reason the reason why the participant or visitor is being kicked from the room.
1076 * 400 error can occur if the provided nickname is not present in the room.
1083 * Grants voice to visitors in the room. In a moderated room, a moderator may want to manage
1084 room. To have voice means that a room occupant
1085 * is able to send messages to the room occupants.
1087 * @param nicknames the nicknames of the visitors to grant voice in the room (e.g. "john").
1090 * a moderator in this room (i.e. Forbidden error); or a
1091 * 400 error can occur if the provided nickname is not present in the room.
1098 * Grants voice to a visitor in the room. In a moderated room, a moderator may want to manage
1099 * who does and does not have "voice" in the room. To have voice means that a room occupant
1100 * is able to send messages to the room occupants.
1102 * @param nickname the nickname of the visitor to grant voice in the room (e.g. "john").
1105 * a moderator in this room (i.e. Forbidden error); or a
1106 * 400 error can occur if the provided nickname is not present in the room.
1113 * Revokes voice from participants in the room. In a moderated room, a moderator may want to
1114 * revoke an occupant's privileges to speak. To have voice means that a room occupant
1115 * is able to send messages to the room occupants.
1121 * 400 error can occur if the provided nickname is not present in the room.
1128 * Revokes voice from a participant in the room. In a moderated room, a moderator may want to
1129 * revoke an occupant's privileges to speak. To have voice means that a room occupant
1130 * is able to send messages to the room occupants.
1136 * 400 error can occur if the provided nickname is not present in the room.
1143 * Bans users from the room. An admin or owner of the room can ban users from a room. This
1144 * means that the banned user will no longer be able to join the room unless the ban has been
1145 * removed. If the banned user was present in the room then he/she will be removed from the
1146 * room and notified that he/she was banned along with the reason (if provided) and the bare
1159 * Bans a user from the room. An admin or owner of the room can ban users from a room. This
1160 * means that the banned user will no longer be able to join the room unless the ban has been
1161 * removed. If the banned user was present in the room then he/she will be removed from the
1162 * room and notified that he/she was banned along with the reason (if provided) and the bare
1177 * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room
1189 * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room
1201 * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room
1202 * that a user cannot enter without being on the member list). If the user is in the room and
1203 * the room is of type members-only then the user will be removed from the room.
1214 * that becomes a room member will be able to enter a room of type Members-Only (i.e. a room
1215 * that a user cannot enter without being on the member list). If the user is in the room and
1216 * the room is of type members-only then the user will be removed from the room.
1226 * Grants moderator privileges to participants or visitors. Room administrators may grant
1228 * other users, modify room's subject plus all the partcipants privileges.
1238 * Grants moderator privileges to a participant or visitor. Room administrators may grant
1240 * other users, modify room's subject plus all the partcipants privileges.
1251 * privileges will become a participant. Room administrators may revoke moderator privileges
1253 * not allowed to revoke moderator privileges from other room administrators or owners.
1264 * privileges will become a participant. Room administrators may revoke moderator privileges
1266 * not allowed to revoke moderator privileges from other room administrators or owners.
1276 * Grants ownership privileges to other users. Room owners may grant ownership privileges.
1277 * Some room implementations will not allow to grant ownership privileges to other users.
1278 * An owner is allowed to change defining room features as well as perform all administrative
1289 * Grants ownership privileges to another user. Room owners may grant ownership privileges.
1290 * Some room implementations will not allow to grant ownership privileges to other users.
1291 * An owner is allowed to change defining room features as well as perform all administrative
1303 * privileges will become an administrator. Room owners may revoke ownership privileges.
1304 * Some room implementations will not allow to grant ownership privileges to other users.
1315 * privileges will become an administrator. Room owners may revoke ownership privileges.
1316 * Some room implementations will not allow to grant ownership privileges to other users.
1326 * Grants administrator privileges to other users. Room owners may grant administrator
1338 * Grants administrator privileges to another user. Room owners may grant administrator
1352 * privileges will become a member. Room owners may revoke administrator privileges from
1364 * privileges will become a member. Room owners may revoke administrator privileges from
1377 iq.setTo(room);
1405 iq.setTo(room);
1443 iq.setTo(room);
1473 iq.setTo(room);
1502 iq.setTo(room);
1530 iq.setTo(room);
1589 * is not in the room.<p>
1591 * @param user the room occupant to search for his presence. The format of user must
1602 * user is not in the room. The Occupant object may include information such as full
1603 * JID of the user as well as the role and affiliation of the user in the room.<p>
1605 * @param user the room occupant to search for his presence. The format of user must
1607 * @return the Occupant or <tt>null</tt> if the user is unavailable (i.e. not in the room).
1643 * Returns a collection of <code>Affiliate</code> with the room owners.
1645 * @return a collection of <code>Affiliate</code> with the room owners.
1654 * Returns a collection of <code>Affiliate</code> with the room administrators.
1656 * @return a collection of <code>Affiliate</code> with the room administrators.
1665 * Returns a collection of <code>Affiliate</code> with the room members.
1667 * @return a collection of <code>Affiliate</code> with the room members.
1676 * Returns a collection of <code>Affiliate</code> with the room outcasts.
1678 * @return a collection of <code>Affiliate</code> with the room outcasts.
1687 * Returns a collection of <code>Affiliate</code> that have the specified room affiliation
1690 * @param affiliation the affiliation of the users in the room.
1691 * @return a collection of <code>Affiliate</code> that have the specified room affiliation.
1697 iq.setTo(room);
1728 * Returns a collection of <code>Affiliate</code> that have the specified room affiliation
1731 * @param affiliation the affiliation of the users in the room.
1732 * @return a collection of <code>Affiliate</code> that have the specified room affiliation.
1738 iq.setTo(room);
1769 * Returns a collection of <code>Occupant</code> with the room moderators.
1771 * @return a collection of <code>Occupant</code> with the room moderators.
1780 * Returns a collection of <code>Occupant</code> with the room participants.
1782 * @return a collection of <code>Occupant</code> with the room participants.
1791 * Returns a collection of <code>Occupant</code> that have the specified room role.
1793 * @param role the role of the occupant in the room.
1794 * @return a collection of <code>Occupant</code> that have the specified room role.
1800 iq.setTo(room);
1831 * Sends a message to the chat room.
1837 Message message = new Message(room, Message.Type.groupchat);
1843 * Returns a new Chat for sending private messages to a given room occupant.
1844 * The Chat's occupant address is the room's JID (i.e. roomName@service/nick). The server
1845 * service will change the 'from' address to the sender's room JID and delivering the message
1848 * @param occupant occupant unique room JID (e.g. 'darkcave@macbeth.shakespeare.lit/Paul').
1851 * @return new Chat for sending private messages to a given room occupant.
1858 * Creates a new Message to send to the chat room.
1860 * @return a new Message addressed to the chat room.
1863 return new Message(room, Message.Type.groupchat);
1867 * Sends a Message to the chat room.
1942 * Changes the subject within the room. As a default, only users with a role of "moderator"
1943 * are allowed to change the subject in a room. Although some rooms may be configured to
1946 * @param subject the new room's subject to set.
1948 * room subject will throw an error with code 403 (i.e. Forbidden)
1951 Message message = new Message(room, Message.Type.groupchat);
1956 new FromMatchesFilter(room),
1982 * Notification message that the user has joined the room.
1991 rooms.add(room);
1995 * Notification message that the user has left the room.
2003 rooms.remove(room);
2022 * Adds a listener that will be notified of changes in your status in the room
2036 * Removes a listener that was being notified of changes in your status in the room
2074 * Adds a listener that will be notified of changes in occupants status in the room
2088 * Removes a listener that was being notified of changes in occupants status in the room
2128 new FromMatchesFilter(room),
2137 new AndFilter(new FromMatchesFilter(room), new PacketTypeFilter(Presence.class));
2146 // Update the room subject
2161 String myRoomJID = room + "/" + nickname;
2184 // A new occupant has joined the room
2203 // An occupant has left the room
2237 roomListenerMultiplexor.addRoom(room, packetMultiplexor);
2241 * Fires notification events if the role of a room occupant has changed. If the occupant that
2270 * @param oldRole the previous role of the user in the room before receiving the new presence
2271 * @param newRole the new role of the user in the room after receiving the new presence
2272 * @param isUserModification whether the received presence is about your user in the room or not
2273 * @param from the occupant whose role in the room has changed
2274 * (e.g. room@conference.jabber.org/nick).
2293 // The participant's voice was revoked from the room
2351 * Fires notification events if the affiliation of a room occupant has changed. If the
2382 * @param oldAffiliation the previous affiliation of the user in the room before receiving the
2384 * @param newAffiliation the new affiliation of the user in the room after receiving the new
2386 * @param isUserModification whether the received presence is about your user in the room or not
2387 * @param from the occupant whose role in the room has changed
2388 * (e.g. room@conference.jabber.org/nick).
2398 // The user's ownership to the room was revoked
2409 // The user's administrative privileges to the room were revoked
2420 // The user's membership to the room was revoked
2432 // The user was granted ownership to the room
2443 // The user was granted administrative privileges to the room
2454 // The user was granted membership to the room
2480 // Check if an occupant was kicked from the room
2503 // A user was banned from the room
2526 // A user's membership was revoked from the room
2540 // A occupant has changed his nickname in the room
2552 roomListenerMultiplexor.removeRoom(room);
2569 * An InvitationsMonitor monitors a given connection to detect room invitations. Every
2595 * @param conn the connection to monitor for room invitations.
2617 * @param connection the connection to monitor for possible room invitations
2628 * order to start listening to room invitations.
2635 // on the connection to detect room invitations
2649 * If there are no more listeners to notifiy for room invitations then the monitor will
2651 * monitoring the connection for new room invitations.
2660 // If there are no more listeners to notifiy for room invitations
2671 private void fireInvitationListeners(String room, String inviter, String reason, String password,
2679 listener.invitationReceived(connection, room, inviter, reason, password, message);
2704 * Initializes the listeners to detect received room invitations and to detect when the
2705 * connection gets closed. As soon as a room invitation is received the invitations