Search in sources :

Example 1 with RoomRemovedEvent

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

the class MultiUserChatServiceImpl method removeChatRoom.

private void removeChatRoom(String roomName, boolean notify) {
    MUCRoom room = localMUCRoomManager.removeRoom(roomName);
    if (room != null) {
        Log.info("removing chat room:" + roomName + "|" + room.getClass().getName());
        if (room instanceof LocalMUCRoom)
            GroupEventDispatcher.removeListener((LocalMUCRoom) room);
        totalChatTime += room.getChatLength();
        if (notify) {
            // Notify other cluster nodes that a room has been removed
            CacheFactory.doClusterTask(new RoomRemovedEvent((LocalMUCRoom) room));
        }
    } else {
        Log.info("No chatroom {} during removal.", roomName);
    }
}
Also used : MUCRoom(org.jivesoftware.openfire.muc.MUCRoom) RoomRemovedEvent(org.jivesoftware.openfire.muc.cluster.RoomRemovedEvent)

Aggregations

MUCRoom (org.jivesoftware.openfire.muc.MUCRoom)1 RoomRemovedEvent (org.jivesoftware.openfire.muc.cluster.RoomRemovedEvent)1