1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-10 18:15:58 +01: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

@ -35,7 +35,7 @@ public class PacketIDFilter implements PacketFilter {
* Creates a new packet ID filter using the specified packet's ID.
*
* @param packet the packet which the ID is taken from.
* @deprecated use {@link StanzaIdfilter(Stanza)} instead.
* @deprecated use {@link StanzaIdFilter#StanzaIdFilter(Stanza)} instead.
*/
@Deprecated
public PacketIDFilter(Stanza packet) {
@ -46,7 +46,7 @@ public class PacketIDFilter implements PacketFilter {
* Creates a new packet ID filter using the specified packet ID.
*
* @param packetID the packet ID to filter for.
* @deprecated use {@link StanzaIdFilter(String)} instead.
* @deprecated use {@link StanzaIdFilter#StanzaIdFilter(Stanza)} instead.
*/
@Deprecated
public PacketIDFilter(String packetID) {

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;