private void recieveActivatedScheduledStatuses(ResultSet rs) {
        try {
            if (rs.next()) {
                rs.beforeFirst();
                Map<String, StatusListMessage> statusListmessages = new HashMap<>();
                Map<String, ServerStatusListMessage> ServerStatusListmessages = new HashMap<>();
                String groupName;
                String extension;
                String status;
                Date start;
                StatusListMessage statusListMessage;
                ServerStatusListMessage serverStatusListMessage;
                Set<Map.Entry<String, StatusListMessage>> groupMessages;
                while (rs.next()) {
                    groupName = rs.getString("Group");
                    extension = rs.getString("LoginID");
                    status = rs.getString("StatusString");
                    start = new Date(rs.getTimestamp("StartDateTime").getTime());
                    if (groups.containsKey(groupName)) {
                        statusListMessage = (StatusListMessage) statusListmessages.get(groupName);
                        if (statusListMessage == null) {
                            statusListMessage = new StatusListMessage();
                            statusListmessages.put(groupName, statusListMessage);
                        }
                        statusListMessage.addStatus(extension, status, start);
                    }
                    serverStatusListMessage = (ServerStatusListMessage) ServerStatusListmessages.get(groupName);
                    if (serverStatusListMessage == null) {
                        serverStatusListMessage = new ServerStatusListMessage(groupName);
                        ServerStatusListmessages.put(groupName, serverStatusListMessage);
                    }
                    serverStatusListMessage.addStatus(extension, status, start);
                }
                if (statusListmessages != null) {
                    groupMessages = statusListmessages.entrySet();
                    for (Map.Entry<String, StatusListMessage> entry : groupMessages) {
                        this.sendToAllConnectedClientInGroup(groups.get(entry.getKey()).getAllConnectedClient(), entry.getValue());
                    }
                }
                for (ServerStatusListMessage message : ServerStatusListmessages.values()) {
                    this.sendToAllConnectedServer(message);
                }
                rs.close();
                statusListmessages = null;
                ServerStatusListmessages = null;
                groupMessages = null;
                serverStatusListMessage = null;
                statusListMessage = null;
                start = null;
                status = null;
                extension = null;
                groupName = null;
            } else {
                rs.close();
            }
        } catch (SQLException e) {
            Logger.getLogger(UnityIMPServer.class.getName()).log(Level.SEVERE, "SQL exception with processing activated Scheduled statuses", e);
        }
        rs = null;
    }