mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Remove schedule() from XMPPConnection interface
The idea that we abstract the scheduling of tasks on Android over this method turned out to be unnecessary. schedule() was also not really part of the *public* XMPPConnection API, so it's good that it's gone.
This commit is contained in:
parent
3647a7fce5
commit
6fd4bb850e
3 changed files with 33 additions and 25 deletions
|
@ -26,10 +26,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Level;
|
||||
|
@ -1039,11 +1037,6 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
|
||||
return executorService.schedule(command, delay, unit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getConnectionCounter() {
|
||||
return connectionCounterValue;
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smack;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.filter.IQReplyFilter;
|
||||
|
@ -352,18 +349,4 @@ public interface XMPPConnection {
|
|||
* @return the currently active {@link FromMode}
|
||||
*/
|
||||
public FromMode getFromMode();
|
||||
|
||||
/**
|
||||
* Schedule a Runnable related to this connection.
|
||||
* <p>
|
||||
* It is possible that the connection is blocked if the Runnable takes a considerably long
|
||||
* amount to complete. So either make sure that it always finishes within a reasonably fast or
|
||||
* use your own ScheduledExecutorService.
|
||||
*
|
||||
* @param command
|
||||
* @param delay
|
||||
* @param unit
|
||||
* @return the ScheduldedFuture
|
||||
*/
|
||||
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue