1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

Add getter for connectionCounter to XMPPConnection

This commit is contained in:
Florian Schmaus 2014-03-15 11:39:38 +01:00
parent 64e7b8a868
commit 364cbd81da

View file

@ -1105,4 +1105,15 @@ public abstract class XMPPConnection {
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
return executorService.schedule(command, delay, unit);
}
/**
* Get the connection counter of this XMPPConnection instance. Those can be used as ID to
* identify the connection, but beware that the ID may not be unique if you create more then
* <tt>2*Integer.MAX_VALUE</tt> instances as the counter could wrap.
*
* @return the connection counter of this XMPPConnection
*/
public int getConnectionCounter() {
return connectionCounterValue;
}
}