Java 类org.jivesoftware.smack.ExceptionCallback 实例源码

项目:Smack    文件:Roster.java   
/**
 * 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);
        }
    });
}
项目:openyu-commons    文件:PoolableXmppConnection.java   
public void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter, StanzaListener callback,
        ExceptionCallback exceptionCallback) throws NotConnectedException {
    delegate.sendStanzaWithResponseCallback(stanza, replyFilter, callback, exceptionCallback);
}
项目:openyu-commons    文件:PoolableXmppConnection.java   
public void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter, StanzaListener callback,
        ExceptionCallback exceptionCallback, long timeout) throws NotConnectedException {
    delegate.sendStanzaWithResponseCallback(stanza, replyFilter, callback, exceptionCallback, timeout);
}
项目:openyu-commons    文件:PoolableXmppConnection.java   
public void sendIqWithResponseCallback(IQ iqRequest, StanzaListener callback, ExceptionCallback exceptionCallback)
        throws NotConnectedException {
    delegate.sendIqWithResponseCallback(iqRequest, callback, exceptionCallback);
}
项目:openyu-commons    文件:PoolableXmppConnection.java   
public void sendIqWithResponseCallback(IQ iqRequest, StanzaListener callback, ExceptionCallback exceptionCallback,
        long timeout) throws NotConnectedException {
    delegate.sendIqWithResponseCallback(iqRequest, callback, exceptionCallback, timeout);
}