/** * Destroys the room. * * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#destroyroom">10.9 Destroying a Room</a> */ public final AsyncResult<IQ> destroy() { return destroy(null); }
/** * Gets the admins of the room. * * @return The async result with the admins. * @see <a href="https://xmpp.org/extensions/xep-0045.html#modifymember">9.5 Modifying the Member List</a> */ public AsyncResult<List<Item>> getAdmins() { return getByAffiliation(Affiliation.ADMIN); }
/** * Bans a user. Note that you must be an owner or admin of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#ban">9.1 Banning a User</a> */ public final AsyncResult<IQ> banUser(Jid user, String reason) { return changeAffiliation(Affiliation.OUTCAST, user, reason); }
/** * Enters the room. * * @param nick The nickname. * @return The async result with the self-presence returned by the chat room. */ public AsyncResult<Presence> enter(String nick) { return enter(nick, null, null); }
/** * Revokes voice from a participant. Note that you must be a moderator in the room. * * @param nickname The nickname. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#revokevoice">8.4 Revoking Voice from a Participant</a> * @see #grantVoice(String, String) */ public final AsyncResult<IQ> revokeVoice(String nickname, String reason) { return changeRole(Role.VISITOR, nickname, reason); }
/** * Invites another user to the room. The invitation will be mediated by the room. * * @param invitee The invitee. * @param reason The reason. * @see <a href="https://xmpp.org/extensions/xep-0045.html#invite">7.8 Inviting Another User to a Room</a> */ public void invite(Jid invitee, String reason) { invite(invitee, reason, false); }
/** * Creates a chat service for the specified service address. * * @param chatService The chat service address. Usually this is hosted at the subdomain "conference". * @return The chat service. */ public ChatService createChatService(Jid chatService) { return new ChatService(chatService, null, xmppSession, serviceDiscoveryManager, this); }
/** * Creates a chat room for the specified room address. * * @param roomAddress The chat room address. * @return The chat room. */ public ChatRoom createChatRoom(Jid roomAddress) { return new ChatRoom(roomAddress, null, xmppSession, serviceDiscoveryManager, this); }
/** * Exits the room. * * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#exit">7.14 Exiting a Room</a> */ public AsyncResult<Void> exit() { return exit(null); }
/** * Enters the room with a password. * * @param nick The nickname. * @param password The password. * @return The async result with the self-presence returned by the chat room. */ public AsyncResult<Presence> enter(String nick, String password) { return enter(nick, password, null); }
/** * Grants owner status to a user. Note that you must be an owner of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#grantowner">10.3 Granting Owner Status</a> * @see #revokeOwnerStatus(Jid, String) */ public final AsyncResult<IQ> grantOwnerStatus(Jid user, String reason) { return changeAffiliation(Affiliation.OWNER, user, reason); }
/** * Grants moderator status to a participant or visitor. Note that you must be an admin in the room. * * @param nickname The nickname. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#grantmod">9.6 Granting Moderator Status</a> */ public final AsyncResult<IQ> grantModeratorStatus(String nickname, String reason) { return changeRole(Role.MODERATOR, nickname, reason); }
/** * Gets the owners of the room. * * @return The async result with the owners. * @see <a href="https://xmpp.org/extensions/xep-0045.html#modifymember">9.5 Modifying the Member List</a> */ public AsyncResult<List<Item>> getOwners() { return getByAffiliation(Affiliation.OWNER); }
/** * Enters the room and requests history messages. * * @param nick The nickname. * @param history The history. * @return The async result with the self-presence returned by the chat room. */ public AsyncResult<Presence> enter(String nick, DiscussionHistory history) { return enter(nick, null, history); }
/** * Revokes a user's membership. Note that you must be an owner or admin of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#revokemember">9.4 Revoking Membership</a> * @see #grantMembership(Jid, String, String) */ public final AsyncResult<IQ> revokeMembership(Jid user, String reason) { return changeAffiliation(Affiliation.NONE, user, reason); }
/** * Kicks an occupant from the room. Note that you must be a moderator in the room. * * @param nickname The nickname. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#kick">8.2 Kicking an Occupant</a> */ public final AsyncResult<IQ> kickOccupant(String nickname, String reason) { return changeRole(Role.NONE, nickname, reason); }
/** * Gets the outcasts of the room. * * @return The async result with the outcasts. * @see <a href="https://xmpp.org/extensions/xep-0045.html#modifymember">9.5 Modifying the Member List</a> */ public AsyncResult<List<Item>> getOutcasts() { return getByAffiliation(Affiliation.OUTCAST); }
/** * Grants admin status to a user. Note that you must be an owner of the room. * This method does basically the same as {@link #revokeOwnerStatus(Jid, String)}. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#grantadmin">10.6 Granting Admin Status</a> * @see #revokeAdminStatus(Jid, String) */ public final AsyncResult<IQ> grantAdminStatus(Jid user, String reason) { return changeAffiliation(Affiliation.ADMIN, user, reason); }
/** * Revokes moderator status from a participant or visitor. Note that you must be an admin in the room. * This method does basically the same as {@link #grantVoice(String, String)}. * * @param nickname The nickname. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#revokemod">9.7 Revoking Moderator Status</a> */ public final AsyncResult<IQ> revokeModeratorStatus(String nickname, String reason) { return changeRole(Role.PARTICIPANT, nickname, reason); }
/** * Revokes a user's admin status. The new status of the user will be 'member'. * Note that you must be an owner of the room. * * @param user The user. * @param reason The reason (optional). May be <code>null</code>. * @return The async result. * @see <a href="https://xmpp.org/extensions/xep-0045.html#revokeadmin">10.7 Revoking Admin Status</a> * @see #grantAdminStatus(Jid, String) */ public final AsyncResult<IQ> revokeAdminStatus(Jid user, String reason) { return changeAffiliation(Affiliation.MEMBER, user, reason); }