mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +01:00
Add Manager.schedule(Runnable, long, TimeUnit)
using Smack's scheduled executor service.
This commit is contained in:
parent
4f88f23f33
commit
ecc53b1bc8
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2014 Florian Schmaus
|
||||
* Copyright 2014-2018 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -17,6 +17,8 @@
|
|||
package org.jivesoftware.smack;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jivesoftware.smack.SmackException.NotLoggedInException;
|
||||
import org.jivesoftware.smack.util.Objects;
|
||||
|
@ -48,4 +50,8 @@ public abstract class Manager {
|
|||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
protected static final ScheduledFuture<?> schedule(Runnable runnable, long delay, TimeUnit unit) {
|
||||
return AbstractXMPPConnection.SCHEDULED_EXECUTOR_SERVICE.schedule(runnable, delay, unit);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue