Search in sources :

Example 1 with OccupantKickedForNicknameTask

use of org.jivesoftware.openfire.muc.cluster.OccupantKickedForNicknameTask in project Openfire by igniterealtime.

the class OccupantManager method occupantNickKicked.

/**
 * When an XMPP entity / user is kicked out of a room because of nickname collision, this event handler will ensure
 * that this instance of OccupantManager, as well as all instances for the same server on every other cluster node,
 * updates the relevant data that it maintains to perform post-cluster event maintenance.
 *
 * @param roomJID the JID of the room where the occupant is kicked out.
 * @param nickname nickname that the user used in the room.
 */
@Override
public void occupantNickKicked(JID roomJID, String nickname) {
    Log.debug("Informing nodes about kicking occupant with nick {} from room {} of service {}", nickname, roomJID.getNode(), serviceName);
    final OccupantKickedForNicknameTask task = new OccupantKickedForNicknameTask(serviceName, roomJID.getNode(), nickname, XMPPServer.getInstance().getNodeID());
    // On this cluster node.
    process(task);
    // On all other cluster nodes
    if (PROPERTY_USE_NONBLOCKING_CLUSTERTASKS.getValue()) {
        CacheFactory.doClusterTask(task);
    } else {
        CacheFactory.doSynchronousClusterTask(task, false);
    }
}
Also used : OccupantKickedForNicknameTask(org.jivesoftware.openfire.muc.cluster.OccupantKickedForNicknameTask)

Aggregations

OccupantKickedForNicknameTask (org.jivesoftware.openfire.muc.cluster.OccupantKickedForNicknameTask)1