1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Added join method that takes a timeout value.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1953 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-05-27 15:29:07 +00:00 committed by mtucker
parent e7417b27bc
commit 0ac19c6996

View file

@ -129,12 +129,27 @@ public class GroupChat {
/**
* Joins the chat room using the specified nickname. If already joined as
* another nickname, will leave as that name first before joining under the new
* name.
* name. The default timeout of 5 seconds for a reply from the group chat server
* that the join succeeded will be used.
*
* @param nickname the nicknam to use.
* @throws XMPPException if an error occurs joining the room.
*/
public synchronized void join(String nickname) throws XMPPException {
join(nickname, 5000);
}
/**
* Joins the chat room using the specified nickname. If already joined as
* another nickname, will leave as that name first before joining under the new
* name.
*
* @param nickname the nicknam to use.
* @param timeout the number of milleseconds to wait for a reply from the
* group chat that joining the room succeeded.
* @throws XMPPException if an error occurs joining the room.
*/
public synchronized void join(String nickname, long timeout) throws XMPPException {
if (nickname == null || nickname.equals("")) {
throw new IllegalArgumentException("Nickname must not be null or blank.");
}