mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 00:02:06 +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:
parent
e7417b27bc
commit
0ac19c6996
1 changed files with 16 additions and 1 deletions
|
@ -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.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue