use of org.jivesoftware.openfire.muc.spi.LocalMUCRoom in project Openfire by igniterealtime.
the class MultiUserChatManager method joinedCluster.
@Override
@SuppressWarnings("unchecked")
public void joinedCluster(byte[] nodeID) {
Object result = CacheFactory.doSynchronousClusterTask(new GetNewMemberRoomsRequest(), nodeID);
if (result instanceof List<?>) {
List<RoomInfo> rooms = (List<RoomInfo>) result;
for (RoomInfo roomInfo : rooms) {
LocalMUCRoom remoteRoom = roomInfo.getRoom();
MultiUserChatServiceImpl service = (MultiUserChatServiceImpl) remoteRoom.getMUCService();
LocalMUCRoom localRoom = service.getLocalChatRoom(remoteRoom.getName());
if (localRoom == null) {
// Create local room with remote information
localRoom = remoteRoom;
service.chatRoomAdded(localRoom);
}
// Add remote occupants to local room
for (OccupantAddedEvent event : roomInfo.getOccupants()) {
event.setSendPresence(true);
event.run();
}
}
}
}
use of org.jivesoftware.openfire.muc.spi.LocalMUCRoom in project Openfire by igniterealtime.
the class RoomAvailableEvent method readExternal.
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
room = new LocalMUCRoom();
room.readExternal(in);
}
use of org.jivesoftware.openfire.muc.spi.LocalMUCRoom in project Openfire by igniterealtime.
the class RoomRemovedEvent method readExternal.
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
room = new LocalMUCRoom();
room.readExternal(in);
}
Aggregations