1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Minor javadoc fixes and improvements

This commit is contained in:
Florian Schmaus 2015-02-22 10:33:08 +01:00
parent 0fae7a26c2
commit 8b0ccd7420
3 changed files with 21 additions and 2 deletions

View file

@ -27,6 +27,14 @@ public class BundleAndDefer {
this.isStopped = isStopped;
}
/**
* Stop the bundle and defer mechanism that was started when this instance of {@link BundleAndDefer} was emitted by
* Smack.
* <p>
* It is possible that the defer period already expired when this is invoked. In this case this method is basically
* a no-op.
* </p>
*/
public void stopCurrentBundleAndDefer() {
synchronized (isStopped) {
if (isStopped.get()) {

View file

@ -185,8 +185,19 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
private final SynchronizationPoint<XMPPException> compressSyncPoint = new SynchronizationPoint<XMPPException>(
this);
/**
* The default bundle and defer callback, used for new connections.
* @see bundleAndDeferCallback
*/
private static BundleAndDeferCallback defaultBundleAndDeferCallback;
/**
* The used bundle and defer callback.
* <p>
* Although this field may be set concurrently, the 'volatile' keyword was deliberately not added, in order to avoid
* having a 'volatile' read within the writer threads loop.
* </p>
*/
private BundleAndDeferCallback bundleAndDeferCallback = defaultBundleAndDeferCallback;
private static boolean useSmDefault = false;