public void __setStatus(String resource, int priority, byte index, String statusText) { if (StatusInfo.STATUS_OFFLINE == index) { resource = StringUtils.notNull(resource); if (resource.equals(currentResource)) { currentResource = null; } removeSubContact(resource); if (0 == subContacts.size()) { setOfflineStatus(); } } else { SubContact c = getSubContact(resource); c.priority = (byte) Math.min(127, Math.max(priority, -127)); c.status = index; c.statusText = statusText; } }
private String getSubContactRealJid(String resource) { SubContact c = getExistSubContact(resource); return StringUtils.notNull((null == c) ? null : c.realJid); }