/** * Reloads the entire roster from the server. This is an asynchronous operation, * which means the method will return immediately, and the roster will be * reloaded at a later point when the server responds to the reload request. * @throws NotLoggedInException If not logged in. * @throws NotConnectedException */ public void reload() throws NotLoggedInException, NotConnectedException{ final XMPPConnection connection = connection(); if (!connection.isAuthenticated()) { throw new NotLoggedInException(); } if (connection.isAnonymous()) { throw new IllegalStateException("Anonymous users can't have a roster."); } RosterPacket packet = new RosterPacket(); if (rosterStore != null && isRosterVersioningSupported()) { packet.setVersion(rosterStore.getRosterVersion()); } rosterState = RosterState.loading; connection.sendIqWithResponseCallback(packet, new RosterResultListener(), new ExceptionCallback() { @Override public void processException(Exception exception) { rosterState = RosterState.uninitialized; LOGGER.log(Level.SEVERE, "Exception reloading roster" , exception); } }); }
public void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter, StanzaListener callback, ExceptionCallback exceptionCallback) throws NotConnectedException { delegate.sendStanzaWithResponseCallback(stanza, replyFilter, callback, exceptionCallback); }
public void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter, StanzaListener callback, ExceptionCallback exceptionCallback, long timeout) throws NotConnectedException { delegate.sendStanzaWithResponseCallback(stanza, replyFilter, callback, exceptionCallback, timeout); }
public void sendIqWithResponseCallback(IQ iqRequest, StanzaListener callback, ExceptionCallback exceptionCallback) throws NotConnectedException { delegate.sendIqWithResponseCallback(iqRequest, callback, exceptionCallback); }
public void sendIqWithResponseCallback(IQ iqRequest, StanzaListener callback, ExceptionCallback exceptionCallback, long timeout) throws NotConnectedException { delegate.sendIqWithResponseCallback(iqRequest, callback, exceptionCallback, timeout); }