1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +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. * Creates a new packet ID filter using the specified packet's ID.
* *
* @param packet the packet which the ID is taken from. * @param packet the packet which the ID is taken from.
* @deprecated use {@link StanzaIdfilter(Stanza)} instead. * @deprecated use {@link StanzaIdFilter#StanzaIdFilter(Stanza)} instead.
*/ */
@Deprecated @Deprecated
public PacketIDFilter(Stanza packet) { public PacketIDFilter(Stanza packet) {
@ -46,7 +46,7 @@ public class PacketIDFilter implements PacketFilter {
* Creates a new packet ID filter using the specified packet ID. * Creates a new packet ID filter using the specified packet ID.
* *
* @param packetID the packet ID to filter for. * @param packetID the packet ID to filter for.
* @deprecated use {@link StanzaIdFilter(String)} instead. * @deprecated use {@link StanzaIdFilter#StanzaIdFilter(Stanza)} instead.
*/ */
@Deprecated @Deprecated
public PacketIDFilter(String packetID) { public PacketIDFilter(String packetID) {

View file

@ -27,6 +27,14 @@ public class BundleAndDefer {
this.isStopped = isStopped; 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() { public void stopCurrentBundleAndDefer() {
synchronized (isStopped) { synchronized (isStopped) {
if (isStopped.get()) { if (isStopped.get()) {

View file

@ -185,8 +185,19 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
private final SynchronizationPoint<XMPPException> compressSyncPoint = new SynchronizationPoint<XMPPException>( private final SynchronizationPoint<XMPPException> compressSyncPoint = new SynchronizationPoint<XMPPException>(
this); this);
/**
* The default bundle and defer callback, used for new connections.
* @see bundleAndDeferCallback
*/
private static BundleAndDeferCallback defaultBundleAndDeferCallback; 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 BundleAndDeferCallback bundleAndDeferCallback = defaultBundleAndDeferCallback;
private static boolean useSmDefault = false; private static boolean useSmDefault = false;