1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-06-25 21:14:51 +02: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;
}
}