@Override public double sample() { double rooms = 0; for (MultiUserChatService service : getMultiUserChatServices()) { rooms += service.getNumberChatRooms(); } return rooms; }
@Override public double sample() { double msgcnt = 0; for (MultiUserChatService service : getMultiUserChatServices()) { msgcnt += service.getIncomingMessageCount(true); } return msgcnt; }
@Override public double sample() { double occupants = 0; for (MultiUserChatService service : getMultiUserChatServices()) { occupants += service.getNumberRoomOccupants(); } return occupants; }
public OccupantAddedEvent(LocalMUCRoom room, MUCRole occupant) { super(room); presence = occupant.getPresence(); role = occupant.getRole().ordinal(); affiliation = occupant.getAffiliation().ordinal(); voiceOnly = occupant.isVoiceOnly(); roleAddress = occupant.getRoleAddress(); userAddress = occupant.getUserAddress(); nodeID = XMPPServer.getInstance().getNodeID(); }
public UpdateOccupant(LocalMUCRoom room, MUCRole role) { super(room); this.presence = role.getPresence(); this.nickname = role.getNickname(); this.role = role.getRole().ordinal(); this.affiliation = role.getAffiliation().ordinal(); }
@Override public double sample() { double msgcnt = 0; for (MultiUserChatService service : getMultiUserChatServices()) { msgcnt += service.getOutgoingMessageCount(true); } return msgcnt; }
@Override public double sample() { double users = 0; for (MultiUserChatService service : getMultiUserChatServices()) { users += service.getNumberConnectedUsers(false); } return users; }
public UpdateHistoryStrategy(String serviceName, HistoryStrategy historyStrategy) { this.serviceName = serviceName; type = historyStrategy.getType().ordinal(); maxNumber = historyStrategy.getMaxNumber(); }
public OccupantLeftEvent(LocalMUCRoom room, MUCRole role) { super(room); this.role = role; this.nickname = role.getNickname(); this.userAddress = role.getUserAddress(); }
public static void roomDestroyed(JID roomJID) { for (MUCEventListener listener : listeners) { listener.roomDestroyed(roomJID); } }
/** * Returns true if there is a message within the history of the room that has changed the * room's subject. * * @return true if there is a message within the history of the room that has changed the * room's subject. */ public boolean hasChangedSubject() { return historyStrategy.hasChangedSubject(); }
/** * Retrieves the subdomain of a specified service ID. * * @param serviceID ID of service to get subdomain of. * @return Subdomain of MUC service, or null if none found. */ public String getMultiUserChatSubdomain(Long serviceID) { return loadServiceSubdomain(serviceID); }
public UpdateOccupantRequest(LocalMUCRoom room, String nickname, MUCRole.Affiliation newAffiliation, MUCRole.Role newRole) { super(room); this.nickname = nickname; this.role = newRole.ordinal(); this.affiliation = newAffiliation; }
public static void privateMessageRecieved(JID toJID, JID fromJID, Message message) { for (MUCEventListener listener : listeners) { listener.privateMessageRecieved(toJID, fromJID, message); } }
public static void roomCreated(JID roomJID) { for (MUCEventListener listener : listeners) { listener.roomCreated(roomJID); } }
/** * Retrieves ID of MUC service by subdomain. * * @param subdomain Subdomain of service to get ID of. * @return ID number of MUC service, or null if none found. */ public Long getMultiUserChatServiceID(String subdomain) { Long id = loadServiceID(subdomain); if (id == -1) { return null; } return id; }
public static void occupantJoined(JID roomJID, JID user, String nickname) { for (MUCEventListener listener : listeners) { listener.occupantJoined(roomJID, user, nickname); } }
public static void nicknameChanged(JID roomJID, JID user, String oldNickname, String newNickname) { for (MUCEventListener listener : listeners) { listener.nicknameChanged(roomJID, user, oldNickname, newNickname); } }
public static void roomSubjectChanged(JID roomJID, JID user, String newSubject) { for (MUCEventListener listener : listeners) { listener.roomSubjectChanged(roomJID, user, newSubject); } }
/** * Returns the message within the history of the room that has changed the * room's subject. * * @return the latest room subject change or null if none exists yet. */ public Message getChangedSubject() { return historyStrategy.getChangedSubject(); }