diff --git a/build.gradle b/build.gradle index fa4d82cbc..c59d49903 100644 --- a/build.gradle +++ b/build.gradle @@ -251,15 +251,9 @@ allprojects { // gradle. options.addStringOption('Xdoclint:all', '-quiet') - // TODO: Add - // Treat warnings as errors. // See also https://bugs.openjdk.java.net/browse/JDK-8200363 - // options.addStringOption('Xwerror', '-quiet') - - // after all javadoc warnings have been resolved and - // remove Xwerror from the subprojects build.gradle files - // (e.g. smack-android-extensions). + options.addStringOption('Xwerror', '-quiet') } } tasks.withType(Javadoc) { diff --git a/resources/fix-a-javadoc.sh b/resources/fix-a-javadoc.sh new file mode 100755 index 000000000..07209cd22 --- /dev/null +++ b/resources/fix-a-javadoc.sh @@ -0,0 +1,133 @@ +#!/usr/bin/env bash + +set -e + +# Pretty fancy method to get reliable the absolute path of a shell +# script, *even if it is sourced*. Credits go to GreenFox on +# stackoverflow: http://stackoverflow.com/a/12197518/194894 +pushd . > /dev/null +SCRIPTDIR="${BASH_SOURCE[0]}"; +while([ -h "${SCRIPTDIR}" ]); do + cd "`dirname "${SCRIPTDIR}"`" + SCRIPTDIR="$(readlink "`basename "${SCRIPTDIR}"`")"; +done +cd "`dirname "${SCRIPTDIR}"`" > /dev/null +SCRIPTDIR="`pwd`"; +popd > /dev/null + +SMACK_DIR=$(readlink "${SCRIPTDIR}"/..) + +FIND_ALL_JAVA_SRC="find ${SMACK_DIR} \ + -type f \ + -name *.java \ + -print" + +declare -A SMACK_EXCEPTIONS +SMACK_EXCEPTIONS[NotConnectedException]="if the XMPP connection is not connected." +SMACK_EXCEPTIONS[InterruptedException]="if the calling thread was interrupted." +SMACK_EXCEPTIONS[XMPPErrorException]="if there was an XMPP error returned." +SMACK_EXCEPTIONS[NoResponseException]="if there was no response from the remote entity." +SMACK_EXCEPTIONS[NotLoggedInException]="if the XMPP connection is not authenticated." +SMACK_EXCEPTIONS[BOSHException]="if an BOSH related error occured." +SMACK_EXCEPTIONS[IOException]="if an I/O error occured." +SMACK_EXCEPTIONS[SmackException]="if Smack detected an exceptional situation." +SMACK_EXCEPTIONS[XMPPException]="if an XMPP protocol error was received." +SMACK_EXCEPTIONS[SmackSaslException]="if a SASL specific error occured." +SMACK_EXCEPTIONS[SASLErrorException]="if a SASL protocol error was returned." +SMACK_EXCEPTIONS[NotAMucServiceException]="if the entity is not a MUC serivce." +SMACK_EXCEPTIONS[NoSuchAlgorithmException]="if no such algorithm is available." +SMACK_EXCEPTIONS[KeyManagementException]="if there was a key mangement error." +SMACK_EXCEPTIONS[XmppStringprepException]="if the provided string is invalid." +SMACK_EXCEPTIONS[XmlPullParserException]="if an error in the XML parser occured." +SMACK_EXCEPTIONS[SmackParsingException]="if the Smack parser (provider) encountered invalid input." +SMACK_EXCEPTIONS[MucNotJoinedException]="if not joined to the Multi-User Chat." +SMACK_EXCEPTIONS[MucAlreadyJoinedException]="if already joined the Multi-User Chat."7y +SMACK_EXCEPTIONS[NotALeafNodeException]="if a PubSub leaf node operation was attempted on a non-leaf node." +SMACK_EXCEPTIONS[FeatureNotSupportedException]="if a requested feature is not supported by the remote entity." +SMACK_EXCEPTIONS[MucConfigurationNotSupportedException]="if the requested MUC configuration is not supported by the MUC service." +SMACK_EXCEPTIONS[CouldNotConnectToAnyProvidedSocks5Host]="if no connection to any provided stream host could be established" +SMACK_EXCEPTIONS[NoSocks5StreamHostsProvided]="if no stream host was provided." +SMACK_EXCEPTIONS[SmackMessageException]="if there was an error." +SMACK_EXCEPTIONS[SecurityException]="if there was a security violation." +SMACK_EXCEPTIONS[InvocationTargetException]="if a reflection-based method or constructor invocation threw." +SMACK_EXCEPTIONS[IllegalArgumentException]="if an illegal argument was given." +SMACK_EXCEPTIONS[NotAPubSubNodeException]="if a involved node is not a PubSub node." +SMACK_EXCEPTIONS[NoAcceptableTransferMechanisms]="if no acceptable transfer mechanisms are available" +SMACK_EXCEPTIONS[NoSuchMethodException]="if no such method is declared" +SMACK_EXCEPTIONS[Exception]="if an exception occured." +SMACK_EXCEPTIONS[TestNotPossibleException]="if the test is not possible." +SMACK_EXCEPTIONS[TimeoutException]="if there was a timeout." +SMACK_EXCEPTIONS[IllegalStateException]="if an illegal state was encountered" +SMACK_EXCEPTIONS[NoSuchPaddingException]="if the requested padding mechanism is not availble." +SMACK_EXCEPTIONS[BadPaddingException]="if the input data is not padded properly." +SMACK_EXCEPTIONS[InvalidKeyException]="if the key is invalid." +SMACK_EXCEPTIONS[IllegalBlockSizeException]="if the input data length is incorrect." +SMACK_EXCEPTIONS[InvalidAlgorithmParameterException]="if the provided arguments are invalid." +SMACK_EXCEPTIONS[CorruptedOmemoKeyException]="if the OMEMO key is corrupted." +SMACK_EXCEPTIONS[CryptoFailedException]="if the OMEMO cryptography failed." +SMACK_EXCEPTIONS[CannotEstablishOmemoSessionException]="if no OMEMO session could be established." +SMACK_EXCEPTIONS[UntrustedOmemoIdentityException]="if the OMEMO identity is not trusted." + +MODE="" + +while getopts dm: OPTION "$@"; do + case $OPTION in + d) + set -x + ;; + m) + MODE=${OPTARG} + ;; + *) + echo "Unknown option ${OPTION}" + exit 1 + ;; + esac +done + +sed_sources() { + sedScript=${1} + ${FIND_ALL_JAVA_SRC} |\ + xargs sed \ + --in-place \ + --follow-symlinks \ + --regexp-extended \ + "${sedScript}" +} + +show_affected() { + echo ${!SMACK_EXCEPTIONS{@}} + for exception in ${!SMACK_EXCEPTIONS[@]}; do + ${FIND_ALL_JAVA_SRC} |\ + xargs grep " \* @throws $exception$" || true + done + for exception in ${!SMACK_EXCEPTIONS[@]}; do + count=$(${FIND_ALL_JAVA_SRC} |\ + xargs grep " \* @throws $exception$" | wc -l) + echo "$exception $count" + done + +} + +fix_affected() { + for exception in "${!SMACK_EXCEPTIONS[@]}"; do + exceptionJavadoc=${SMACK_EXCEPTIONS[${exception}]} + sed_sources "s;@throws ((\w*\.)?${exception})\$;@throws \1 ${exceptionJavadoc};" + done +} + +add_todo_to_param_and_return() { + sed_sources "s;@(param|return) (\w*)\$;@\1 \2 TODO javadoc me please;" +} + +case $MODE in + show) + show_affected + ;; + fix) + fix_affected + ;; + *) + echo "Unknown mode ${mode}" + exit 1 +esac diff --git a/smack-android-extensions/build.gradle b/smack-android-extensions/build.gradle index 41da87346..3279bdeb1 100644 --- a/smack-android-extensions/build.gradle +++ b/smack-android-extensions/build.gradle @@ -7,11 +7,3 @@ dependencies { compile project(':smack-android') compile project(':smack-extensions') } - -if (JavaVersion.current().isJava8Compatible()) { - tasks.withType(Javadoc) { - // Treat warnings as errors. - // See also https://bugs.openjdk.java.net/browse/JDK-8200363 - options.addStringOption('Xwerror', '-quiet') - } -} diff --git a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java index 592e0633c..85465c881 100644 --- a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java +++ b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java @@ -296,7 +296,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection { * Send a HTTP request to the connection manager with the provided body element. * * @param body the body which will be sent. - * @throws BOSHException + * @throws BOSHException if an BOSH (Bidirectional-streams Over Synchronous HTTP, XEP-0124) related error occurs */ protected void send(ComposableBody body) throws BOSHException { if (!connected) { diff --git a/smack-core/src/integration-test/java/org/jivesoftware/smack/PacketReaderTest.java b/smack-core/src/integration-test/java/org/jivesoftware/smack/PacketReaderTest.java index 8e98c0bc3..65b60d81d 100644 --- a/smack-core/src/integration-test/java/org/jivesoftware/smack/PacketReaderTest.java +++ b/smack-core/src/integration-test/java/org/jivesoftware/smack/PacketReaderTest.java @@ -36,7 +36,7 @@ public class PacketReaderTest extends SmackTestCase { /** * Constructor for PacketReaderTest. * - * @param arg0 + * @param arg0 TODO javadoc me please */ public PacketReaderTest(String arg0) { super(arg0); diff --git a/smack-core/src/integration-test/java/org/jivesoftware/smack/RosterSmackTest.java b/smack-core/src/integration-test/java/org/jivesoftware/smack/RosterSmackTest.java index 50584edd1..ef9535128 100644 --- a/smack-core/src/integration-test/java/org/jivesoftware/smack/RosterSmackTest.java +++ b/smack-core/src/integration-test/java/org/jivesoftware/smack/RosterSmackTest.java @@ -38,7 +38,7 @@ public class RosterSmackTest extends SmackTestCase { /** * Constructor for RosterSmackTest. - * @param name + * @param name TODO javadoc me please */ public RosterSmackTest(String name) { super(name); diff --git a/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacket.java b/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacket.java index cd24defcf..cd955360f 100644 --- a/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacket.java +++ b/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacket.java @@ -24,7 +24,7 @@ public class MockPacket extends Packet { /** * Returns null always. - * @return null + * @return null TODO javadoc me please */ public String toXML() { return null; diff --git a/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyProviderTest.java b/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyProviderTest.java index ef7d5ee85..fc2b0fb67 100644 --- a/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyProviderTest.java +++ b/smack-core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyProviderTest.java @@ -31,7 +31,7 @@ public class PrivacyProviderTest extends SmackTestCase { /** * Constructor for PrivacyTest. - * @param arg0 + * @param arg0 TODO javadoc me please */ public PrivacyProviderTest(String arg0) { super(arg0); diff --git a/smack-core/src/integration-test/java/org/jivesoftware/smack/test/SmackTestCase.java b/smack-core/src/integration-test/java/org/jivesoftware/smack/test/SmackTestCase.java index 9bceba3f7..601540abe 100644 --- a/smack-core/src/integration-test/java/org/jivesoftware/smack/test/SmackTestCase.java +++ b/smack-core/src/integration-test/java/org/jivesoftware/smack/test/SmackTestCase.java @@ -503,7 +503,7 @@ public abstract class SmackTestCase extends TestCase { /** * Subscribes all connections with each other: They all become friends * - * @throws XMPPException + * @throws XMPPException if an XMPP protocol error was received. */ protected void letsAllBeFriends() throws XMPPException { ConnectionUtils.letsAllBeFriends(connections); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java index 0d8209ba9..e22ecb289 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java @@ -488,9 +488,9 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * * @throws XMPPException if an error occurs on the XMPP protocol level. * @throws SmackException if an error occurs somewhere else besides XMPP protocol level. - * @throws IOException + * @throws IOException if an I/O error occured. * @return a reference to this object, to chain connect() with login(). - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public synchronized AbstractXMPPConnection connect() throws SmackException, IOException, XMPPException, InterruptedException { // Check if not already connected @@ -528,10 +528,10 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * way of XMPP connection establishment. Implementations are required to perform an automatic * login if the previous connection state was logged (authenticated). * - * @throws SmackException - * @throws IOException - * @throws XMPPException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws IOException if an I/O error occured. + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. */ protected abstract void connectInternal() throws SmackException, IOException, XMPPException, InterruptedException; @@ -563,7 +563,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * @throws XMPPException if an error occurs on the XMPP protocol level. * @throws SmackException if an error occurs somewhere else besides XMPP protocol level. * @throws IOException if an I/O error occurs during login. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public synchronized void login() throws XMPPException, SmackException, IOException, InterruptedException { // The previously used username, password and resource take over precedence over the @@ -578,12 +578,12 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * Same as {@link #login(CharSequence, String, Resourcepart)}, but takes the resource from the connection * configuration. * - * @param username - * @param password - * @throws XMPPException - * @throws SmackException - * @throws IOException - * @throws InterruptedException + * @param username TODO javadoc me please + * @param password TODO javadoc me please + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws IOException if an I/O error occured. + * @throws InterruptedException if the calling thread was interrupted. * @see #login */ public synchronized void login(CharSequence username, String password) throws XMPPException, SmackException, @@ -595,13 +595,13 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * Login with the given username (authorization identity). You may omit the password if a callback handler is used. * If resource is null, then the server will generate one. * - * @param username - * @param password - * @param resource - * @throws XMPPException - * @throws SmackException - * @throws IOException - * @throws InterruptedException + * @param username TODO javadoc me please + * @param password TODO javadoc me please + * @param resource TODO javadoc me please + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws IOException if an I/O error occured. + * @throws InterruptedException if the calling thread was interrupted. * @see #login */ public synchronized void login(CharSequence username, String password, Resourcepart resource) throws XMPPException, @@ -847,7 +847,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * presence stanza with whatever data is set. * * @param unavailablePresence the optional presence stanza to send during shutdown. - * @throws NotConnectedException + * @throws NotConnectedException if the XMPP connection is not connected. */ public synchronized void disconnect(Presence unavailablePresence) throws NotConnectedException { if (unavailablePresence != null) { @@ -1277,7 +1277,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * they are a match with the filter. * * @param stanza the stanza to process. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ protected void processStanza(final Stanza stanza) throws InterruptedException { assert stanza != null; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXmppNioConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXmppNioConnection.java index 129544c54..8655db39f 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXmppNioConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXmppNioConnection.java @@ -40,8 +40,8 @@ public abstract class AbstractXmppNioConnection extends AbstractXmppStateMachine * Set the interest Ops of a SelectionKey. Since Java's NIO interestOps(int) can block at any time, we use a queue * to perform the actual operation in the reactor where we can perform this operation non-blocking. * - * @param selectionKey - * @param interestOps + * @param selectionKey TODO javadoc me please + * @param interestOps TODO javadoc me please */ protected void setInterestOps(SelectionKey selectionKey, int interestOps) { SMACK_REACTOR.setInterestOps(selectionKey, interestOps); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java b/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java index 5c07cb38d..7aa8c7acb 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java @@ -544,7 +544,7 @@ public abstract class ConnectionConfiguration { /** * Check if the given SASL mechansism is enabled in this connection configuration. * - * @param saslMechanism + * @param saslMechanism TODO javadoc me please * @return true if the given SASL mechanism is enabled, false otherwise. */ public boolean isEnabledSaslMechanism(String saslMechanism) { @@ -642,8 +642,8 @@ public abstract class ConnectionConfiguration { * Although most services will follow that pattern. *

* - * @param jid - * @param password + * @param jid TODO javadoc me please + * @param password TODO javadoc me please * @return a reference to this builder. * @since 4.4.0 */ @@ -916,7 +916,7 @@ public abstract class ConnectionConfiguration { /** * Set the enabled SSL/TLS protocols. * - * @param enabledSSLProtocols + * @param enabledSSLProtocols TODO javadoc me please * @return a reference to this builder. */ public B setEnabledSSLProtocols(String[] enabledSSLProtocols) { @@ -939,7 +939,7 @@ public abstract class ConnectionConfiguration { * Set the HostnameVerifier used to verify the hostname of SSLSockets used by XMPP connections * created with this ConnectionConfiguration. * - * @param verifier + * @param verifier TODO javadoc me please * @return a reference to this builder. */ public B setHostnameVerifier(HostnameVerifier verifier) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java b/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java index ee12b68d1..b06916117 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java @@ -61,7 +61,7 @@ public final class ReconnectionManager { /** * Get a instance of ReconnectionManager for the given connection. * - * @param connection + * @param connection TODO javadoc me please * @return a ReconnectionManager for the connection. */ public static synchronized ReconnectionManager getInstanceFor(AbstractXMPPConnection connection) { @@ -90,7 +90,7 @@ public final class ReconnectionManager { * Set if the automatic reconnection mechanism will be enabled per default for new XMPP connections. The default is * 'false'. * - * @param enabled + * @param enabled TODO javadoc me please */ public static void setEnabledPerDefault(boolean enabled) { enabledPerDefault = enabled; @@ -132,7 +132,7 @@ public final class ReconnectionManager { /** * Set the default Reconnection Policy to use. * - * @param reconnectionPolicy + * @param reconnectionPolicy TODO javadoc me please */ public static void setDefaultReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) { defaultReconnectionPolicy = reconnectionPolicy; @@ -173,7 +173,7 @@ public final class ReconnectionManager { /** * Set the Reconnection Policy to use. * - * @param reconnectionPolicy + * @param reconnectionPolicy TODO javadoc me please */ public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) { this.reconnectionPolicy = reconnectionPolicy; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java b/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java index 73a2e4b37..15175d2b0 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java @@ -183,13 +183,13 @@ public final class SASLAuthentication { * @param authzid the authorization identifier (typically null). * @param sslSession the optional SSL/TLS session (if one was established) * @return the used SASLMechanism. - * @throws XMPPErrorException - * @throws SASLErrorException - * @throws IOException - * @throws InterruptedException - * @throws SmackSaslException - * @throws NotConnectedException - * @throws NoResponseException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws SASLErrorException if a SASL protocol error was returned. + * @throws IOException if an I/O error occured. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackSaslException if a SASL specific error occured. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoResponseException if there was no response from the remote entity. */ public SASLMechanism authenticate(String username, String password, EntityBareJid authzid, SSLSession sslSession) throws XMPPErrorException, SASLErrorException, IOException, @@ -239,8 +239,8 @@ public final class SASLAuthentication { * to false. * * @param challenge a base64 encoded string representing the challenge. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public void challengeReceived(String challenge) throws SmackException, InterruptedException { challengeReceived(challenge, false); @@ -254,9 +254,9 @@ public final class SASLAuthentication { * * @param challenge a base64 encoded string representing the challenge. * @param finalChallenge true if this is the last challenge send by the server within the success stanza - * @throws SmackSaslException - * @throws NotConnectedException - * @throws InterruptedException + * @throws SmackSaslException if a SASL specific error occured. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void challengeReceived(String challenge, boolean finalChallenge) throws SmackSaslException, NotConnectedException, InterruptedException { try { @@ -271,8 +271,8 @@ public final class SASLAuthentication { * Notification message saying that SASL authentication was successful. The next step * would be to bind the resource. * @param success result of the authentication. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public void authenticated(Success success) throws SmackException, InterruptedException { // RFC6120 6.3.10 "At the end of the authentication exchange, the SASL server (the XMPP diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java index 252239371..295ba203c 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java @@ -241,7 +241,7 @@ public final class SmackConfiguration { /** * Set the default parsing exception callback for all newly created connections. * - * @param callback + * @param callback TODO javadoc me please * @see ParsingExceptionCallback */ public static void setDefaultParsingExceptionCallback(ParsingExceptionCallback callback) { @@ -265,13 +265,20 @@ public final class SmackConfiguration { /** * Get compression handlers. * + * @return a list of compression handlers. * @deprecated use {@link #getCompressionHandlers()} instead. */ @Deprecated + // TODO: Remove in Smack 4.4. public static List getCompresionHandlers() { return getCompressionHandlers(); } + /** + * Get compression handlers. + * + * @return a list of compression handlers. + */ public static List getCompressionHandlers() { List res = new ArrayList<>(compressionHandlers.size()); for (XMPPInputOutputStream ios : compressionHandlers) { @@ -310,7 +317,7 @@ public final class SmackConfiguration { * package is disabled (but can be manually enabled). *

* - * @param className + * @param className TODO javadoc me please */ public static void addDisabledSmackClass(String className) { disabledSmackClasses.add(className); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackFuture.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackFuture.java index 121ae390a..b08a50603 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SmackFuture.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackFuture.java @@ -292,7 +292,7 @@ public abstract class SmackFuture implements Future, * A simple version of InternalSmackFuture which implements isNonFatalException(E) as always returning * false method. * - * @param + * @param the return value of the future. */ public abstract static class SimpleInternalProcessStanzaSmackFuture extends InternalProcessStanzaSmackFuture { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/StanzaCollector.java b/smack-core/src/main/java/org/jivesoftware/smack/StanzaCollector.java index 27f121b40..477cd7674 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/StanzaCollector.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/StanzaCollector.java @@ -148,7 +148,7 @@ public final class StanzaCollector implements AutoCloseable { * * @param

type of the result stanza. * @return the next available packet. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ @SuppressWarnings("unchecked") // TODO: Consider removing this method as it is hardly ever useful. @@ -173,7 +173,7 @@ public final class StanzaCollector implements AutoCloseable { * * @param

type of the result stanza. * @return the next available packet. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public

P nextResult() throws InterruptedException { return nextResult(connection.getReplyTimeout()); @@ -189,7 +189,7 @@ public final class StanzaCollector implements AutoCloseable { * @param

type of the result stanza. * @param timeout the timeout in milliseconds. * @return the next available stanza or null on timeout or connection error. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ @SuppressWarnings("unchecked") public

P nextResult(long timeout) throws InterruptedException { @@ -219,8 +219,8 @@ public final class StanzaCollector implements AutoCloseable { * @return the next available stanza. * @throws XMPPErrorException in case an error response was received. * @throws NoResponseException if there was no response from the server. - * @throws InterruptedException - * @throws NotConnectedException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. * @see #nextResultOrThrow(long) */ public

P nextResultOrThrow() throws NoResponseException, XMPPErrorException, @@ -387,7 +387,7 @@ public final class StanzaCollector implements AutoCloseable { * Set the stanza filter used by this collector. If null, then all stanzas will * get collected by this collector. * - * @param stanzaFilter + * @param stanzaFilter TODO javadoc me please * @return a reference to this configuration. */ public Configuration setStanzaFilter(StanzaFilter stanzaFilter) { @@ -399,7 +399,7 @@ public final class StanzaCollector implements AutoCloseable { * Set the maximum size of this collector, i.e. how many stanzas this collector will collect * before dropping old ones. * - * @param size + * @param size TODO javadoc me please * @return a reference to this configuration. */ public Configuration setSize(int size) { @@ -411,7 +411,7 @@ public final class StanzaCollector implements AutoCloseable { * Set the collector which timeout for the next result is reset once this collector collects * a packet. * - * @param collector + * @param collector TODO javadoc me please * @return a reference to this configuration. */ public Configuration setCollectorToReset(StanzaCollector collector) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java b/smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java index a5fbaee8b..52b3168c8 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java @@ -48,9 +48,9 @@ public interface StanzaListener { *

* * @param packet the stanza to process. - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotLoggedInException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotLoggedInException if the XMPP connection is not authenticated. */ void processStanza(Stanza packet) throws NotConnectedException, InterruptedException, NotLoggedInException; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java b/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java index f679dbf98..7652a48e0 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java @@ -140,7 +140,7 @@ public class SynchronizationPoint { /** * Check if this synchronization point is successful or wait the connections reply timeout. * @throws NoResponseException if there was no response marking the synchronization point as success or failed. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. * @return null if synchronization point was successful, or the failure Exception. */ public Exception checkIfSuccessOrWait() throws NoResponseException, InterruptedException { @@ -281,7 +281,7 @@ public class SynchronizationPoint { * {@link #reportSuccess()}, {@link #reportFailure()} and {@link #reportFailure(Exception)} will either set this * synchronization point to {@link State#Success} or {@link State#Failure}. If none of them is set after the * connections reply timeout, this method will set the state of {@link State#NoResponse}. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ private void waitForConditionOrTimeout() throws InterruptedException { waitStart = System.currentTimeMillis(); @@ -324,7 +324,7 @@ public class SynchronizationPoint { * The exception is thrown, if state is one of 'Initial', 'NoResponse' or 'RequestSent' *

* @return true if synchronization point was successful, false on failure. - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. */ private Exception checkForResponse() throws NoResponseException { switch (state) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java index 4bad89b20..437e72082 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java @@ -183,7 +183,7 @@ public interface XMPPConnection { * * @param stanza the stanza to send. * @throws NotConnectedException if the connection is not connected. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. * */ void sendStanza(Stanza stanza) throws NotConnectedException, InterruptedException; @@ -234,8 +234,8 @@ public interface XMPPConnection { *

* * @param nonza the Nonza to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ void sendNonza(Nonza nonza) throws NotConnectedException, InterruptedException; @@ -258,11 +258,12 @@ public interface XMPPConnection { * Send an IQ request and wait for the response. * * @param request the IQ request + * @param the type of the expected result IQ. * @return an IQ with type 'result' - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.3 */ I sendIqRequestAndWaitForResponse(IQ request) @@ -276,8 +277,8 @@ public interface XMPPConnection { * * @param request the IQ request to filter responses from * @return a new stanza collector. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ StanzaCollector createStanzaCollectorAndSend(IQ request) throws NotConnectedException, InterruptedException; @@ -290,8 +291,8 @@ public interface XMPPConnection { * @param stanzaFilter the stanza filter to use. * @param stanza the stanza to send right after the collector got created * @return a new stanza collector. - * @throws InterruptedException - * @throws NotConnectedException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. */ StanzaCollector createStanzaCollectorAndSend(StanzaFilter stanzaFilter, Stanza stanza) throws NotConnectedException, InterruptedException; @@ -498,7 +499,7 @@ public interface XMPPConnection { * Set the FromMode for this connection instance. Defines how the 'from' attribute of outgoing * stanzas should be populated by Smack. * - * @param fromMode + * @param fromMode TODO javadoc me please */ void setFromMode(FromMode fromMode); @@ -514,8 +515,8 @@ public interface XMPPConnection { * server, or null if the server doesn't support that feature. * * @param {@link ExtensionElement} type of the feature. - * @param element - * @param namespace + * @param element TODO javadoc me please + * @param namespace TODO javadoc me please * @return a stanza extensions of the feature or null */ F getFeature(String element, String namespace); @@ -523,8 +524,8 @@ public interface XMPPConnection { /** * Return true if the server supports the given stream feature. * - * @param element - * @param namespace + * @param element TODO javadoc me please + * @param namespace TODO javadoc me please * @return true if the server supports the stream feature. */ boolean hasFeature(String element, String namespace); @@ -552,6 +553,7 @@ public interface XMPPConnection { * * @param stanza the stanza to send. * @param replyFilter the filter used for the response stanza. + * @param the type of the stanza to send. * @return a SmackFuture for the response. */ SmackFuture sendAsync(S stanza, StanzaFilter replyFilter); @@ -562,6 +564,7 @@ public interface XMPPConnection { * @param stanza the stanza to send. * @param replyFilter the filter used for the response stanza. * @param timeout the reply timeout in milliseconds. + * @param the type of the stanza to send. * @return a SmackFuture for the response. */ SmackFuture sendAsync(S stanza, StanzaFilter replyFilter, long timeout); @@ -588,7 +591,7 @@ public interface XMPPConnection { /** * Convenience method for {@link #unregisterIQRequestHandler(String, String, org.jivesoftware.smack.packet.IQ.Type)}. * - * @param iqRequestHandler + * @param iqRequestHandler TODO javadoc me please * @return the previously registered IQ request handler or null. */ IQRequestHandler unregisterIQRequestHandler(IQRequestHandler iqRequestHandler); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java b/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java index fff02a214..ce4c0a4f0 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java @@ -86,17 +86,6 @@ public abstract class XMPPException extends Exception { */ private final Stanza request; - /** - * Creates a new XMPPErrorException with the given builder. - * - * @param xmppErrorBuilder - * @deprecated Use {@link #XMPPErrorException(Stanza, StanzaError)} instead. - */ - @Deprecated - public XMPPErrorException(StanzaError.Builder xmppErrorBuilder) { - this(null, xmppErrorBuilder.build()); - } - /** * Creates a new XMPPErrorException with the XMPPError that was the root case of the exception. * diff --git a/smack-core/src/main/java/org/jivesoftware/smack/compression/Java7ZlibInputOutputStream.java b/smack-core/src/main/java/org/jivesoftware/smack/compression/Java7ZlibInputOutputStream.java index b389d7d8e..b5e190a73 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/compression/Java7ZlibInputOutputStream.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/compression/Java7ZlibInputOutputStream.java @@ -76,7 +76,7 @@ public class Java7ZlibInputOutputStream extends XMPPInputOutputStream { * byte without blocking, 0 means that the system is known to block for more input. * * @return 0 if no data is available, 1 otherwise - * @throws IOException + * @throws IOException if an I/O error occured. */ @Override public int available() throws IOException { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/compression/XMPPInputOutputStream.java b/smack-core/src/main/java/org/jivesoftware/smack/compression/XMPPInputOutputStream.java index 7272ffe1f..837028c64 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/compression/XMPPInputOutputStream.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/compression/XMPPInputOutputStream.java @@ -30,7 +30,7 @@ public abstract class XMPPInputOutputStream { * Only use sync flush if you fully understand the implications. * * @see Attacks against XMPP when using compression - * @param flushMethod + * @param flushMethod TODO javadoc me please */ public static void setFlushMethod(FlushMethod flushMethod) { XMPPInputOutputStream.flushMethod = flushMethod; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/filter/AbstractFromToMatchesFilter.java b/smack-core/src/main/java/org/jivesoftware/smack/filter/AbstractFromToMatchesFilter.java index 1a0198ee4..bc0a9746d 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/filter/AbstractFromToMatchesFilter.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/filter/AbstractFromToMatchesFilter.java @@ -36,7 +36,7 @@ public abstract class AbstractFromToMatchesFilter implements StanzaFilter { * * @param address The address to filter for. If null is given, then * {@link #getAddressToCompare(Stanza)} must also return null to match. - * @param ignoreResourcepart + * @param ignoreResourcepart TODO javadoc me please */ protected AbstractFromToMatchesFilter(Jid address, boolean ignoreResourcepart) { if (address != null && ignoreResourcepart) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java b/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java index 8695d8a5a..b38100626 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java @@ -39,7 +39,7 @@ public final class FromMatchesFilter extends AbstractFromToMatchesFilter { * * @param address The address to filter for. If null is given, the stanza must not * have a from address. - * @param ignoreResourcepart + * @param ignoreResourcepart TODO javadoc me please */ public FromMatchesFilter(Jid address, boolean ignoreResourcepart) { super(address, ignoreResourcepart); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/filter/PacketExtensionFilter.java b/smack-core/src/main/java/org/jivesoftware/smack/filter/PacketExtensionFilter.java index b491d47d6..8b0f40cd5 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/filter/PacketExtensionFilter.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/filter/PacketExtensionFilter.java @@ -61,7 +61,7 @@ public class PacketExtensionFilter implements StanzaFilter { /** * Creates a new stanza extension filter for the given stanza extension. * - * @param packetExtension + * @param packetExtension TODO javadoc me please */ public PacketExtensionFilter(ExtensionElement packetExtension) { this(packetExtension.getElementName(), packetExtension.getNamespace()); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/filter/StanzaExtensionFilter.java b/smack-core/src/main/java/org/jivesoftware/smack/filter/StanzaExtensionFilter.java index 7b6df8ec4..7b99f560f 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/filter/StanzaExtensionFilter.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/filter/StanzaExtensionFilter.java @@ -59,7 +59,7 @@ public class StanzaExtensionFilter implements StanzaFilter { /** * Creates a new stanza extension filter for the given stanza extension. * - * @param packetExtension + * @param packetExtension TODO javadoc me please */ public StanzaExtensionFilter(ExtensionElement packetExtension) { this(packetExtension.getElementName(), packetExtension.getNamespace()); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/fsm/AbstractXmppStateMachineConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/fsm/AbstractXmppStateMachineConnection.java index 75526162e..beed39d96 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/fsm/AbstractXmppStateMachineConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/fsm/AbstractXmppStateMachineConnection.java @@ -431,6 +431,7 @@ public abstract class AbstractXmppStateMachineConnection extends AbstractXMPPCon /** * Check if the state should be activated. * + * @param walkStateGraphContext the context of the current state graph walk. * @return null if the state should be activated. * @throws SmackException in case a Smack exception occurs. */ diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java index aeb835351..5bbfa9d17 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java @@ -252,14 +252,6 @@ public abstract class IQ extends Stanza { */ protected abstract IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml); - /** - * @deprecated use {@link #initializeAsResultFor(IQ)} instead. - */ - @Deprecated - protected final void initialzeAsResultFor(IQ request) { - initializeAsResultFor(request); - } - protected final void initializeAsResultFor(IQ request) { assert this != request; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java index 4807da0bf..c1f8f3f1f 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java @@ -46,7 +46,6 @@ import org.jxmpp.stringprep.XmppStringprepException; * * * For each message type, different message fields are typically used as follows: - *

* * * @@ -120,8 +119,8 @@ public final class Message extends Stanza implements TypedCloneable { /** * Creates a new message with the specified recipient and extension element. * - * @param to - * @param extensionElement + * @param to TODO javadoc me please + * @param extensionElement TODO javadoc me please * @since 4.2 */ public Message(Jid to, ExtensionElement extensionElement) { @@ -136,7 +135,7 @@ public final class Message extends Stanza implements TypedCloneable { * instance. *

* - * @param other + * @param other TODO javadoc me please */ public Message(Message other) { super(other); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java index 9999e9afb..d82209ac3 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Packet.java @@ -56,7 +56,7 @@ public interface Packet extends TopLevelStreamElement { /** * Set the stanza ID. - * @param packetID + * @param packetID TODO javadoc me please * @deprecated use {@link #setStanzaId(String)} instead. */ @Deprecated @@ -195,8 +195,8 @@ public interface Packet extends TopLevelStreamElement { * The argument elementName may be null. *

* - * @param elementName - * @param namespace + * @param elementName TODO javadoc me please + * @param namespace TODO javadoc me please * @return true if a stanza extension exists, false otherwise. */ boolean hasExtension(String elementName, String namespace); @@ -204,7 +204,7 @@ public interface Packet extends TopLevelStreamElement { /** * Check if a stanza extension with the given namespace exists. * - * @param namespace + * @param namespace TODO javadoc me please * @return true if a stanza extension exists, false otherwise. */ boolean hasExtension(String namespace); @@ -212,8 +212,8 @@ public interface Packet extends TopLevelStreamElement { /** * Remove the stanza extension with the given elementName and namespace. * - * @param elementName - * @param namespace + * @param elementName TODO javadoc me please + * @param namespace TODO javadoc me please * @return the removed stanza extension or null. */ ExtensionElement removeExtension(String elementName, String namespace); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java index 64a6a90d2..ae6de5573 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java @@ -124,7 +124,7 @@ public final class Presence extends Stanza implements TypedCloneable { * instance. *

* - * @param other + * @param other TODO javadoc me please */ public Presence(Presence other) { super(other); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java index 0a0c9b7c8..d1362bea9 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java @@ -130,7 +130,7 @@ public abstract class Stanza implements TopLevelStreamElement { /** * Set the stanza ID. - * @param packetID + * @param packetID TODO javadoc me please * @deprecated use {@link #setStanzaId(String)} instead. */ @Deprecated @@ -422,8 +422,8 @@ public abstract class Stanza implements TopLevelStreamElement { * The argument elementName may be null. *

* - * @param elementName - * @param namespace + * @param elementName TODO javadoc me please + * @param namespace TODO javadoc me please * @return true if a stanza extension exists, false otherwise. */ public boolean hasExtension(String elementName, String namespace) { @@ -439,7 +439,7 @@ public abstract class Stanza implements TopLevelStreamElement { /** * Check if a stanza extension with the given namespace exists. * - * @param namespace + * @param namespace TODO javadoc me please * @return true if a stanza extension exists, false otherwise. */ public boolean hasExtension(String namespace) { @@ -456,8 +456,8 @@ public abstract class Stanza implements TopLevelStreamElement { /** * Remove the stanza extension with the given elementName and namespace. * - * @param elementName - * @param namespace + * @param elementName TODO javadoc me please + * @param namespace TODO javadoc me please * @return the removed stanza extension or null. */ public ExtensionElement removeExtension(String elementName, String namespace) { @@ -546,6 +546,7 @@ public abstract class Stanza implements TopLevelStreamElement { * Append an XMPPError is this stanza has one set. * * @param xml the XmlStringBuilder to append the error to. + * @param enclosingXmlEnvironment the enclosing XML environment. */ protected void appendErrorIfExists(XmlStringBuilder xml, XmlEnvironment enclosingXmlEnvironment) { StanzaError error = getError(); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/StanzaError.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/StanzaError.java index a5b89c031..7c43fb5b2 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/StanzaError.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/StanzaError.java @@ -29,7 +29,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder; /** * Represents an XMPP error sub-packet. Typically, a server responds to a request that has * problems by sending the stanza back and including an error packet. Each error has a type, - * error condition as well as as an optional text explanation. Typical errors are:

+ * error condition as well as as an optional text explanation. Typical errors are: * *

Message Types
 Message type
* @@ -116,9 +116,9 @@ public class StanzaError extends AbstractError implements ExtensionElement { * * @param type the error type. * @param condition the error condition. - * @param conditionText - * @param errorGenerator - * @param descriptiveTexts + * @param conditionText TODO javadoc me please + * @param errorGenerator TODO javadoc me please + * @param descriptiveTexts TODO javadoc me please * @param extensions list of stanza extensions * @param stanza the stanza carrying this XMPP error. */ diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/StreamError.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/StreamError.java index e5e4b1d92..f4be13f2f 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/StreamError.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/StreamError.java @@ -26,7 +26,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder; /** * Represents a stream error packet. Stream errors are unrecoverable errors where the server * will close the underlying TCP connection after the stream error was sent to the client. - * These is the list of stream errors as defined in the XMPP spec:

+ * These is the list of stream errors as defined in the XMPP spec: * *

XMPP Errors
* diff --git a/smack-core/src/main/java/org/jivesoftware/smack/parsing/ParsingExceptionCallback.java b/smack-core/src/main/java/org/jivesoftware/smack/parsing/ParsingExceptionCallback.java index f847a8c6c..e5b3c1b4d 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/parsing/ParsingExceptionCallback.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/parsing/ParsingExceptionCallback.java @@ -39,7 +39,7 @@ public interface ParsingExceptionCallback { * Called when parsing a stanza caused an exception. * * @param stanzaData the raw stanza data that caused the exception - * @throws IOException + * @throws IOException if an I/O error occured. */ void handleUnparsableStanza(UnparseableStanza stanzaData) throws IOException; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java b/smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java index bfd13958e..a11df485b 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java @@ -140,8 +140,8 @@ public abstract class SASLMechanism implements Comparable { * @param authzid the optional authorization identity. * @param sslSession the optional SSL/TLS session (if one was established) * @throws SmackSaslException if a SASL related error occurs. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public final void authenticate(String username, String host, DomainBareJid serviceName, String password, EntityBareJid authzid, SSLSession sslSession) @@ -170,8 +170,8 @@ public abstract class SASLMechanism implements Comparable { * @param authzid the optional authorization identity. * @param sslSession the optional SSL/TLS session (if one was established) * @throws SmackSaslException if a SASL related error occurs. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void authenticate(String host, DomainBareJid serviceName, CallbackHandler cbh, EntityBareJid authzid, SSLSession sslSession) throws SmackSaslException, NotConnectedException, InterruptedException { @@ -210,7 +210,7 @@ public abstract class SASLMechanism implements Comparable { * empty array here. * * @return the initial response or null - * @throws SmackSaslException + * @throws SmackSaslException if a SASL specific error occured. */ protected abstract byte[] getAuthenticationText() throws SmackSaslException; @@ -222,7 +222,7 @@ public abstract class SASLMechanism implements Comparable { * @param finalChallenge true if this is the last challenge send by the server within the success stanza * @throws SmackSaslException if a SASL related error occurs. * @throws InterruptedException if the connection is interrupted - * @throws NotConnectedException + * @throws NotConnectedException if the XMPP connection is not connected. */ public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackSaslException, InterruptedException, NotConnectedException { byte[] challenge = Base64.decode((challengeString != null && challengeString.equals("=")) ? "" : challengeString); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramHmac.java b/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramHmac.java index dbc48c6b4..a36383a4e 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramHmac.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramHmac.java @@ -1,6 +1,6 @@ /** * - * Copyright 2016 Florian Schmaus + * Copyright 2016-2019 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,10 @@ public interface ScramHmac { /** * RFC 5802 § 2.2 HMAC(key, str). * - * @param key - * @param str + * @param key TODO javadoc me please + * @param str TODO javadoc me please * @return the HMAC-SHA1 value of the input. - * @throws InvalidKeyException + * @throws InvalidKeyException in case there was an invalid key. */ byte[] hmac(byte[] key, byte[] str) throws InvalidKeyException; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java b/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java index caa75cccf..ff34fd979 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java @@ -259,7 +259,7 @@ public abstract class ScramMechanism extends SASLMechanism { /** * * @return the Channel Binding data. - * @throws SmackSaslException + * @throws SmackSaslException if a SASL specific error occured. */ protected byte[] getChannelBindingData() throws SmackSaslException { return null; @@ -327,7 +327,7 @@ public abstract class ScramMechanism extends SASLMechanism { * "The characters ',' or '=' in usernames are sent as '=2C' and '=3D' respectively." *

* - * @param string + * @param string TODO javadoc me please * @return the escaped string */ private static String escape(String string) { @@ -352,10 +352,10 @@ public abstract class ScramMechanism extends SASLMechanism { /** * RFC 5802 § 2.2 HMAC(key, str) * - * @param key - * @param str + * @param key TODO javadoc me please + * @param str TODO javadoc me please * @return the HMAC-SHA1 value of the input. - * @throws SmackException + * @throws SmackException if Smack detected an exceptional situation. */ private byte[] hmac(byte[] key, byte[] str) throws SmackSaslException { try { @@ -374,8 +374,8 @@ public abstract class ScramMechanism extends SASLMechanism { *

* * @param normalizedPassword the normalized password. - * @param salt - * @param iterations + * @param salt TODO javadoc me please + * @param iterations TODO javadoc me please * @return the result of the Hi function. * @throws SmackSaslException if a SASL related error occurs. */ diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/Async.java b/smack-core/src/main/java/org/jivesoftware/smack/util/Async.java index 3086d94bd..f9a4448da 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/Async.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/Async.java @@ -24,7 +24,7 @@ public class Async { /** * Creates a new thread with the given Runnable, marks it daemon, starts it and returns the started thread. * - * @param runnable + * @param runnable TODO javadoc me please * @return the started thread. */ public static Thread go(Runnable runnable) { @@ -37,7 +37,7 @@ public class Async { * Creates a new thread with the given Runnable, marks it daemon, sets the name, starts it and returns the started * thread. * - * @param runnable + * @param runnable TODO javadoc me please * @param threadName the thread name. * @return the started thread. */ diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/ByteUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/ByteUtils.java index 4621bac9c..6f1ff3804 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/ByteUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/ByteUtils.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2014 Florian Schmaus + * Copyright © 2014-2019 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,11 @@ public class ByteUtils { /** * Concatenate two byte arrays. * - * @deprecated use {@link #concat(byte[], byte[])} instead. + * @param arrayOne the first input array. + * @param arrayTwo the second input array + * @return the concatenation of the first and second input array. + * */ - @Deprecated - public static byte[] concact(byte[] arrayOne, byte[] arrayTwo) { - return concat(arrayOne, arrayTwo); - } - public static byte[] concat(byte[] arrayOne, byte[] arrayTwo) { int combinedLength = arrayOne.length + arrayTwo.length; byte[] res = new byte[combinedLength]; @@ -35,4 +33,5 @@ public class ByteUtils { System.arraycopy(arrayTwo, 0, res, arrayOne.length, arrayTwo.length); return res; } + } diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java b/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java index 6e27a115f..3a2c6a316 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java @@ -51,7 +51,7 @@ public class DNSUtil { /** * Set the DNS resolver that should be used to perform DNS lookups. * - * @param resolver + * @param resolver TODO javadoc me please */ public static void setDNSResolver(DNSResolver resolver) { dnsResolver = Objects.requireNonNull(resolver); @@ -69,7 +69,7 @@ public class DNSUtil { /** * Set the DANE provider that should be used when DANE is enabled. * - * @param daneProvider + * @param daneProvider TODO javadoc me please */ public static void setDaneProvider(SmackDaneProvider daneProvider) { DNSUtil.daneProvider = Objects.requireNonNull(daneProvider); @@ -189,7 +189,7 @@ public class DNSUtil { * Note that we follow the RFC with one exception. In a group of the same priority, only the first entry * is calculated by random. The others are ore simply ordered by their priority. * - * @param records + * @param records TODO javadoc me please * @return the list of resolved HostAddresses */ private static List sortSRVRecords(List records) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java b/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java index 81197f729..f4750423e 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java @@ -47,7 +47,7 @@ public class EventManger { * @param action the action to perform prior waiting for the event, must not be null. * @return the event value, may be null. * @throws InterruptedException if interrupted while waiting for the event. - * @throws E + * @throws E depending on the concrete use case. */ public R performActionAndWaitForEvent(K eventKey, long timeout, Callback action) throws InterruptedException, E { final Reference reference = new Reference<>(); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/FileUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/FileUtils.java index 8d246c1c4..74effc014 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/FileUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/FileUtils.java @@ -108,9 +108,9 @@ public final class FileUtils { /** * Reads the contents of a File. * - * @param file + * @param file TODO javadoc me please * @return the content of file or null in case of an error - * @throws IOException + * @throws IOException if an I/O error occured. */ @SuppressWarnings("DefaultCharset") public static String readFileOrThrow(File file) throws IOException { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/MultiMap.java b/smack-core/src/main/java/org/jivesoftware/smack/util/MultiMap.java index 783b2e2d5..d9ad987b6 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/MultiMap.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/MultiMap.java @@ -93,7 +93,7 @@ public class MultiMap { /** * Get the first value for the given key, or null if there are no entries. * - * @param key + * @param key TODO javadoc me please * @return the first value or null. */ public V getFirst(K key) { @@ -111,7 +111,7 @@ public class MultiMap { * Changes to the returned set will update the underlying MultiMap if the return set is not empty. *

* - * @param key + * @param key TODO javadoc me please * @return all values for the given key. */ public List getAll(K key) { @@ -140,7 +140,7 @@ public class MultiMap { /** * Removes all mappings for the given key and returns the first value if there where mappings or null if not. * - * @param key + * @param key TODO javadoc me please * @return the first value of the given key or null. */ public V remove(K key) { @@ -158,8 +158,8 @@ public class MultiMap { * Returns true if the mapping was removed and false if the mapping did not exist. *

* - * @param key - * @param value + * @param key TODO javadoc me please + * @param value TODO javadoc me please * @return true if the mapping was removed, false otherwise. */ public boolean removeOne(K key, V value) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/NumberUtil.java b/smack-core/src/main/java/org/jivesoftware/smack/util/NumberUtil.java index 9e914f884..831ccf0ad 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/NumberUtil.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/NumberUtil.java @@ -21,7 +21,7 @@ public class NumberUtil { /** * Checks if the given long is within the range of an unsigned 32-bit integer, the XML type "xs:unsignedInt". * - * @param value + * @param value TODO javadoc me please * @deprecated use {@link #requireUInt32(long)} instead. */ @Deprecated @@ -33,7 +33,8 @@ public class NumberUtil { /** * Checks if the given long is within the range of an unsigned 32-bit integer, the XML type "xs:unsignedInt". * - * @param value + * @param value TODO javadoc me please + * @return the input value. */ public static long requireUInt32(long value) { if (value < 0) { @@ -48,7 +49,8 @@ public class NumberUtil { /** * Checks if the given int is within the range of an unsigned 16-bit integer, the XML type "xs:unsignedShort". * - * @param value + * @param value TODO javadoc me please + * @return the input value. */ public static int requireUShort16(int value) { if (value < 0) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/Objects.java b/smack-core/src/main/java/org/jivesoftware/smack/util/Objects.java index 9cf7cadb3..f2dbdd3fa 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/Objects.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/Objects.java @@ -54,7 +54,7 @@ public class Objects { * @param collection collection * @param message error message * @param Collection type - * @return collection + * @return collection TODO javadoc me please */ public static > T requireNonNullNorEmpty(T collection, String message) { if (requireNonNull(collection).isEmpty()) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java index 795846105..3b30e8463 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java @@ -99,12 +99,12 @@ public class PacketParserUtils { * * connection is optional and is used to return feature-not-implemented errors for unknown IQ stanzas. * - * @param parser + * @param parser TODO javadoc me please * @param outerXmlEnvironment the outer XML environment (optional). * @return a stanza which is either a Message, IQ or Presence. - * @throws XmlPullParserException - * @throws SmackParsingException - * @throws IOException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. + * @throws IOException if an I/O error occured. */ public static Stanza parseStanza(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, SmackParsingException, IOException { ParserUtils.assertAtStartTag(parser); @@ -131,9 +131,9 @@ public class PacketParserUtils { * @param parser the XML parser, positioned at the start of a message packet. * @param outerXmlEnvironment the outer XML environment (optional). * @return a Message packet. - * @throws XmlPullParserException - * @throws IOException - * @throws SmackParsingException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws IOException if an I/O error occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. */ public static Message parseMessage(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { ParserUtils.assertAtStartTag(parser); @@ -212,10 +212,10 @@ public class PacketParserUtils { * This method is used for the parts where the XMPP specification requires elements that contain * only text or are the empty element. * - * @param parser + * @param parser TODO javadoc me please * @return the textual content of the element as String - * @throws XmlPullParserException - * @throws IOException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws IOException if an I/O error occured. */ public static String parseElementText(XmlPullParser parser) throws XmlPullParserException, IOException { assert parser.getEventType() == XmlPullParser.Event.START_ELEMENT; @@ -253,8 +253,8 @@ public class PacketParserUtils { * * @param parser the XML pull parser * @return the element as string - * @throws XmlPullParserException - * @throws IOException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws IOException if an I/O error occured. */ public static CharSequence parseElement(XmlPullParser parser) throws XmlPullParserException, IOException { return parseElement(parser, false); @@ -288,12 +288,12 @@ public class PacketParserUtils { * In particular Android's XmlPullParser does not support XML_ROUNDTRIP. *

* - * @param parser - * @param depth - * @param fullNamespaces + * @param parser TODO javadoc me please + * @param depth TODO javadoc me please + * @param fullNamespaces TODO javadoc me please * @return the content of the current depth - * @throws XmlPullParserException - * @throws IOException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws IOException if an I/O error occured. */ public static CharSequence parseContentDepth(XmlPullParser parser, int depth, boolean fullNamespaces) throws XmlPullParserException, IOException { if (parser.supportsRoundtrip()) { @@ -418,9 +418,9 @@ public class PacketParserUtils { * @param parser the XML parser, positioned at the start of a presence packet. * @param outerXmlEnvironment the outer XML environment (optional). * @return a Presence packet. - * @throws IOException - * @throws XmlPullParserException - * @throws SmackParsingException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. */ public static Presence parsePresence(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { ParserUtils.assertAtStartTag(parser); @@ -511,10 +511,10 @@ public class PacketParserUtils { * @param parser the XML parser, positioned at the start of an IQ packet. * @param outerXmlEnvironment the outer XML environment (optional). * @return an IQ object. - * @throws XmlPullParserException - * @throws XmppStringprepException - * @throws IOException - * @throws SmackParsingException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws XmppStringprepException if the provided string is invalid. + * @throws IOException if an I/O error occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. */ public static IQ parseIQ(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, XmppStringprepException, IOException, SmackParsingException { ParserUtils.assertAtStartTag(parser); @@ -596,8 +596,8 @@ public class PacketParserUtils { * * @param parser the XML parser, positioned at the start of the mechanisms stanza. * @return a collection of Stings with the mechanisms included in the mechanisms stanza. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ public static Collection parseMechanisms(XmlPullParser parser) throws XmlPullParserException, IOException { @@ -626,7 +626,7 @@ public class PacketParserUtils { * * @param parser the XML parser, positioned at the start of the compression stanza. * @return The CompressionFeature stream element - * @throws IOException + * @throws IOException if an I/O error occured. * @throws XmlPullParserException if an exception occurs while parsing the stanza. */ public static Compress.Feature parseCompressionFeature(XmlPullParser parser) @@ -688,8 +688,8 @@ public class PacketParserUtils { * * @param parser the XML parser. * @return a SASL Failure packet. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ public static SASLFailure parseSASLFailure(XmlPullParser parser) throws XmlPullParserException, IOException { final int initialDepth = parser.getDepth(); @@ -731,9 +731,9 @@ public class PacketParserUtils { * @param parser the XML parser. * @param outerXmlEnvironment the outer XML environment (optional). * @return an stream error packet. - * @throws IOException - * @throws XmlPullParserException - * @throws SmackParsingException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. */ public static StreamError parseStreamError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { final int initialDepth = parser.getDepth(); @@ -793,9 +793,9 @@ public class PacketParserUtils { * @param parser the XML parser. * @param outerXmlEnvironment the outer XML environment (optional). * @return an error sub-packet. - * @throws IOException - * @throws XmlPullParserException - * @throws SmackParsingException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. */ public static StanzaError.Builder parseError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { final int initialDepth = parser.getDepth(); @@ -856,9 +856,9 @@ public class PacketParserUtils { * @param outerXmlEnvironment the outer XML environment (optional). * * @return an extension element. - * @throws XmlPullParserException - * @throws IOException - * @throws SmackParsingException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws IOException if an I/O error occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. */ public static ExtensionElement parseExtensionElement(String elementName, String namespace, XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketUtil.java b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketUtil.java index b95d4231c..6124e66f4 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketUtil.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketUtil.java @@ -24,10 +24,10 @@ public class PacketUtil { /** * Get a extension element from a collection. - * @param collection - * @param element - * @param namespace - * @param + * @param collection TODO javadoc me please + * @param element TODO javadoc me please + * @param namespace TODO javadoc me please + * @param the type of the extension element. * @return the extension element * @deprecated use {@link #extensionElementFrom(Collection, String, String)} instead. */ diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java index 65b255297..81d232f10 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java @@ -156,8 +156,8 @@ public class ParserUtils { /** * Get the boolean value of an argument. * - * @param parser - * @param name + * @param parser TODO javadoc me please + * @param name TODO javadoc me please * @return the boolean value or null of no argument of the given name exists */ public static Boolean getBooleanAttribute(XmlPullParser parser, String name) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java index 261f8570d..eefccf862 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java @@ -390,7 +390,7 @@ public class StringUtils { /** * Returns true if the given CharSequence is null or empty. * - * @param cs + * @param cs TODO javadoc me please * @return true if the given CharSequence is null or empty */ public static boolean isNullOrEmpty(CharSequence cs) { @@ -430,7 +430,7 @@ public class StringUtils { /** * Returns true if the given CharSequence is empty. * - * @param cs + * @param cs TODO javadoc me please * @return true if the given CharSequence is empty */ public static boolean isEmpty(CharSequence cs) { @@ -498,7 +498,7 @@ public class StringUtils { * @param cs CharSequence * @param message error message * @param CharSequence type - * @return cs + * @return cs TODO javadoc me please */ @Deprecated public static CS requireNotNullOrEmpty(CS cs, String message) { @@ -511,7 +511,7 @@ public class StringUtils { * @param cs CharSequence * @param message error message * @param CharSequence type - * @return cs + * @return cs TODO javadoc me please */ public static CS requireNotNullNorEmpty(CS cs, String message) { if (isNullOrEmpty(cs)) { diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/TLSUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/TLSUtils.java index 0785c3860..5c3527482 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/TLSUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/TLSUtils.java @@ -99,8 +99,8 @@ public class TLSUtils { * * @param builder a connection configuration builder. * @param Type of the ConnectionConfiguration builder. - * @throws NoSuchAlgorithmException - * @throws KeyManagementException + * @throws NoSuchAlgorithmException if no such algorithm is available. + * @throws KeyManagementException if there was a key mangement error. * @return the given builder. */ public static > B acceptAllCertificates(B builder) throws NoSuchAlgorithmException, KeyManagementException { @@ -184,9 +184,9 @@ public class TLSUtils { * * @param sslSession the SSL/TLS session from which the data should be retrieved. * @return the channel binding data. - * @throws SSLPeerUnverifiedException - * @throws CertificateEncodingException - * @throws NoSuchAlgorithmException + * @throws SSLPeerUnverifiedException if we TLS peer could not be verified. + * @throws CertificateEncodingException if there was an encoding error with the certificate. + * @throws NoSuchAlgorithmException if no such algorithm is available. * @see RFC 5929 § 4. */ public static byte[] getChannelBindingTlsServerEndPoint(final SSLSession sslSession) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java index 4f0b93680..c033a84b2 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java @@ -72,8 +72,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { /** * Add a new element to this builder. * - * @param name - * @param content + * @param name TODO javadoc me please + * @param content TODO javadoc me please * @return the XmlStringBuilder */ public XmlStringBuilder element(String name, String content) { @@ -102,8 +102,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { /** * Add a new element to this builder. * - * @param name - * @param content + * @param name TODO javadoc me please + * @param content TODO javadoc me please * @return the XmlStringBuilder */ public XmlStringBuilder element(String name, CharSequence content) { @@ -234,8 +234,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { /** * Does nothing if value is null. * - * @param name - * @param value + * @param name TODO javadoc me please + * @param value TODO javadoc me please * @return the XmlStringBuilder */ public XmlStringBuilder attribute(String name, String value) { @@ -347,8 +347,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { /** * Add the given attribute if {@code value => 0}. * - * @param name - * @param value + * @param name TODO javadoc me please + * @param value TODO javadoc me please * @return a reference to this object */ public XmlStringBuilder optIntAttribute(String name, int value) { @@ -361,8 +361,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { /** * Add the given attribute if value not null and {@code value => 0}. * - * @param name - * @param value + * @param name TODO javadoc me please + * @param value TODO javadoc me please * @return a reference to this object */ public XmlStringBuilder optLongAttribute(String name, Long value) { @@ -586,8 +586,9 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { * the single parts one-by-one, avoiding allocation of a big continuous memory block holding the * XmlStringBuilder contents. * - * @param writer - * @throws IOException + * @param writer TODO javadoc me please + * @param enclosingNamespace the enclosing XML namespace. + * @throws IOException if an I/O error occured. */ public void write(Writer writer, String enclosingNamespace) throws IOException { for (CharSequence csq : sb.getAsList()) { diff --git a/smack-core/src/test/java/org/jivesoftware/smack/packet/IQResponseTest.java b/smack-core/src/test/java/org/jivesoftware/smack/packet/IQResponseTest.java index ff2c1ce69..5807f5f0b 100644 --- a/smack-core/src/test/java/org/jivesoftware/smack/packet/IQResponseTest.java +++ b/smack-core/src/test/java/org/jivesoftware/smack/packet/IQResponseTest.java @@ -38,7 +38,7 @@ public class IQResponseTest { /** * Test creating a simple and empty IQ response. - * @throws XmppStringprepException + * @throws XmppStringprepException if the provided string is invalid. */ @Test public void testGeneratingSimpleResponse() throws XmppStringprepException { @@ -58,7 +58,7 @@ public class IQResponseTest { /** * Test creating a error response based on an IQ request. - * @throws XmppStringprepException + * @throws XmppStringprepException if the provided string is invalid. */ @Test public void testGeneratingValidErrorResponse() throws XmppStringprepException { @@ -83,7 +83,7 @@ public class IQResponseTest { /** * According to RFC3920: IQ Semantics we shouldn't respond to an IQ of type result. - * @throws XmppStringprepException + * @throws XmppStringprepException if the provided string is invalid. */ @Test public void testGeneratingResponseBasedOnResult() throws XmppStringprepException { @@ -106,7 +106,7 @@ public class IQResponseTest { /** * According to RFC3920: IQ Semantics we shouldn't respond to an IQ of type error. - * @throws XmppStringprepException + * @throws XmppStringprepException if the provided string is invalid. */ @Test public void testGeneratingErrorBasedOnError() throws XmppStringprepException { diff --git a/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java b/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java index 5a1a274b4..8518c1188 100644 --- a/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java +++ b/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java @@ -676,7 +676,7 @@ public class PacketParserUtilsTest { * RFC6121 5.2.3 explicitly disallows mixed content in elements. Make sure that we throw * an exception if we encounter such an element. * - * @throws Exception + * @throws Exception if an exception occurs. */ @Test public void invalidMessageBodyContainingTagTest() throws Exception { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java index 21b3faef7..ab41a432c 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java @@ -223,10 +223,10 @@ public final class CarbonManager extends Manager { * Returns true if XMPP Carbons are supported by the server. * * @return true if supported - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isSupportedByServer() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).serverSupportsFeature(CarbonExtension.NAMESPACE); @@ -239,8 +239,8 @@ public final class CarbonManager extends Manager { * You should first check for support using isSupportedByServer(). * * @param new_state whether carbons should be enabled or disabled - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @deprecated use {@link #enableCarbonsAsync(ExceptionCallback)} or {@link #disableCarbonsAsync(ExceptionCallback)} instead. */ @Deprecated @@ -302,10 +302,10 @@ public final class CarbonManager extends Manager { * You should first check for support using isSupportedByServer(). * * @param new_state whether carbons should be enabled or disabled - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ public synchronized void setCarbonsEnabled(final boolean new_state) throws NoResponseException, @@ -322,9 +322,9 @@ public final class CarbonManager extends Manager { /** * Helper method to enable carbons. * - * @throws XMPPException + * @throws XMPPException if an XMPP protocol error was received. * @throws SmackException if there was no response from the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public void enableCarbons() throws XMPPException, SmackException, InterruptedException { setCarbonsEnabled(true); @@ -333,9 +333,9 @@ public final class CarbonManager extends Manager { /** * Helper method to disable carbons. * - * @throws XMPPException + * @throws XMPPException if an XMPP protocol error was received. * @throws SmackException if there was no response from the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public void disableCarbons() throws XMPPException, SmackException, InterruptedException { setCarbonsEnabled(false); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/gcm/packet/GcmPacketExtension.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/gcm/packet/GcmPacketExtension.java index eeab6d782..36fcd1201 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/gcm/packet/GcmPacketExtension.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/gcm/packet/GcmPacketExtension.java @@ -51,7 +51,7 @@ public class GcmPacketExtension extends AbstractJsonPacketExtension { /** * Retrieve the GCM stanza extension from the packet. * - * @param packet + * @param packet TODO javadoc me please * @return the GCM stanza extension or null. */ public static GcmPacketExtension from(Stanza packet) { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/hashes/HashManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/hashes/HashManager.java index 888c2c1ac..318a7dad9 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/hashes/HashManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/hashes/HashManager.java @@ -109,7 +109,7 @@ public final class HashManager extends Manager { /** * Announce support for the given list of algorithms. - * @param algorithms + * @param algorithms TODO javadoc me please */ public void addAlgorithmsToFeatures(List algorithms) { ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection()); @@ -120,7 +120,7 @@ public final class HashManager extends Manager { /** * Get an instance of the HashManager for the given connection. - * @param connection + * @param connection TODO javadoc me please * @return the manager for the given connection. */ public static synchronized HashManager getInstanceFor(XMPPConnection connection) { @@ -189,7 +189,7 @@ public final class HashManager extends Manager { /** * Compensational method for static 'valueOf' function. * - * @param s + * @param s TODO javadoc me please * @return the algorithm for the given string. * @throws IllegalArgumentException if no algorithm for the given string is known. */ diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/HOXTManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/HOXTManager.java index 8774e1317..0624ca06b 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/HOXTManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/HOXTManager.java @@ -56,10 +56,10 @@ public class HOXTManager { * @param jid jid * @param connection connection * @return true if the given entity understands the HTTP ove XMPP transport format and exchange. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean isSupported(Jid jid, XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(jid, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/packet/AbstractHttpOverXmpp.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/packet/AbstractHttpOverXmpp.java index fee8eab9b..1a5e88c43 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/packet/AbstractHttpOverXmpp.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/packet/AbstractHttpOverXmpp.java @@ -226,7 +226,7 @@ public abstract class AbstractHttpOverXmpp extends IQ { /** * Returns text of this element. * - * @return text + * @return text TODO javadoc me please */ public String getText() { return text; @@ -270,7 +270,7 @@ public abstract class AbstractHttpOverXmpp extends IQ { /** * Returns text of this element. * - * @return text + * @return text TODO javadoc me please */ public String getText() { return text; @@ -314,7 +314,7 @@ public abstract class AbstractHttpOverXmpp extends IQ { /** * Returns text of this element. * - * @return text + * @return text TODO javadoc me please */ public String getText() { return text; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java index 60fe19445..5805d090a 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java @@ -55,9 +55,9 @@ public abstract class AbstractHttpOverXmppProvider data) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { IoTSetRequest request = new IoTSetRequest(data); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/IoTDataManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/IoTDataManager.java index f686847e2..582fdbf0f 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/IoTDataManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/IoTDataManager.java @@ -164,10 +164,10 @@ public final class IoTDataManager extends IoTManager { * * @param jid the full JID of the thing to read data from. * @return a list with the read out data. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List requestMomentaryValuesReadOut(EntityFullJid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java index 73f7bbc94..9d2d22ee9 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java @@ -211,10 +211,10 @@ public final class IoTDiscoveryManager extends Manager { * Try to find an XMPP IoT registry. * * @return the JID of a Thing Registry if one could be found, null otherwise. - * @throws InterruptedException - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. * @see XEP-0347 § 3.5 Finding Thing Registry */ public Jid findRegistry() @@ -283,10 +283,10 @@ public final class IoTDiscoveryManager extends Manager { * @param metaTags a collection of meta tags used to identify the thing. * @param publicThing if this is a public thing. * @return a {@link IoTClaimed} if successful. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public IoTClaimed claimThing(Jid registry, Collection metaTags, boolean publicThing) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { interactWithRegistry(registry); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/IoTProvisioningManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/IoTProvisioningManager.java index 93622c7af..e89d6b8d1 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/IoTProvisioningManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/IoTProvisioningManager.java @@ -284,7 +284,7 @@ public final class IoTProvisioningManager extends Manager { * Set the configured provisioning server. Use null as provisioningServer to use * automatic discovery of the provisioning server (the default behavior). * - * @param provisioningServer + * @param provisioningServer TODO javadoc me please */ public void setConfiguredProvisioningServer(Jid provisioningServer) { this.configuredProvisioningServer = provisioningServer; @@ -302,10 +302,10 @@ public final class IoTProvisioningManager extends Manager { * Try to find a provisioning server component. * * @return the XMPP address of the provisioning server component if one was found. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-0324 § 3.1.2 Provisioning Server as a server component */ public DomainBareJid findProvisioningServerComponent() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -326,10 +326,10 @@ public final class IoTProvisioningManager extends Manager { * @param provisioningServer the provisioning server to ask. * @param friendInQuestion the JID to ask about. * @return true if the JID is a friend, false otherwise. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isFriend(Jid provisioningServer, BareJid friendInQuestion) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { LruCache cache = negativeFriendshipRequestCache.lookup(provisioningServer); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/element/Range.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/element/Range.java index 312aca703..43e422429 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/element/Range.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_filetransfer/element/Range.java @@ -72,7 +72,7 @@ public class Range implements NamedElement { /** * Return the index of the offset. * This marks the begin of the specified range. - * @return offset + * @return offset TODO javadoc me please */ public int getOffset() { return offset; @@ -80,7 +80,7 @@ public class Range implements NamedElement { /** * Return the length of the range. - * @return length + * @return length TODO javadoc me please */ public int getLength() { return length; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/json/packet/JsonPacketExtension.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/json/packet/JsonPacketExtension.java index 94230e6d2..606544da6 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/json/packet/JsonPacketExtension.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/json/packet/JsonPacketExtension.java @@ -45,7 +45,7 @@ public class JsonPacketExtension extends AbstractJsonPacketExtension { /** * Retrieve the JSON stanza extension from the packet. * - * @param packet + * @param packet TODO javadoc me please * @return the JSON stanza extension or null. */ public static JsonPacketExtension from(Stanza packet) { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java index 692b054fc..6912d8e5d 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java @@ -492,11 +492,11 @@ public final class MamManager extends Manager { * Get the form fields supported by the server. * * @return the list of form fields. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotLoggedInException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotLoggedInException if the XMPP connection is not authenticated. */ public List retrieveFormFields() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { @@ -508,11 +508,11 @@ public final class MamManager extends Manager { * * @param node The PubSub node name, can be null * @return the list of form fields. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotLoggedInException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotLoggedInException if the XMPP connection is not authenticated. */ public List retrieveFormFields(String node) throws NoResponseException, XMPPErrorException, NotConnectedException, @@ -700,10 +700,10 @@ public final class MamManager extends Manager { * * @return true if MAM is supported, falseotherwise. * - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2.1 * @see XEP-0313 § 7. Determining support */ @@ -725,11 +725,11 @@ public final class MamManager extends Manager { * empty. * * @return the ID of the lastest message or {@code null}. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws NotLoggedInException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NotLoggedInException if the XMPP connection is not authenticated. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.3.0 */ public String getMessageUidOfLatestMessage() throws NoResponseException, XMPPErrorException, NotConnectedException, NotLoggedInException, InterruptedException { @@ -750,11 +750,11 @@ public final class MamManager extends Manager { * Get the preferences stored in the server. * * @return the MAM preferences result - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotLoggedInException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotLoggedInException if the XMPP connection is not authenticated. */ public MamPrefsResult retrieveArchivingPreferences() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotLoggedInException { @@ -765,20 +765,20 @@ public final class MamManager extends Manager { /** * Update the preferences in the server. * - * @param alwaysJids + * @param alwaysJids TODO javadoc me please * is the list of JIDs that should always have messages to/from * archived in the user's store - * @param neverJids + * @param neverJids TODO javadoc me please * is the list of JIDs that should never have messages to/from * archived in the user's store - * @param defaultBehavior + * @param defaultBehavior TODO javadoc me please * can be "roster", "always", "never" (see XEP-0313) * @return the MAM preferences result - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotLoggedInException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotLoggedInException if the XMPP connection is not authenticated. * @deprecated use {@link #updateArchivingPreferences(MamPrefs)} instead. */ @Deprecated @@ -793,13 +793,13 @@ public final class MamManager extends Manager { /** * Update the preferences in the server. * - * @param mamPrefs + * @param mamPrefs TODO javadoc me please * @return the currently active preferences after the operation. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotLoggedInException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotLoggedInException if the XMPP connection is not authenticated. * @since 4.3.0 */ public MamPrefsResult updateArchivingPreferences(MamPrefs mamPrefs) throws NoResponseException, XMPPErrorException, diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java index 7f0504611..148f1079b 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java @@ -72,9 +72,9 @@ public class MamElements { /** * MAM result extension constructor. * - * @param queryId - * @param id - * @param forwarded + * @param queryId TODO javadoc me please + * @param id TODO javadoc me please + * @param forwarded TODO javadoc me please */ public MamResultExtension(String queryId, String id, Forwarded forwarded) { if (StringUtils.isEmpty(id)) { @@ -160,7 +160,7 @@ public class MamElements { /** * Always JID list element constructor. * - * @param alwaysJids + * @param alwaysJids TODO javadoc me please */ AlwaysJidListElement(List alwaysJids) { this.alwaysJids = alwaysJids; @@ -194,7 +194,7 @@ public class MamElements { /** * Never JID list element constructor. * - * @param neverJids + * @param neverJids TODO javadoc me please */ public NeverJidListElement(List neverJids) { this.neverJids = neverJids; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamFinIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamFinIQ.java index ca1259f0c..3f6439a70 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamFinIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamFinIQ.java @@ -63,10 +63,10 @@ public class MamFinIQ extends IQ { /** * MamFinIQ constructor. * - * @param queryId - * @param rsmSet - * @param complete - * @param stable + * @param queryId TODO javadoc me please + * @param rsmSet TODO javadoc me please + * @param complete TODO javadoc me please + * @param stable TODO javadoc me please */ public MamFinIQ(String queryId, RSMSet rsmSet, boolean complete, boolean stable) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java index 8d829ec48..b0a3e57e5 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java @@ -79,9 +79,9 @@ public class MamPrefsIQ extends IQ { /** * MAM preferences IQ constructor. * - * @param alwaysJids - * @param neverJids - * @param defaultBehavior + * @param alwaysJids TODO javadoc me please + * @param neverJids TODO javadoc me please + * @param defaultBehavior TODO javadoc me please */ public MamPrefsIQ(List alwaysJids, List neverJids, DefaultBehavior defaultBehavior) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java index 9204ce79b..787de8a37 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java @@ -48,7 +48,7 @@ public class MamQueryIQ extends IQ { /** * MAM query IQ constructor. * - * @param queryId + * @param queryId TODO javadoc me please */ public MamQueryIQ(String queryId) { this(queryId, null, null); @@ -58,7 +58,7 @@ public class MamQueryIQ extends IQ { /** * MAM query IQ constructor. * - * @param form + * @param form TODO javadoc me please */ public MamQueryIQ(DataForm form) { this(null, null, form); @@ -67,8 +67,8 @@ public class MamQueryIQ extends IQ { /** * MAM query IQ constructor. * - * @param queryId - * @param form + * @param queryId TODO javadoc me please + * @param form TODO javadoc me please */ public MamQueryIQ(String queryId, DataForm form) { this(queryId, null, form); @@ -77,9 +77,9 @@ public class MamQueryIQ extends IQ { /** * MAM query IQ constructor. * - * @param queryId - * @param node - * @param dataForm + * @param queryId TODO javadoc me please + * @param node TODO javadoc me please + * @param dataForm TODO javadoc me please */ public MamQueryIQ(String queryId, String node, DataForm dataForm) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/ListElement.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/ListElement.java index 986d0f1f6..499fdaa61 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/ListElement.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/ListElement.java @@ -56,7 +56,7 @@ public class ListElement implements MarkupElement.MarkupChildElement { /** * Return a list of all list entries. * - * @return entries + * @return entries TODO javadoc me please */ public List getEntries() { return entries; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/MarkupElement.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/MarkupElement.java index 9a60073c2..be76e158b 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/MarkupElement.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/MarkupElement.java @@ -51,7 +51,7 @@ public class MarkupElement implements ExtensionElement { /** * Return a list of all child elements. - * @return children + * @return children TODO javadoc me please */ public List getChildElements() { return childElements; @@ -97,7 +97,7 @@ public class MarkupElement implements ExtensionElement { * * @param start start index * @param end end index - * @return builder + * @return builder TODO javadoc me please */ public Builder setDeleted(int start, int end) { return addSpan(start, end, Collections.singleton(SpanElement.SpanStyle.deleted)); @@ -108,7 +108,7 @@ public class MarkupElement implements ExtensionElement { * * @param start start index * @param end end index - * @return builder + * @return builder TODO javadoc me please */ public Builder setEmphasis(int start, int end) { return addSpan(start, end, Collections.singleton(SpanElement.SpanStyle.emphasis)); @@ -119,7 +119,7 @@ public class MarkupElement implements ExtensionElement { * * @param start start index * @param end end index - * @return builder + * @return builder TODO javadoc me please */ public Builder setCode(int start, int end) { return addSpan(start, end, Collections.singleton(SpanElement.SpanStyle.code)); @@ -131,7 +131,7 @@ public class MarkupElement implements ExtensionElement { * @param start start index * @param end end index * @param styles list of text styles for that span - * @return builder + * @return builder TODO javadoc me please */ public Builder addSpan(int start, int end, Set styles) { verifyStartEnd(start, end); @@ -152,7 +152,7 @@ public class MarkupElement implements ExtensionElement { * * @param start start index * @param end end index - * @return builder + * @return builder TODO javadoc me please */ public Builder setBlockQuote(int start, int end) { verifyStartEnd(start, end); @@ -179,7 +179,7 @@ public class MarkupElement implements ExtensionElement { * * @param start start index * @param end end index - * @return builder + * @return builder TODO javadoc me please */ public Builder setCodeBlock(int start, int end) { verifyStartEnd(start, end); @@ -232,7 +232,7 @@ public class MarkupElement implements ExtensionElement { /** * End the list. * - * @return builder + * @return builder TODO javadoc me please */ public Builder endList() { if (entries.size() > 0) { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/SpanElement.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/SpanElement.java index 013c29fbe..74f3adebb 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/SpanElement.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/message_markup/element/SpanElement.java @@ -54,7 +54,7 @@ public class SpanElement implements MarkupElement.MarkupChildElement { /** * Return all styles of this span. * - * @return styles + * @return styles TODO javadoc me please */ public Set getStyles() { return styles; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomConfiguration.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomConfiguration.java index 02c1791c9..aab822087 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomConfiguration.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomConfiguration.java @@ -33,9 +33,9 @@ public class MUCLightRoomConfiguration { /** * MUC Light room configuration model constructor. * - * @param roomName - * @param subject - * @param customConfigs + * @param roomName TODO javadoc me please + * @param subject TODO javadoc me please + * @param customConfigs TODO javadoc me please */ public MUCLightRoomConfiguration(String roomName, String subject, HashMap customConfigs) { this.roomName = roomName; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomInfo.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomInfo.java index f0b9deb07..b41066d54 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomInfo.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MUCLightRoomInfo.java @@ -35,10 +35,10 @@ public class MUCLightRoomInfo { /** * MUC Light room info model constructor. * - * @param version - * @param roomJid - * @param configuration - * @param occupants + * @param version TODO javadoc me please + * @param roomJid TODO javadoc me please + * @param configuration TODO javadoc me please + * @param occupants TODO javadoc me please */ public MUCLightRoomInfo(String version, Jid roomJid, MUCLightRoomConfiguration configuration, HashMap occupants) { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java index 9588c8fa3..aa43bb535 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLight.java @@ -120,10 +120,10 @@ public class MultiUserChatLight { /** * Sends a message to the chat room. * - * @param text + * @param text TODO javadoc me please * the text of the message to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendMessage(String text) throws NotConnectedException, InterruptedException { Message message = createMessage(); @@ -138,10 +138,10 @@ public class MultiUserChatLight { * to the sender's room JID and delivering the message to the intended * recipient's full JID. * - * @param occupant + * @param occupant TODO javadoc me please * occupant unique room JID (e.g. * 'darkcave@macbeth.shakespeare.lit/Paul'). - * @param listener + * @param listener TODO javadoc me please * the listener is a message listener that will handle messages * for the newly created chat. * @return new Chat for sending private messages to a given room occupant. @@ -165,10 +165,10 @@ public class MultiUserChatLight { /** * Sends a Message to the chat room. * - * @param message + * @param message TODO javadoc me please * the message. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendMessage(Message message) throws NotConnectedException, InterruptedException { message.setTo(room); @@ -190,7 +190,7 @@ public class MultiUserChatLight { * block (not return) until a message is available. * * @return the next message. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public Message nextMessage() throws InterruptedException { return messageCollector.nextResult(); @@ -199,11 +199,11 @@ public class MultiUserChatLight { /** * Returns the next available message in the chat. * - * @param timeout + * @param timeout TODO javadoc me please * the maximum amount of time to wait for the next message. * @return the next message, or null if the timeout elapses without a * message becoming available. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public Message nextMessage(long timeout) throws InterruptedException { return messageCollector.nextResult(timeout); @@ -214,7 +214,7 @@ public class MultiUserChatLight { * in the group chat. Only "group chat" messages addressed to this group * chat will be delivered to the listener. * - * @param listener + * @param listener TODO javadoc me please * a stanza listener. * @return true if the listener was not already added. */ @@ -227,7 +227,7 @@ public class MultiUserChatLight { * messages in the MUCLight. Only "group chat" messages addressed to this * MUCLight were being delivered to the listener. * - * @param listener + * @param listener TODO javadoc me please * a stanza listener. * @return true if the listener was removed, otherwise the listener was not * added previously. @@ -256,11 +256,11 @@ public class MultiUserChatLight { /** * Create new MUCLight. * - * @param roomName - * @param subject - * @param customConfigs - * @param occupants - * @throws Exception + * @param roomName TODO javadoc me please + * @param subject TODO javadoc me please + * @param customConfigs TODO javadoc me please + * @param occupants TODO javadoc me please + * @throws Exception TODO javadoc me please */ public void create(String roomName, String subject, HashMap customConfigs, List occupants) throws Exception { @@ -279,9 +279,9 @@ public class MultiUserChatLight { /** * Create new MUCLight. * - * @param roomName - * @param occupants - * @throws Exception + * @param roomName TODO javadoc me please + * @param occupants TODO javadoc me please + * @throws Exception TODO javadoc me please */ public void create(String roomName, List occupants) throws Exception { create(roomName, null, null, occupants); @@ -290,10 +290,10 @@ public class MultiUserChatLight { /** * Leave the MUCLight. * - * @throws NotConnectedException - * @throws InterruptedException - * @throws NoResponseException - * @throws XMPPErrorException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. */ public void leave() throws NotConnectedException, InterruptedException, NoResponseException, XMPPErrorException { HashMap affiliations = new HashMap<>(); @@ -311,12 +311,12 @@ public class MultiUserChatLight { /** * Get the MUC Light info. * - * @param version + * @param version TODO javadoc me please * @return the room info - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public MUCLightRoomInfo getFullInfo(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -333,10 +333,10 @@ public class MultiUserChatLight { * Get the MUC Light info. * * @return the room info - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public MUCLightRoomInfo getFullInfo() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -346,12 +346,12 @@ public class MultiUserChatLight { /** * Get the MUC Light configuration. * - * @param version + * @param version TODO javadoc me please * @return the room configuration - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public MUCLightRoomConfiguration getConfiguration(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -365,10 +365,10 @@ public class MultiUserChatLight { * Get the MUC Light configuration. * * @return the room configuration - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public MUCLightRoomConfiguration getConfiguration() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -378,12 +378,12 @@ public class MultiUserChatLight { /** * Get the MUC Light affiliations. * - * @param version + * @param version TODO javadoc me please * @return the room affiliations - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public HashMap getAffiliations(String version) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -399,10 +399,10 @@ public class MultiUserChatLight { * Get the MUC Light affiliations. * * @return the room affiliations - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public HashMap getAffiliations() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -412,11 +412,11 @@ public class MultiUserChatLight { /** * Change the MUC Light affiliations. * - * @param affiliations - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param affiliations TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void changeAffiliations(HashMap affiliations) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -427,10 +427,10 @@ public class MultiUserChatLight { /** * Destroy the MUC Light. Only will work if it is requested by the owner. * - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void destroy() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCLightDestroyIQ mucLightDestroyIQ = new MUCLightDestroyIQ(room); @@ -445,11 +445,11 @@ public class MultiUserChatLight { /** * Change the subject of the MUC Light. * - * @param subject - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param subject TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void changeSubject(String subject) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -460,11 +460,11 @@ public class MultiUserChatLight { /** * Change the name of the room. * - * @param roomName - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param roomName TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void changeRoomName(String roomName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -475,11 +475,11 @@ public class MultiUserChatLight { /** * Set the room configurations. * - * @param customConfigs - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param customConfigs TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void setRoomConfigs(HashMap customConfigs) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -489,12 +489,12 @@ public class MultiUserChatLight { /** * Set the room configurations. * - * @param roomName - * @param customConfigs - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param roomName TODO javadoc me please + * @param customConfigs TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void setRoomConfigs(String roomName, HashMap customConfigs) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLightManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLightManager.java index e1c7d104b..3013caecc 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLightManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/MultiUserChatLightManager.java @@ -54,7 +54,7 @@ public final class MultiUserChatLightManager extends Manager { /** * Get a instance of a MUC Light manager for the given connection. * - * @param connection + * @param connection TODO javadoc me please * @return a MUCLight manager. */ public static synchronized MultiUserChatLightManager getInstanceFor(XMPPConnection connection) { @@ -79,7 +79,7 @@ public final class MultiUserChatLightManager extends Manager { /** * Obtain the MUC Light. * - * @param jid + * @param jid TODO javadoc me please * @return the MUCLight. */ public synchronized MultiUserChatLight getMultiUserChatLight(EntityBareJid jid) { @@ -103,12 +103,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Returns true if Multi-User Chat Light feature is supported by the server. * - * @param mucLightService + * @param mucLightService TODO javadoc me please * @return true if Multi-User Chat Light feature is supported by the server. - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isFeatureSupported(DomainBareJid mucLightService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -119,12 +119,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Returns a List of the rooms the user occupies. * - * @param mucLightService + * @param mucLightService TODO javadoc me please * @return a List of the rooms the user occupies. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getOccupiedRooms(DomainBareJid mucLightService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -144,10 +144,10 @@ public final class MultiUserChatLightManager extends Manager { * Returns a collection with the XMPP addresses of the MUC Light services. * * @return a collection with the XMPP addresses of the MUC Light services. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getLocalServices() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -158,12 +158,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Get users and rooms blocked. * - * @param mucLightService + * @param mucLightService TODO javadoc me please * @return the list of users and rooms blocked - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getUsersAndRoomsBlocked(DomainBareJid mucLightService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -184,12 +184,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Get rooms blocked. * - * @param mucLightService + * @param mucLightService TODO javadoc me please * @return the list of rooms blocked - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getRoomsBlocked(DomainBareJid mucLightService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -206,12 +206,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Get users blocked. * - * @param mucLightService + * @param mucLightService TODO javadoc me please * @return the list of users blocked - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getUsersBlocked(DomainBareJid mucLightService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -242,12 +242,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Block a room. * - * @param mucLightService - * @param roomJid - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param roomJid TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void blockRoom(DomainBareJid mucLightService, Jid roomJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -259,12 +259,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Block rooms. * - * @param mucLightService - * @param roomsJids - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param roomsJids TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void blockRooms(DomainBareJid mucLightService, List roomsJids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -286,12 +286,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Block a user. * - * @param mucLightService - * @param userJid - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param userJid TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void blockUser(DomainBareJid mucLightService, Jid userJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -303,12 +303,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Block users. * - * @param mucLightService - * @param usersJids - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param usersJids TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void blockUsers(DomainBareJid mucLightService, List usersJids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -330,12 +330,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Unblock a room. * - * @param mucLightService - * @param roomJid - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param roomJid TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void unblockRoom(DomainBareJid mucLightService, Jid roomJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -347,12 +347,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Unblock rooms. * - * @param mucLightService - * @param roomsJids - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param roomsJids TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void unblockRooms(DomainBareJid mucLightService, List roomsJids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -374,12 +374,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Unblock a user. * - * @param mucLightService - * @param userJid - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param userJid TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void unblockUser(DomainBareJid mucLightService, Jid userJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -391,12 +391,12 @@ public final class MultiUserChatLightManager extends Manager { /** * Unblock users. * - * @param mucLightService - * @param usersJids - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param mucLightService TODO javadoc me please + * @param usersJids TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void unblockUsers(DomainBareJid mucLightService, List usersJids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java index 1a817635f..9ca1e3ffe 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java @@ -45,8 +45,8 @@ public class MUCLightAffiliationsIQ extends IQ { /** * MUC Light affiliations response IQ constructor. * - * @param version - * @param affiliations + * @param version TODO javadoc me please + * @param affiliations TODO javadoc me please */ public MUCLightAffiliationsIQ(String version, HashMap affiliations) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightBlockingIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightBlockingIQ.java index 18dd7019d..b18eb762b 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightBlockingIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightBlockingIQ.java @@ -44,8 +44,8 @@ public class MUCLightBlockingIQ extends IQ { /** * MUC Light blocking IQ constructor. * - * @param rooms - * @param users + * @param rooms TODO javadoc me please + * @param users TODO javadoc me please */ public MUCLightBlockingIQ(HashMap rooms, HashMap users) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java index a4cc9e059..d5ab577a9 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java @@ -44,8 +44,8 @@ public class MUCLightChangeAffiliationsIQ extends IQ { /** * MUCLight change affiliations IQ constructor. * - * @param room - * @param affiliations + * @param room TODO javadoc me please + * @param affiliations TODO javadoc me please */ public MUCLightChangeAffiliationsIQ(Jid room, HashMap affiliations) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightConfigurationIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightConfigurationIQ.java index d85f94601..a20a7047d 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightConfigurationIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightConfigurationIQ.java @@ -39,8 +39,8 @@ public class MUCLightConfigurationIQ extends IQ { /** * MUC Light configuration response IQ constructor. * - * @param version - * @param configuration + * @param version TODO javadoc me please + * @param configuration TODO javadoc me please */ public MUCLightConfigurationIQ(String version, MUCLightRoomConfiguration configuration) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java index 29d19fedf..b3c059eae 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java @@ -47,11 +47,11 @@ public class MUCLightCreateIQ extends IQ { /** * MUCLight create IQ constructor. * - * @param room - * @param roomName - * @param subject - * @param customConfigs - * @param occupants + * @param room TODO javadoc me please + * @param roomName TODO javadoc me please + * @param subject TODO javadoc me please + * @param customConfigs TODO javadoc me please + * @param occupants TODO javadoc me please */ public MUCLightCreateIQ(EntityJid room, String roomName, String subject, HashMap customConfigs, List occupants) { @@ -70,9 +70,9 @@ public class MUCLightCreateIQ extends IQ { /** * MUCLight create IQ constructor. * - * @param room - * @param roomName - * @param occupants + * @param room TODO javadoc me please + * @param roomName TODO javadoc me please + * @param occupants TODO javadoc me please */ public MUCLightCreateIQ(EntityJid room, String roomName, List occupants) { this(room, roomName, null, null, occupants); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java index 2ce6c1e7b..8198007cf 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java @@ -36,7 +36,7 @@ public class MUCLightDestroyIQ extends IQ { /** * MUC Light destroy IQ constructor. * - * @param roomJid + * @param roomJid TODO javadoc me please */ public MUCLightDestroyIQ(Jid roomJid) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightElements.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightElements.java index 098d10ecf..4365a7e18 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightElements.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightElements.java @@ -137,11 +137,11 @@ public abstract class MUCLightElements { /** * Configurations change extension constructor. * - * @param prevVersion - * @param version - * @param roomName - * @param subject - * @param customConfigs + * @param prevVersion TODO javadoc me please + * @param version TODO javadoc me please + * @param roomName TODO javadoc me please + * @param subject TODO javadoc me please + * @param customConfigs TODO javadoc me please */ public ConfigurationsChangeExtension(String prevVersion, String version, String roomName, String subject, HashMap customConfigs) { @@ -248,7 +248,7 @@ public abstract class MUCLightElements { /** * Configuration element constructor. * - * @param configuration + * @param configuration TODO javadoc me please */ public ConfigurationElement(MUCLightRoomConfiguration configuration) { this.configuration = configuration; @@ -289,7 +289,7 @@ public abstract class MUCLightElements { /** * Occupants element constructor. * - * @param occupants + * @param occupants TODO javadoc me please */ public OccupantsElement(HashMap occupants) { this.occupants = occupants; @@ -326,8 +326,8 @@ public abstract class MUCLightElements { /** * User with affiliations element constructor. * - * @param user - * @param affiliation + * @param user TODO javadoc me please + * @param affiliation TODO javadoc me please */ public UserWithAffiliationElement(Jid user, MUCLightAffiliation affiliation) { this.user = user; @@ -362,9 +362,9 @@ public abstract class MUCLightElements { /** * Blocking element constructor. * - * @param jid - * @param allow - * @param isRoom + * @param jid TODO javadoc me please + * @param allow TODO javadoc me please + * @param isRoom TODO javadoc me please */ public BlockingElement(Jid jid, Boolean allow, Boolean isRoom) { this.jid = jid; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java index c3c611a04..67cd26481 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java @@ -38,8 +38,8 @@ public class MUCLightGetAffiliationsIQ extends IQ { /** * MUC Light get affiliations IQ constructor. * - * @param roomJid - * @param version + * @param roomJid TODO javadoc me please + * @param version TODO javadoc me please */ public MUCLightGetAffiliationsIQ(Jid roomJid, String version) { super(ELEMENT, NAMESPACE); @@ -51,7 +51,7 @@ public class MUCLightGetAffiliationsIQ extends IQ { /** * MUC Light get affiliations IQ constructor. * - * @param roomJid + * @param roomJid TODO javadoc me please */ public MUCLightGetAffiliationsIQ(Jid roomJid) { this(roomJid, null); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java index fc26e1484..15ce3e1f9 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java @@ -38,8 +38,8 @@ public class MUCLightGetConfigsIQ extends IQ { /** * MUC Light get configurations IQ constructor. * - * @param roomJid - * @param version + * @param roomJid TODO javadoc me please + * @param version TODO javadoc me please */ public MUCLightGetConfigsIQ(Jid roomJid, String version) { super(ELEMENT, NAMESPACE); @@ -51,7 +51,7 @@ public class MUCLightGetConfigsIQ extends IQ { /** * MUC Light get configurations IQ constructor. * - * @param roomJid + * @param roomJid TODO javadoc me please */ public MUCLightGetConfigsIQ(Jid roomJid) { this(roomJid, null); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java index 8874d7ba5..112ec1935 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java @@ -38,8 +38,8 @@ public class MUCLightGetInfoIQ extends IQ { /** * MUC Light get info IQ constructor. * - * @param roomJid - * @param version + * @param roomJid TODO javadoc me please + * @param version TODO javadoc me please */ public MUCLightGetInfoIQ(Jid roomJid, String version) { super(ELEMENT, NAMESPACE); @@ -51,7 +51,7 @@ public class MUCLightGetInfoIQ extends IQ { /** * MUC Light get info IQ constructor. * - * @param roomJid + * @param roomJid TODO javadoc me please */ public MUCLightGetInfoIQ(Jid roomJid) { this(roomJid, null); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightInfoIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightInfoIQ.java index 2a9736422..c737453ef 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightInfoIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightInfoIQ.java @@ -46,9 +46,9 @@ public class MUCLightInfoIQ extends IQ { /** * MUCLight info response IQ constructor. * - * @param version - * @param configuration - * @param occupants + * @param version TODO javadoc me please + * @param configuration TODO javadoc me please + * @param occupants TODO javadoc me please */ public MUCLightInfoIQ(String version, MUCLightRoomConfiguration configuration, HashMap occupants) { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java index b481b64b9..0751b582f 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java @@ -44,10 +44,10 @@ public class MUCLightSetConfigsIQ extends IQ { /** * MUC Light set configuration IQ constructor. * - * @param roomJid - * @param roomName - * @param subject - * @param customConfigs + * @param roomJid TODO javadoc me please + * @param roomName TODO javadoc me please + * @param subject TODO javadoc me please + * @param customConfigs TODO javadoc me please */ public MUCLightSetConfigsIQ(Jid roomJid, String roomName, String subject, HashMap customConfigs) { super(ELEMENT, NAMESPACE); @@ -61,9 +61,9 @@ public class MUCLightSetConfigsIQ extends IQ { /** * MUC Light set configuration IQ constructor. * - * @param roomJid - * @param roomName - * @param customConfigs + * @param roomJid TODO javadoc me please + * @param roomName TODO javadoc me please + * @param customConfigs TODO javadoc me please */ public MUCLightSetConfigsIQ(Jid roomJid, String roomName, HashMap customConfigs) { this(roomJid, roomName, null, customConfigs); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/PushNotificationsManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/PushNotificationsManager.java index a95a21c4b..9c5cbb2f2 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/PushNotificationsManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/PushNotificationsManager.java @@ -61,7 +61,7 @@ public final class PushNotificationsManager extends Manager { /** * Get the singleton instance of PushNotificationsManager. * - * @param connection + * @param connection TODO javadoc me please * @return the instance of PushNotificationsManager */ public static synchronized PushNotificationsManager getInstanceFor(XMPPConnection connection) { @@ -83,10 +83,10 @@ public final class PushNotificationsManager extends Manager { * Returns true if Push Notifications are supported by this account. * * @return true if Push Notifications are supported by this account. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2.2 */ public boolean isSupported() @@ -98,13 +98,13 @@ public final class PushNotificationsManager extends Manager { /** * Enable push notifications. * - * @param pushJid - * @param node + * @param pushJid TODO javadoc me please + * @param node TODO javadoc me please * @return true if it was successfully enabled, false if not - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean enable(Jid pushJid, String node) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -114,14 +114,14 @@ public final class PushNotificationsManager extends Manager { /** * Enable push notifications. * - * @param pushJid - * @param node - * @param publishOptions + * @param pushJid TODO javadoc me please + * @param node TODO javadoc me please + * @param publishOptions TODO javadoc me please * @return true if it was successfully enabled, false if not - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean enable(Jid pushJid, String node, HashMap publishOptions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -133,12 +133,12 @@ public final class PushNotificationsManager extends Manager { /** * Disable all push notifications. * - * @param pushJid + * @param pushJid TODO javadoc me please * @return true if it was successfully disabled, false if not - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean disableAll(Jid pushJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -148,13 +148,13 @@ public final class PushNotificationsManager extends Manager { /** * Disable push notifications of an specific node. * - * @param pushJid - * @param node + * @param pushJid TODO javadoc me please + * @param node TODO javadoc me please * @return true if it was successfully disabled, false if not - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean disable(Jid pushJid, String node) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/reference/element/ReferenceElement.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/reference/element/ReferenceElement.java index 8519e5def..cf0f5492b 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/reference/element/ReferenceElement.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/reference/element/ReferenceElement.java @@ -56,12 +56,12 @@ public class ReferenceElement implements ExtensionElement { /** * XEP-incompliant (v0.2) constructor. This is needed for SIMS. * - * @param begin - * @param end - * @param type - * @param anchor - * @param uri - * @param child + * @param begin TODO javadoc me please + * @param end TODO javadoc me please + * @param type TODO javadoc me please + * @param anchor TODO javadoc me please + * @param uri TODO javadoc me please + * @param child TODO javadoc me please */ public ReferenceElement(Integer begin, Integer end, Type type, String anchor, URI uri, ExtensionElement child) { if (begin != null && begin < 0) { @@ -89,11 +89,11 @@ public class ReferenceElement implements ExtensionElement { /** * XEP-Compliant constructor. * - * @param begin - * @param end - * @param type - * @param anchor - * @param uri + * @param begin TODO javadoc me please + * @param end TODO javadoc me please + * @param type TODO javadoc me please + * @param anchor TODO javadoc me please + * @param uri TODO javadoc me please */ public ReferenceElement(Integer begin, Integer end, Type type, String anchor, URI uri) { this(begin, end, type, anchor, uri, null); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/StableUniqueStanzaIdManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/StableUniqueStanzaIdManager.java index 3afd41632..c2674de64 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/StableUniqueStanzaIdManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/StableUniqueStanzaIdManager.java @@ -66,7 +66,7 @@ public final class StableUniqueStanzaIdManager extends Manager { /** * Private constructor. - * @param connection + * @param connection TODO javadoc me please */ private StableUniqueStanzaIdManager(XMPPConnection connection) { super(connection); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/element/OriginIdElement.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/element/OriginIdElement.java index f7fb1a623..4291084bb 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/element/OriginIdElement.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/sid/element/OriginIdElement.java @@ -37,6 +37,7 @@ public class OriginIdElement extends StableAndUniqueIdElement { * Add an origin-id element to a message and set the stanzas id to the same id as in the origin-id element. * * @param message message. + * @return the added origin-id element. */ public static OriginIdElement addOriginId(Message message) { OriginIdElement originId = new OriginIdElement(); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/spoiler/SpoilerManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/spoiler/SpoilerManager.java index a18654cc3..0366913ca 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/spoiler/SpoilerManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/spoiler/SpoilerManager.java @@ -60,7 +60,7 @@ public final class SpoilerManager extends Manager { * Return the connections instance of the SpoilerManager. * * @param connection xmpp connection - * @return SpoilerManager + * @return SpoilerManager TODO javadoc me please */ public static synchronized SpoilerManager getInstanceFor(XMPPConnection connection) { SpoilerManager manager = INSTANCES.get(connection); diff --git a/smack-experimental/src/test/java/org/jivesoftware/smackx/reference/ReferenceTest.java b/smack-experimental/src/test/java/org/jivesoftware/smackx/reference/ReferenceTest.java index b53eff5e4..84106e0a6 100644 --- a/smack-experimental/src/test/java/org/jivesoftware/smackx/reference/ReferenceTest.java +++ b/smack-experimental/src/test/java/org/jivesoftware/smackx/reference/ReferenceTest.java @@ -57,7 +57,7 @@ public class ReferenceTest extends SmackTestSuite { /** * TODO: The uri might not be following the XMPP schema. * That shouldn't matter though. - * @throws Exception + * @throws Exception if an exception occurs. */ @Test public void providerDataTest() throws Exception { diff --git a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/GroupChatInvitationTest.java b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/GroupChatInvitationTest.java index cb6ad1716..c2bd1c4e1 100644 --- a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/GroupChatInvitationTest.java +++ b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/GroupChatInvitationTest.java @@ -34,7 +34,7 @@ public class GroupChatInvitationTest extends SmackTestCase { /** * Constructor for GroupChatInvitationTest. - * @param arg0 + * @param arg0 TODO javadoc me please */ public GroupChatInvitationTest(String arg0) { super(arg0); diff --git a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeManagerTest.java b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeManagerTest.java index a5589e43a..378ccc4f4 100644 --- a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeManagerTest.java +++ b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeManagerTest.java @@ -35,7 +35,7 @@ public class RosterExchangeManagerTest extends SmackTestCase { /** * Constructor for RosterExchangeManagerTest. - * @param name + * @param name TODO javadoc me please */ public RosterExchangeManagerTest(String name) { super(name); diff --git a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLManagerTest.java b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLManagerTest.java index 00e52c040..1d104adfa 100644 --- a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLManagerTest.java +++ b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLManagerTest.java @@ -36,7 +36,7 @@ public class XHTMLManagerTest extends SmackTestCase { /** * Constructor for XHTMLManagerTest. - * @param name + * @param name TODO javadoc me please */ public XHTMLManagerTest(String name) { super(name); diff --git a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java index 7ea04dafb..28609c9b2 100644 --- a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java +++ b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java @@ -48,7 +48,7 @@ public class Socks5ByteStreamTest extends SmackTestCase { /** * Constructor * - * @param arg0 + * @param arg0 TODO javadoc me please */ public Socks5ByteStreamTest(String arg0) { super(arg0); diff --git a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java index 6789b149c..06baae159 100644 --- a/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java +++ b/smack-extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java @@ -36,7 +36,7 @@ public class MultiUserChatCreationTest extends SmackTestCase { /** * Constructor for MultiUserChatCreationTest. - * @param arg0 + * @param arg0 TODO javadoc me please */ public MultiUserChatCreationTest(String arg0) { super(arg0); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java b/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java index 7febfc016..4066b1d4d 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smack/chat2/ChatManager.java @@ -264,7 +264,7 @@ public final class ChatManager extends Manager { /** * Also notify about messages containing XHTML-IM. * - * @param xhtmlIm + * @param xhtmlIm TODO javadoc me please */ public void setXhmtlImEnabled(boolean xhtmlIm) { this.xhtmlIm = xhtmlIm; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java index 30d83b53d..d9d7131b4 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/address/MultipleRecipientManager.java @@ -67,8 +67,8 @@ public class MultipleRecipientManager { * @throws XMPPErrorException if server does not support XEP-33: Extended Stanza Addressing and * some XEP-33 specific features were requested. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static void send(XMPPConnection connection, Stanza packet, Collection to, Collection cc, Collection bcc) throws NoResponseException, XMPPErrorException, @@ -98,8 +98,8 @@ public class MultipleRecipientManager { * @throws NoResponseException if there was no response from the server. * @throws FeatureNotSupportedException if special XEP-33 features where requested, but the * server does not support them. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static void send(XMPPConnection connection, Stanza packet, Collection to, Collection cc, Collection bcc, Jid replyTo, Jid replyRoom, boolean noReply) throws NoResponseException, XMPPErrorException, FeatureNotSupportedException, NotConnectedException, InterruptedException { @@ -139,11 +139,11 @@ public class MultipleRecipientManager { * @param connection the connection to use to send the reply. * @param original the previously received stanza that was sent to multiple recipients. * @param reply the new message to send as a reply. - * @throws XMPPErrorException - * @throws InterruptedException - * @throws NotConnectedException - * @throws FeatureNotSupportedException - * @throws NoResponseException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws FeatureNotSupportedException if a requested feature is not supported by the remote entity. + * @throws NoResponseException if there was no response from the remote entity. */ public static void reply(XMPPConnection connection, Message original, Message reply) throws XMPPErrorException, InterruptedException, NotConnectedException, NoResponseException, FeatureNotSupportedException { @@ -280,9 +280,9 @@ public class MultipleRecipientManager { * queried. * @return the address of the multiple recipients service or null if none was found. * @throws NoResponseException if there was no response from the server. - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private static DomainBareJid getMultipleRecipientServiceAddress(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPDeliverCondition.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPDeliverCondition.java index 27b5e0689..7fe6c16c1 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPDeliverCondition.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPDeliverCondition.java @@ -31,10 +31,10 @@ public class AMPDeliverCondition implements AMPExtension.Condition { * Check if server supports deliver condition. * @param connection Smack connection instance * @return true if deliver condition is supported. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return AMPManager.isConditionSupported(connection, NAME); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPExpireAtCondition.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPExpireAtCondition.java index 7f9523329..854b6e44e 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPExpireAtCondition.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPExpireAtCondition.java @@ -36,10 +36,10 @@ public class AMPExpireAtCondition implements AMPExtension.Condition { * Check if server supports expire-at condition. * @param connection Smack connection instance * @return true if expire-at condition is supported. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return AMPManager.isConditionSupported(connection, NAME); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java index 6da679901..73966e869 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java @@ -85,10 +85,10 @@ public class AMPManager { * @param connection active xmpp connection * @param action action to check * @return true if this action is supported. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String featureName = AMPExtension.NAMESPACE + "?action=" + action.toString(); @@ -100,10 +100,10 @@ public class AMPManager { * @param connection active xmpp connection * @param conditionName name of condition to check * @return true if this condition is supported. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see AMPDeliverCondition * @see AMPExpireAtCondition * @see AMPMatchResourceCondition diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPMatchResourceCondition.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPMatchResourceCondition.java index ef443b203..3734e7f8c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPMatchResourceCondition.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPMatchResourceCondition.java @@ -31,10 +31,10 @@ public class AMPMatchResourceCondition implements AMPExtension.Condition { * Check if server supports match-resource condition. * @param connection Smack connection instance * @return true if match-resource condition is supported. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return AMPManager.isConditionSupported(connection, NAME); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/provider/AMPExtensionProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/provider/AMPExtensionProvider.java index 01fb81574..b503c9850 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/provider/AMPExtensionProvider.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/provider/AMPExtensionProvider.java @@ -38,8 +38,8 @@ public class AMPExtensionProvider extends ExtensionElementProvider * * @param parser the XML parser, positioned at the starting element of the extension. * @return a PacketExtension. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public AMPExtension parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/BlockingCommandManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/BlockingCommandManager.java index b60d1ab3e..24febb821 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/BlockingCommandManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/BlockingCommandManager.java @@ -72,7 +72,7 @@ public final class BlockingCommandManager extends Manager { /** * Get the singleton instance of BlockingCommandManager. * - * @param connection + * @param connection TODO javadoc me please * @return the instance of BlockingCommandManager */ public static synchronized BlockingCommandManager getInstanceFor(XMPPConnection connection) { @@ -161,10 +161,10 @@ public final class BlockingCommandManager extends Manager { * Returns true if Blocking Command is supported by the server. * * @return true if Blocking Command is supported by the server. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isSupportedByServer() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -175,10 +175,10 @@ public final class BlockingCommandManager extends Manager { * Returns the block list. * * @return the blocking list - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getBlockList() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -195,11 +195,11 @@ public final class BlockingCommandManager extends Manager { /** * Block contacts. * - * @param jids - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param jids TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void blockContacts(List jids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -210,11 +210,11 @@ public final class BlockingCommandManager extends Manager { /** * Unblock contacts. * - * @param jids - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @param jids TODO javadoc me please + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void unblockContacts(List jids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -225,10 +225,10 @@ public final class BlockingCommandManager extends Manager { /** * Unblock all. * - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void unblockAll() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java index c6ef8ae78..39cb9525b 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java @@ -49,7 +49,7 @@ public class BlockContactsIQ extends IQ { /** * Block list IQ constructor. * - * @param jids + * @param jids TODO javadoc me please */ public BlockContactsIQ(List jids) { super(ELEMENT, NAMESPACE); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockListIQ.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockListIQ.java index 755956fa5..0f1d618ae 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockListIQ.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockListIQ.java @@ -50,7 +50,7 @@ public class BlockListIQ extends IQ { /** * Block list IQ constructor. * - * @param jids + * @param jids TODO javadoc me please */ public BlockListIQ(List jids) { super(ELEMENT, NAMESPACE); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockedErrorExtension.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockedErrorExtension.java index a01c83d99..11ec3cd9f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockedErrorExtension.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockedErrorExtension.java @@ -65,7 +65,7 @@ public class BlockedErrorExtension implements ExtensionElement { * message was blocked because the JID blocked the sender, and that was * reflected back as an error message. * - * @param message + * @param message TODO javadoc me please * @return true if the message contains a BlockedErrorExtension, false if * not */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java index 9c2b22ff9..e0a28f722 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java @@ -50,7 +50,7 @@ public class UnblockContactsIQ extends IQ { /** * Unblock contacts IQ constructor. * - * @param jids + * @param jids TODO javadoc me please */ public UnblockContactsIQ(List jids) { super(ELEMENT, NAMESPACE); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBData.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBData.java index cc981c1ee..654e120d8 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBData.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBData.java @@ -42,9 +42,9 @@ public class BoBData { /** * BoB data constructor. * - * @param type - * @param content - * @param maxAge + * @param type TODO javadoc me please + * @param content TODO javadoc me please + * @param maxAge TODO javadoc me please */ public BoBData(String type, byte[] content, int maxAge) { this.type = type; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBHash.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBHash.java index 2480390a9..8175de8be 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBHash.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBHash.java @@ -35,8 +35,8 @@ public class BoBHash { /** * BoB hash constructor. * - * @param hash - * @param hashType + * @param hash TODO javadoc me please + * @param hashType TODO javadoc me please */ public BoBHash(String hash, String hashType) { this.hash = StringUtils.requireNotNullNorEmpty(hash, "hash must not be null nor empty"); @@ -97,7 +97,7 @@ public class BoBHash { /** * Get BoB hash from src attribute string. * - * @param src + * @param src TODO javadoc me please * @return the BoB hash */ public static BoBHash fromSrc(String src) { @@ -109,7 +109,7 @@ public class BoBHash { /** * Get BoB hash from cid attribute string. * - * @param cid + * @param cid TODO javadoc me please * @return the BoB hash */ public static BoBHash fromCid(String cid) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBManager.java index 66163cbb5..b3ac970d2 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/BoBManager.java @@ -68,7 +68,7 @@ public final class BoBManager extends Manager { /** * Get the singleton instance of BoBManager. * - * @param connection + * @param connection TODO javadoc me please * @return the instance of BoBManager */ public static synchronized BoBManager getInstanceFor(XMPPConnection connection) { @@ -115,10 +115,10 @@ public final class BoBManager extends Manager { * Returns true if Bits of Binary is supported by the server. * * @return true if Bits of Binary is supported by the server. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isSupportedByServer() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -128,14 +128,14 @@ public final class BoBManager extends Manager { /** * Request BoB data. * - * @param to - * @param bobHash + * @param to TODO javadoc me please + * @param bobHash TODO javadoc me please * @return the BoB data - * @throws NotLoggedInException - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotLoggedInException if the XMPP connection is not authenticated. + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public BoBData requestBoB(Jid to, BoBHash bobHash) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBExtension.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBExtension.java index 58c9cb2df..bd13c6513 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBExtension.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBExtension.java @@ -39,9 +39,9 @@ public class BoBExtension extends XHTMLExtension { /** * Bits of Binary extension constructor. * - * @param bobHash - * @param alt - * @param paragraph + * @param bobHash TODO javadoc me please + * @param alt TODO javadoc me please + * @param paragraph TODO javadoc me please */ public BoBExtension(BoBHash bobHash, String alt, String paragraph) { this.bobHash = bobHash; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBIQ.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBIQ.java index 56bfddc3d..b79d5d145 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBIQ.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBIQ.java @@ -47,8 +47,8 @@ public class BoBIQ extends IQ { /** * Bits of Binary IQ constructor. * - * @param bobHash - * @param bobData + * @param bobHash TODO javadoc me please + * @param bobData TODO javadoc me please */ public BoBIQ(BoBHash bobHash, BoBData bobData) { super(ELEMENT, NAMESPACE); @@ -59,7 +59,7 @@ public class BoBIQ extends IQ { /** * Bits of Binary IQ constructor. * - * @param bobHash + * @param bobHash TODO javadoc me please */ public BoBIQ(BoBHash bobHash) { this(bobHash, null); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bookmarks/BookmarkManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bookmarks/BookmarkManager.java index e56e9c566..fe8323953 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bookmarks/BookmarkManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bookmarks/BookmarkManager.java @@ -87,10 +87,10 @@ public final class BookmarkManager { * Returns all currently bookmarked conferences. * * @return returns all currently bookmarked conferences - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see BookmarkedConference */ public List getBookmarkedConferences() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -109,8 +109,8 @@ public final class BookmarkManager { * @throws XMPPErrorException thrown when there is an issue retrieving the current bookmarks from * the server. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void addBookmarkedConference(String name, EntityBareJid jid, boolean isAutoJoin, Resourcepart nickname, String password) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -141,8 +141,8 @@ public final class BookmarkManager { * @throws XMPPErrorException thrown when there is a problem with the connection attempting to * retrieve the bookmarks or persist the bookmarks. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @throws IllegalArgumentException thrown when the conference being removed is a shared * conference */ @@ -168,8 +168,8 @@ public final class BookmarkManager { * @return returns an unmodifiable collection of all bookmarked urls. * @throws XMPPErrorException thrown when there is a problem retriving bookmarks from the server. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getBookmarkedURLs() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { retrieveBookmarks(); @@ -185,8 +185,8 @@ public final class BookmarkManager { * @throws XMPPErrorException thrown when there is an error retriving or saving bookmarks from or to * the server * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void addBookmarkedURL(String URL, String name, boolean isRSS) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { retrieveBookmarks(); @@ -213,8 +213,8 @@ public final class BookmarkManager { * @throws XMPPErrorException thrown if there is an error retriving or saving bookmarks from or to * the server. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void removeBookmarkedURL(String bookmarkURL) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { retrieveBookmarks(); @@ -236,10 +236,10 @@ public final class BookmarkManager { * Check if the service supports bookmarks using private data. * * @return true if the service supports private data, false otherwise. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. * @see PrivateDataManager#isSupported() * @since 4.2 */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/BytestreamRequest.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/BytestreamRequest.java index 059e11187..67e59b8d5 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/BytestreamRequest.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/BytestreamRequest.java @@ -57,17 +57,17 @@ public interface BytestreamRequest { * @throws XMPPErrorException if an error occurred while accepting the bytestream request * @throws InterruptedException if the thread was interrupted while waiting in a blocking * operation - * @throws NotConnectedException - * @throws CouldNotConnectToAnyProvidedSocks5Host - * @throws NoSocks5StreamHostsProvided + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws CouldNotConnectToAnyProvidedSocks5Host if no connection to any provided stream host could be established + * @throws NoSocks5StreamHostsProvided if no stream host was provided. */ BytestreamSession accept() throws InterruptedException, XMPPErrorException, CouldNotConnectToAnyProvidedSocks5Host, NotConnectedException, NoSocks5StreamHostsProvided; /** * Rejects the bytestream request by sending a reject error to the initiator. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ void reject() throws NotConnectedException, InterruptedException; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java index 148a6a676..c54d02e17 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java @@ -401,7 +401,7 @@ public final class InBandBytestreamManager extends Manager implements Bytestream * @throws XMPPException if the user doesn't support or accept in-band bytestreams, or if the * user prefers smaller block sizes * @throws SmackException if there was no response from the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ @Override public InBandBytestreamSession establishSession(Jid targetJID) throws XMPPException, SmackException, InterruptedException { @@ -419,8 +419,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream * @throws XMPPErrorException if the user doesn't support or accept in-band bytestreams, or if the * user prefers smaller block sizes * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public InBandBytestreamSession establishSession(Jid targetJID, String sessionID) @@ -445,8 +445,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream * not accepted. * * @param request IQ stanza that should be answered with a not-acceptable error - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void replyRejectPacket(IQ request) throws NotConnectedException, InterruptedException { IQ error = IQ.createErrorResponse(request, StanzaError.Condition.not_acceptable); @@ -458,8 +458,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream * request is rejected because its block size is greater than the maximum allowed block size. * * @param request IQ stanza that should be answered with a resource-constraint error - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void replyResourceConstraintPacket(IQ request) throws NotConnectedException, InterruptedException { IQ error = IQ.createErrorResponse(request, StanzaError.Condition.resource_constraint); @@ -471,8 +471,8 @@ public final class InBandBytestreamManager extends Manager implements Bytestream * session could not be found. * * @param request IQ stanza that should be answered with a item-not-found error - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void replyItemNotFoundPacket(IQ request) throws NotConnectedException, InterruptedException { IQ error = IQ.createErrorResponse(request, StanzaError.Condition.item_not_found); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequest.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequest.java index b4c0f0ea3..813fbde5b 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequest.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequest.java @@ -72,8 +72,8 @@ public class InBandBytestreamRequest implements BytestreamRequest { * send/receive data. * * @return the session to send/receive data - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public InBandBytestreamSession accept() throws NotConnectedException, InterruptedException { @@ -94,8 +94,8 @@ public class InBandBytestreamRequest implements BytestreamRequest { /** * Rejects the In-Band Bytestream request by sending a reject error to the * initiator. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public void reject() throws NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java index 3a457797e..0b98123dc 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java @@ -168,8 +168,8 @@ public class InBandBytestreamSession implements BytestreamSession { * This method is invoked if a request to close the In-Band Bytestream has been received. * * @param closeRequest the close request from the remote peer - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void closeByPeer(Close closeRequest) throws NotConnectedException, InterruptedException { @@ -636,8 +636,8 @@ public class InBandBytestreamSession implements BytestreamSession { * * @param data the data packet * @throws IOException if an I/O error occurred while sending or if the stream is closed - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected abstract void writeToXML(DataPacketExtension data) throws IOException, NotConnectedException, InterruptedException; @@ -846,10 +846,10 @@ public class InBandBytestreamSession implements BytestreamSession { /** * Process IQ stanza. - * @param data - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotLoggedInException + * @param data TODO javadoc me please + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotLoggedInException if the XMPP connection is not authenticated. */ public void processIQPacket(Data data) throws NotConnectedException, InterruptedException, NotLoggedInException { inputStream.dataPacketListener.processStanza(data); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java index 24e4fad16..7b8acc674 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java @@ -392,7 +392,7 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream /** * Set whether or not the bytestream manager will annouce the local stream host(s), i.e. the local SOCKS5 proxy. * - * @param announceLocalStreamHost + * @param announceLocalStreamHost TODO javadoc me please * @see #isAnnouncingLocalStreamHostEnabled() * @since 4.4.0 */ @@ -435,11 +435,11 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream * @return the Socket to send/receive data to/from the user * @throws IOException if the bytestream could not be established * @throws InterruptedException if the current thread was interrupted while waiting - * @throws XMPPException - * @throws NotConnectedException - * @throws NoResponseException - * @throws SmackMessageException - * @throws FeatureNotSupportedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoResponseException if there was no response from the remote entity. + * @throws SmackMessageException if there was an error. + * @throws FeatureNotSupportedException if a requested feature is not supported by the remote entity. */ @Override public Socks5BytestreamSession establishSession(Jid targetJID, String sessionID) @@ -540,10 +540,10 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream * @param targetJID the target JID * @return true if the given target JID supports feature SOCKS5 Bytestream * otherwise false - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private boolean supportsSocks5(Jid targetJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(targetJID, Bytestream.NAMESPACE); @@ -556,8 +556,8 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream * @return list of JIDs of SOCKS5 proxies * @throws XMPPErrorException if there was an error querying the XMPP server for SOCKS5 proxies * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List determineProxies() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { XMPPConnection connection = connection(); @@ -714,8 +714,8 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream *

* * @param packet Stanza that should be answered with a not-acceptable error - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void replyRejectPacket(IQ packet) throws NotConnectedException, InterruptedException { StanzaError.Builder xmppError = StanzaError.getBuilder(StanzaError.Condition.not_acceptable); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamRequest.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamRequest.java index 1dda14dd5..41669b52e 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamRequest.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamRequest.java @@ -224,10 +224,10 @@ public class Socks5BytestreamRequest implements BytestreamRequest { * * @return the socket to send/receive data * @throws InterruptedException if the current thread was interrupted while waiting - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws CouldNotConnectToAnyProvidedSocks5Host - * @throws NoSocks5StreamHostsProvided + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws CouldNotConnectToAnyProvidedSocks5Host if no connection to any provided stream host could be established + * @throws NoSocks5StreamHostsProvided if no stream host was provided. */ @Override public Socks5BytestreamSession accept() throws InterruptedException, XMPPErrorException, @@ -299,8 +299,8 @@ public class Socks5BytestreamRequest implements BytestreamRequest { /** * Rejects the SOCKS5 Bytestream request by sending a reject error to the initiator. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public void reject() throws NotConnectedException, InterruptedException { @@ -312,10 +312,10 @@ public class Socks5BytestreamRequest implements BytestreamRequest { * XMPP exception. * * @param streamHosts the stream hosts. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @throws CouldNotConnectToAnyProvidedSocks5Host as expected result. - * @throws NoSocks5StreamHostsProvided + * @throws NoSocks5StreamHostsProvided if no stream host was provided. */ private void cancelRequest(Map streamHostsExceptions) throws NotConnectedException, InterruptedException, CouldNotConnectToAnyProvidedSocks5Host, NoSocks5StreamHostsProvided { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Client.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Client.java index d5350d4a5..fb7368576 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Client.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Client.java @@ -78,10 +78,10 @@ public class Socks5Client { * @throws IOException if initializing the socket failed due to a network error * @throws TimeoutException if connecting to SOCKS5 proxy timed out * @throws InterruptedException if the current thread was interrupted while waiting - * @throws XMPPException - * @throws SmackMessageException - * @throws NotConnectedException - * @throws NoResponseException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackMessageException if there was an error. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoResponseException if there was no response from the remote entity. */ public Socket getSocket(int timeout) throws IOException, InterruptedException, TimeoutException, XMPPException, SmackMessageException, NotConnectedException, NoResponseException { @@ -130,8 +130,8 @@ public class Socks5Client { * supported by the Socks5Client. * * @param socket connected to a SOCKS5 proxy - * @throws IOException - * @throws SmackMessageException + * @throws IOException if an I/O error occured. + * @throws SmackMessageException if there was an error. */ protected void establish(Socket socket) throws IOException, SmackMessageException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiator.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiator.java index adca9931f..8fc609c3d 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiator.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiator.java @@ -107,10 +107,10 @@ public class Socks5ClientForInitiator extends Socks5Client { /** * Activates the SOCKS5 Bytestream by sending an XMPP SOCKS5 Bytestream activation stanza to the * SOCKS5 proxy. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private void activate() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Bytestream activate = createStreamHostActivation(); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java index fec1bd113..88e7abfe2 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java @@ -230,6 +230,8 @@ public class Socks5Proxy { /** * Starts the local SOCKS5 proxy server. If it is already running, this method does nothing. + * + * @return the server socket. */ public synchronized ServerSocket start() { if (isRunning()) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java index 5fe1e0260..8d9b0df7f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java @@ -166,7 +166,7 @@ public final class EntityCapsManager extends Manager { /** * Set the default entity node that will be used for new EntityCapsManagers. * - * @param entityNode + * @param entityNode TODO javadoc me please */ public static void setDefaultEntityNode(String entityNode) { DEFAULT_ENTITY_NODE = entityNode; @@ -175,10 +175,10 @@ public final class EntityCapsManager extends Manager { /** * Add DiscoverInfo to the database. * - * @param nodeVer + * @param nodeVer TODO javadoc me please * The node and verification String (e.g. * "http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w="). - * @param info + * @param info TODO javadoc me please * DiscoverInfo for the specified node. */ static void addDiscoverInfoByNode(String nodeVer, DiscoverInfo info) { @@ -192,7 +192,7 @@ public final class EntityCapsManager extends Manager { * Get the Node version (node#ver) of a JID. Returns a String or null if * EntiyCapsManager does not have any information. * - * @param jid + * @param jid TODO javadoc me please * the user (Full JID) * @return the node version (node#ver) or null */ @@ -214,7 +214,7 @@ public final class EntityCapsManager extends Manager { * the user has a node#ver associated with it and the node#ver has a * discover info associated with it. * - * @param user + * @param user TODO javadoc me please * user name (Full JID) * @return the discovered info */ @@ -229,7 +229,7 @@ public final class EntityCapsManager extends Manager { /** * Retrieve DiscoverInfo for a specific node. * - * @param nodeVer + * @param nodeVer TODO javadoc me please * The node name (e.g. * "http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w="). * @return The corresponding DiscoverInfo or null if none is known. @@ -256,7 +256,7 @@ public final class EntityCapsManager extends Manager { /** * Set the persistent cache implementation. * - * @param cache + * @param cache TODO javadoc me please */ public static void setPersistentCache(EntityCapsPersistentCache cache) { persistentCache = cache; @@ -265,8 +265,8 @@ public final class EntityCapsManager extends Manager { /** * Sets the maximum cache sizes. * - * @param maxJidToNodeVerSize - * @param maxCapsCacheSize + * @param maxJidToNodeVerSize TODO javadoc me please + * @param maxCapsCacheSize TODO javadoc me please */ public static void setMaxsCacheSizes(int maxJidToNodeVerSize, int maxCapsCacheSize) { JID_TO_NODEVER_CACHE.setMaxCacheSize(maxJidToNodeVerSize); @@ -447,7 +447,7 @@ public final class EntityCapsManager extends Manager { /** * Remove a record telling what entity caps node a user has. * - * @param user + * @param user TODO javadoc me please * the user (Full JID) */ public static void removeUserCapsNode(Jid user) { @@ -484,12 +484,12 @@ public final class EntityCapsManager extends Manager { /** * Returns true if Entity Caps are supported by a given JID. * - * @param jid + * @param jid TODO javadoc me please * @return true if the entity supports Entity Capabilities. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean areEntityCapsSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return sdm.supportsFeature(jid, NAMESPACE); @@ -499,10 +499,10 @@ public final class EntityCapsManager extends Manager { * Returns true if Entity Caps are supported by the local service/server. * * @return true if the user's server supports Entity Capabilities. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean areEntityCapsSupportedByServer() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return areEntityCapsSupported(connection().getXMPPServiceDomain()); @@ -577,9 +577,9 @@ public final class EntityCapsManager extends Manager { * @see XEP-0115 * 5.4 Processing Method * - * @param ver - * @param hash - * @param info + * @param ver TODO javadoc me please + * @param hash TODO javadoc me please + * @param info TODO javadoc me please * @return true if it's valid and should be cache, false if not */ public static boolean verifyDiscoverInfoVersion(String ver, String hash, DiscoverInfo info) { @@ -605,7 +605,7 @@ public final class EntityCapsManager extends Manager { /** * - * @param info + * @param info TODO javadoc me please * @return true if the stanza extensions is ill-formed */ protected static boolean verifyPacketExtensions(DiscoverInfo info) { @@ -637,8 +637,8 @@ public final class EntityCapsManager extends Manager { * @see XEP-115 * Verification String * - * @param discoverInfo - * @param hash + * @param discoverInfo TODO javadoc me please + * @param hash TODO javadoc me please * the used hash function, if null, default hash will be used * @return The generated verification String or null if the hash is not * supported diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/EntityCapsPersistentCache.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/EntityCapsPersistentCache.java index 87df05d49..d2747fe04 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/EntityCapsPersistentCache.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/EntityCapsPersistentCache.java @@ -22,14 +22,14 @@ public interface EntityCapsPersistentCache { /** * Add an DiscoverInfo to the persistent Cache. * - * @param nodeVer - * @param info + * @param nodeVer TODO javadoc me please + * @param info TODO javadoc me please */ void addDiscoverInfoByNodePersistent(String nodeVer, DiscoverInfo info); /** * Lookup DiscoverInfo by a Node string. - * @param nodeVer + * @param nodeVer TODO javadoc me please * * @return DiscoverInfo. */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/SimpleDirectoryPersistentCache.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/SimpleDirectoryPersistentCache.java index bc5cd163c..f965f7a72 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/SimpleDirectoryPersistentCache.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/caps/cache/SimpleDirectoryPersistentCache.java @@ -53,7 +53,7 @@ public class SimpleDirectoryPersistentCache implements EntityCapsPersistentCache * file systems, both case sensitive and case insensitive. It does however * produce longer filenames. * - * @param cacheDir + * @param cacheDir TODO javadoc me please */ public SimpleDirectoryPersistentCache(File cacheDir) { this(cacheDir, Base32.getStringEncoder()); @@ -125,9 +125,9 @@ public class SimpleDirectoryPersistentCache implements EntityCapsPersistentCache /** * Writes the DiscoverInfo stanza to an file * - * @param file - * @param info - * @throws IOException + * @param file TODO javadoc me please + * @param info TODO javadoc me please + * @throws IOException if an I/O error occured. */ private static void writeInfoToFile(File file, DiscoverInfo info) throws IOException { try (DataOutputStream dos = new DataOutputStream(new FileOutputStream(file))) { @@ -138,9 +138,9 @@ public class SimpleDirectoryPersistentCache implements EntityCapsPersistentCache /** * Tries to restore an DiscoverInfo stanza from a file. * - * @param file + * @param file TODO javadoc me please * @return the restored DiscoverInfo - * @throws Exception + * @throws Exception if an exception occurs. */ private static DiscoverInfo restoreInfoFromFile(File file) throws Exception { String fileContent; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java index 45dd4d54f..5691685ff 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java @@ -208,8 +208,8 @@ public final class ChatStateManager extends Manager { * * @param newState the new state of the chat * @param chat the chat. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void setCurrentState(ChatState newState, Chat chat) throws NotConnectedException, InterruptedException { if (chat == null || newState == null) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java index a323f8543..32f6eea41 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java @@ -214,10 +214,10 @@ public abstract class AdHocCommand { * command. It is invoked on every command. If there is a problem executing * the command it throws an XMPPException. * - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if there is an error executing the command. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract void execute() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException; @@ -229,10 +229,10 @@ public abstract class AdHocCommand { * XMPPException. * * @param response the form answer of the previous stage. - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if there is a problem executing the command. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract void next(Form response) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException; @@ -245,10 +245,10 @@ public abstract class AdHocCommand { * * @param response the form answer of the previous stage. * - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if there is a problem executing the command. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract void complete(Form response) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException; @@ -258,10 +258,10 @@ public abstract class AdHocCommand { * the previous one. If there is a problem executing the command it throws * an XMPPException. * - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if there is a problem executing the command. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract void prev() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException; @@ -270,10 +270,10 @@ public abstract class AdHocCommand { * the execution. If there is a problem executing the command it throws an * XMPPException. * - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if there is a problem executing the command. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract void cancel() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException; @@ -369,7 +369,7 @@ public abstract class AdHocCommand { * The {@link Action#cancel cancel} action is always allowed. To define the * available actions use the addActionAvailable method. * - * @param action + * @param action TODO javadoc me please * The action to check if it is available. * @return True if the action is available for the current stage. */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java index 120da7970..ec6724215 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java @@ -250,7 +250,7 @@ public final class AdHocCommandManager extends Manager { * @return the discovered items. * @throws XMPPException if the operation failed for some reason. * @throws SmackException if there was no response from the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverItems discoverCommands(Jid jid) throws XMPPException, SmackException, InterruptedException { return serviceDiscoveryManager.discoverItems(jid, NAMESPACE); @@ -291,11 +291,11 @@ public final class AdHocCommandManager extends Manager { *
  • The action to execute is one of the available actions
  • * * - * @param requestData + * @param requestData TODO javadoc me please * the stanza to process. - * @throws NotConnectedException - * @throws NoResponseException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoResponseException if there was no response from the remote entity. + * @throws InterruptedException if the calling thread was interrupted. */ private IQ processAdHocCommand(AdHocCommandData requestData) throws NoResponseException, NotConnectedException, InterruptedException { // Creates the response with the corresponding data @@ -555,7 +555,7 @@ public final class AdHocCommandManager extends Manager { * * @param response the response to send. * @param condition the condition of the error. - * @throws NotConnectedException + * @throws NotConnectedException if the XMPP connection is not connected. */ private static IQ respondError(AdHocCommandData response, StanzaError.Condition condition) { @@ -568,7 +568,7 @@ public final class AdHocCommandManager extends Manager { * @param response the response to send. * @param condition the condition of the error. * @param specificCondition the adhoc command error condition. - * @throws NotConnectedException + * @throws NotConnectedException if the XMPP connection is not connected. */ private static IQ respondError(AdHocCommandData response, StanzaError.Condition condition, AdHocCommand.SpecificErrorCondition specificCondition) { @@ -581,7 +581,7 @@ public final class AdHocCommandManager extends Manager { * * @param response the response to send. * @param error the error to send. - * @throws NotConnectedException + * @throws NotConnectedException if the XMPP connection is not connected. */ private static IQ respondError(AdHocCommandData response, StanzaError.Builder error) { response.setType(IQ.Type.error); @@ -596,10 +596,10 @@ public final class AdHocCommandManager extends Manager { * @param sessionID the session id of this execution. * @return the command instance to execute. * @throws XMPPErrorException if there is problem creating the new instance. - * @throws SecurityException - * @throws NoSuchMethodException - * @throws InvocationTargetException - * @throws IllegalArgumentException + * @throws SecurityException if there was a security violation. + * @throws NoSuchMethodException if no such method is declared + * @throws InvocationTargetException if a reflection-based method or constructor invocation threw. + * @throws IllegalArgumentException if an illegal argument was given. * @throws IllegalAccessException * @throws InstantiationException */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/LocalCommandFactory.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/LocalCommandFactory.java index 0df24d776..bc635d72a 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/LocalCommandFactory.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/LocalCommandFactory.java @@ -36,10 +36,10 @@ public interface LocalCommandFactory { * @return a LocalCommand instance. * @throws InstantiationException if creating an instance failed. * @throws IllegalAccessException if creating an instance is not allowed. - * @throws SecurityException - * @throws NoSuchMethodException - * @throws InvocationTargetException - * @throws IllegalArgumentException + * @throws SecurityException if there was a security violation. + * @throws NoSuchMethodException if no such method is declared + * @throws InvocationTargetException if a reflection-based method or constructor invocation threw. + * @throws IllegalArgumentException if an illegal argument was given. */ LocalCommand getInstance() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/RemoteCommand.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/RemoteCommand.java index 6c5b8423a..f31e2a317 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/RemoteCommand.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/RemoteCommand.java @@ -97,8 +97,8 @@ public class RemoteCommand extends AdHocCommand { * @param form the form answer of the previous stage. * @throws XMPPErrorException if an error occurs. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void execute(Form form) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { executeAction(Action.execute, form); @@ -127,8 +127,8 @@ public class RemoteCommand extends AdHocCommand { * @param form the form with the information. * @throws XMPPErrorException if there is a problem executing the command. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private void executeAction(Action action, Form form) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // TODO: Check that all the required fields of the form were filled, if diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/packet/AdHocCommandData.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/packet/AdHocCommandData.java index 38bbc966a..f9341aa5b 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/packet/AdHocCommandData.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/packet/AdHocCommandData.java @@ -230,7 +230,7 @@ public class AdHocCommandData extends IQ { * href="http://xmpp.org/extensions/xep-0050.html#impl-session">XEP-0050 § 3.3 Session Lifetime. *

    * - * @param sessionID + * @param sessionID TODO javadoc me please */ public void setSessionID(String sessionID) { this.sessionID = sessionID; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/DelayInformationManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/DelayInformationManager.java index 220d3bbae..88b74bbb7 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/DelayInformationManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/DelayInformationManager.java @@ -41,7 +41,7 @@ public class DelayInformationManager { *

    * Prefer {@link #getDelayInformation(Stanza)} over this method for backwards compatibility. *

    - * @param packet + * @param packet TODO javadoc me please * @return the Delayed Delivery information or null */ public static DelayInformation getXep203DelayInformation(Stanza packet) { @@ -53,7 +53,7 @@ public class DelayInformationManager { *

    * Prefer {@link #getDelayInformation(Stanza)} over this method for backwards compatibility. *

    - * @param packet + * @param packet TODO javadoc me please * @return the Delayed Delivery information or null */ public static DelayInformation getLegacyDelayInformation(Stanza packet) { @@ -64,7 +64,7 @@ public class DelayInformationManager { * Get Delayed Delivery information. This method first looks for a PacketExtension with the * XEP-203 namespace and falls back to the XEP-91 namespace. * - * @param packet + * @param packet TODO javadoc me please * @return the Delayed Delivery information or null */ public static DelayInformation getDelayInformation(Stanza packet) { @@ -78,7 +78,7 @@ public class DelayInformationManager { /** * Get the Delayed Delivery timestamp or null. * - * @param packet + * @param packet TODO javadoc me please * @return the Delayed Delivery timestamp or null */ public static Date getDelayTimestamp(Stanza packet) { @@ -92,7 +92,7 @@ public class DelayInformationManager { /** * Check if the given stanza is a delayed stanza as of XEP-203. * - * @param packet + * @param packet TODO javadoc me please * @return true if the stanza got delayed. */ public static boolean isDelayedStanza(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/packet/DelayInformation.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/packet/DelayInformation.java index 57a59ebbb..7a81102bf 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/packet/DelayInformation.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/delay/packet/DelayInformation.java @@ -115,7 +115,7 @@ public class DelayInformation implements ExtensionElement { /** * Return delay information from the given stanza. * - * @param packet + * @param packet TODO javadoc me please * @return the DelayInformation or null * @deprecated use {@link #from(Stanza)} instead */ @@ -127,7 +127,7 @@ public class DelayInformation implements ExtensionElement { /** * Return delay information from the given stanza. * - * @param packet + * @param packet TODO javadoc me please * @return the DelayInformation or null */ public static DelayInformation from(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java index 407a1811f..d59bb2fc7 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java @@ -104,7 +104,7 @@ public final class ServiceDiscoveryManager extends Manager { * Set the default identity all new connections will have. If unchanged the default identity is an * identity where category is set to 'client', type is set to 'pc' and name is set to 'Smack'. * - * @param identity + * @param identity TODO javadoc me please */ public static void setDefaultIdentity(DiscoverInfo.Identity identity) { defaultIdentity = identity; @@ -206,7 +206,7 @@ public final class ServiceDiscoveryManager extends Manager { /** * Sets the default identity the client will report. * - * @param identity + * @param identity TODO javadoc me please */ public synchronized void setIdentity(Identity identity) { this.identity = Objects.requireNonNull(identity, "Identity can not be null"); @@ -239,7 +239,7 @@ public final class ServiceDiscoveryManager extends Manager { /** * Add an further identity to the client. * - * @param identity + * @param identity TODO javadoc me please */ public synchronized void addIdentity(DiscoverInfo.Identity identity) { identities.add(identity); @@ -252,7 +252,7 @@ public final class ServiceDiscoveryManager extends Manager { * Remove an identity from the client. Note that the client needs at least one identity, the default identity, which * can not be removed. * - * @param identity + * @param identity TODO javadoc me please * @return true, if successful. Otherwise the default identity was given. */ public synchronized boolean removeIdentity(DiscoverInfo.Identity identity) { @@ -425,7 +425,7 @@ public final class ServiceDiscoveryManager extends Manager { * configure the extended info before logging to the server so that the * information is already available if it is required upon login. * - * @param info + * @param info TODO javadoc me please * the data form that contains the extend service discovery * information. */ @@ -481,10 +481,10 @@ public final class ServiceDiscoveryManager extends Manager { * * @param entityID the address of the XMPP entity or null. * @return the discovered information. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverInfo discoverInfo(Jid entityID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (entityID == null) @@ -518,8 +518,8 @@ public final class ServiceDiscoveryManager extends Manager { * @return the discovered information. * @throws XMPPErrorException if the operation failed for some reason. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverInfo discoverInfo(Jid entityID, String node) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Discover the entity's info @@ -540,8 +540,8 @@ public final class ServiceDiscoveryManager extends Manager { * @return the discovered information. * @throws XMPPErrorException if the operation failed for some reason. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverItems discoverItems(Jid entityID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return discoverItems(entityID, null); @@ -557,8 +557,8 @@ public final class ServiceDiscoveryManager extends Manager { * @return the discovered items. * @throws XMPPErrorException if the operation failed for some reason. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverItems discoverItems(Jid entityID, String node) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Discover the entity's items @@ -574,12 +574,12 @@ public final class ServiceDiscoveryManager extends Manager { /** * Returns true if the server supports the given feature. * - * @param feature + * @param feature TODO javadoc me please * @return true if the server supports the given feature. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.1 */ public boolean serverSupportsFeature(CharSequence feature) throws NoResponseException, XMPPErrorException, @@ -604,10 +604,10 @@ public final class ServiceDiscoveryManager extends Manager { * * @param features the features to check * @return true if all features are supported by the connection account, false otherwise - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2.2 */ public boolean accountSupportsFeatures(CharSequence... features) @@ -621,10 +621,10 @@ public final class ServiceDiscoveryManager extends Manager { * * @param features a collection of features * @return true if all features are supported by the connection account, false otherwise - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2.2 */ public boolean accountSupportsFeatures(Collection features) @@ -637,12 +637,12 @@ public final class ServiceDiscoveryManager extends Manager { * Queries the remote entity for it's features and returns true if the given feature is found. * * @param jid the JID of the remote entity - * @param feature + * @param feature TODO javadoc me please * @return true if the entity supports the feature, false otherwise - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean supportsFeature(Jid jid, CharSequence feature) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return supportsFeatures(jid, feature); @@ -676,10 +676,10 @@ public final class ServiceDiscoveryManager extends Manager { * @param stopOnFirst if true, stop searching after the first service was found * @param useCache if true, query a cache first to avoid network I/O * @return a possible empty list of services providing the given feature - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List findServicesDiscoverInfo(String feature, boolean stopOnFirst, boolean useCache) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -694,10 +694,10 @@ public final class ServiceDiscoveryManager extends Manager { * @param useCache if true, query a cache first to avoid network I/O * @param encounteredExceptions an optional map which will be filled with the exceptions encountered * @return a possible empty list of services providing the given feature - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2.2 */ public List findServicesDiscoverInfo(String feature, boolean stopOnFirst, boolean useCache, Map encounteredExceptions) @@ -715,10 +715,10 @@ public final class ServiceDiscoveryManager extends Manager { * @param useCache if true, query a cache first to avoid network I/O * @param encounteredExceptions an optional map which will be filled with the exceptions encountered * @return a possible empty list of services providing the given feature - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.3.0 */ public List findServicesDiscoverInfo(DomainBareJid serviceName, String feature, boolean stopOnFirst, @@ -798,10 +798,10 @@ public final class ServiceDiscoveryManager extends Manager { * @param stopOnFirst if true, stop searching after the first service was found * @param useCache if true, query a cache first to avoid network I/O * @return a possible empty list of services providing the given feature - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List findServices(String feature, boolean stopOnFirst, boolean useCache) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { List services = findServicesDiscoverInfo(feature, stopOnFirst, useCache); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java index d5b814fd1..62e9cef67 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java @@ -61,7 +61,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable { /** * Copy constructor. * - * @param d + * @param d TODO javadoc me please */ public DiscoverInfo(DiscoverInfo d) { super(d); @@ -93,7 +93,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable { /** * Adds a collection of features to the packet. Does noting if featuresToAdd is null. * - * @param featuresToAdd + * @param featuresToAdd TODO javadoc me please */ public void addFeatures(Collection featuresToAdd) { if (featuresToAdd == null) return; @@ -133,7 +133,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable { /** * Adds identities to the DiscoverInfo stanza. * - * @param identitiesToAdd + * @param identitiesToAdd TODO javadoc me please */ public void addIdentities(Collection identitiesToAdd) { if (identitiesToAdd == null) return; @@ -422,7 +422,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable { * If all three are identical the other Identity is considered equal. Name is not used for * comparison, as defined by XEP-0115 * - * @param other + * @param other TODO javadoc me please * @return a negative integer, zero, or a positive integer as this object is less than, * equal to, or greater than the specified object. */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverItems.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverItems.java index 824649716..34c62a8a1 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverItems.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverItems.java @@ -59,7 +59,7 @@ public class DiscoverItems extends IQ { /** * Adds a collection of items to the discovered information. Does nothing if itemsToAdd is null * - * @param itemsToAdd + * @param itemsToAdd TODO javadoc me please */ public void addItems(Collection itemsToAdd) { if (itemsToAdd == null) return; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferListener.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferListener.java index d54b19ae9..2559b88a1 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferListener.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferListener.java @@ -26,7 +26,7 @@ public interface FileTransferListener { /** * A request to send a file has been received from another user. * - * @param request + * @param request TODO javadoc me please * The request from the other user. */ void fileTransferRequest(FileTransferRequest request); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferManager.java index dc44d4b11..f34ed352b 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferManager.java @@ -65,7 +65,7 @@ public final class FileTransferManager extends Manager { /** * Creates a file transfer manager to initiate and receive file transfers. * - * @param connection + * @param connection TODO javadoc me please * The XMPPConnection that the file transfers will use. */ private FileTransferManager(XMPPConnection connection) { @@ -90,7 +90,7 @@ public final class FileTransferManager extends Manager { * Add a file transfer listener to listen to incoming file transfer * requests. * - * @param li + * @param li TODO javadoc me please * The listener * @see #removeFileTransferListener(FileTransferListener) * @see FileTransferListener @@ -102,7 +102,7 @@ public final class FileTransferManager extends Manager { /** * Removes a file transfer listener. * - * @param li + * @param li TODO javadoc me please * The file transfer listener to be removed * @see FileTransferListener */ @@ -113,7 +113,7 @@ public final class FileTransferManager extends Manager { /** * Creates an OutgoingFileTransfer to send a file to another user. * - * @param userID + * @param userID TODO javadoc me please * The fully qualified jabber ID (i.e. full JID) with resource of the user to * send the file to. * @return The send file object on which the negotiated transfer can be run. @@ -137,7 +137,7 @@ public final class FileTransferManager extends Manager { * invoked. It will create an IncomingFileTransfer which allows the * transmission of the file to proceed. * - * @param request + * @param request TODO javadoc me please * The remote request that is being accepted. * @return The IncomingFileTransfer which manages the download of the file * from the transfer initiator. @@ -160,9 +160,9 @@ public final class FileTransferManager extends Manager { *

    * Specified in XEP-95 4.2 and 3.2 Example 8 *

    - * @param request - * @throws NotConnectedException - * @throws InterruptedException + * @param request TODO javadoc me please + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void rejectIncomingFileTransfer(FileTransferRequest request) throws NotConnectedException, InterruptedException { StreamInitiation initiation = request.getStreamInitiation(); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.java index c3a16df11..c9195fa8c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.java @@ -182,9 +182,9 @@ public final class FileTransferNegotiator extends Manager { * @return The file transfer object that handles the transfer * @throws NoStreamMethodsOfferedException If there are either no stream methods contained in the packet, or * there is not an appropriate stream method. - * @throws NotConnectedException - * @throws NoAcceptableTransferMechanisms - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoAcceptableTransferMechanisms if no acceptable transfer mechanisms are available + * @throws InterruptedException if the calling thread was interrupted. */ public StreamNegotiator selectStreamNegotiator( FileTransferRequest request) throws NotConnectedException, NoStreamMethodsOfferedException, NoAcceptableTransferMechanisms, InterruptedException { @@ -296,10 +296,10 @@ public final class FileTransferNegotiator extends Manager { * user to respond. If they do not respond in time, this * @return Returns the stream negotiator selected by the peer. * @throws XMPPErrorException Thrown if there is an error negotiating the file transfer. - * @throws NotConnectedException - * @throws NoResponseException - * @throws NoAcceptableTransferMechanisms - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NoAcceptableTransferMechanisms if no acceptable transfer mechanisms are available + * @throws InterruptedException if the calling thread was interrupted. */ public StreamNegotiator negotiateOutgoingTransfer(final Jid userID, final String streamID, final String fileName, final long size, diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferRequest.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferRequest.java index d6d732c3a..d0c17d34f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferRequest.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferRequest.java @@ -37,10 +37,10 @@ public class FileTransferRequest { * A receive request is constructed from the Stream Initiation request * received from the initiator. * - * @param manager + * @param manager TODO javadoc me please * The manager handling this file transfer * - * @param si + * @param si TODO javadoc me please * The Stream initiation received from the initiator. */ public FileTransferRequest(FileTransferManager manager, StreamInitiation si) { @@ -131,8 +131,8 @@ public class FileTransferRequest { /** * Rejects the file transfer request. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void reject() throws NotConnectedException, InterruptedException { manager.rejectIncomingFileTransfer(this); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java index 6fadab1bc..0e972b26d 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/IncomingFileTransfer.java @@ -74,10 +74,10 @@ public class IncomingFileTransfer extends FileTransfer { * the negotiated stream. * * @return The negotiated InputStream from which to read the data. - * @throws SmackException + * @throws SmackException if Smack detected an exceptional situation. * @throws XMPPErrorException If there is an error in the negotiation process an exception * is thrown. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public InputStream receiveFile() throws SmackException, XMPPErrorException, InterruptedException { if (inputStream != null) { @@ -110,7 +110,7 @@ public class IncomingFileTransfer extends FileTransfer { * * @param file The location to save the file. * @throws SmackException when the file transfer fails - * @throws IOException + * @throws IOException if an I/O error occured. * @throws IllegalArgumentException This exception is thrown when the the provided file is * either null, or cannot be written to. */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java index 41f55d4b8..3e33208e6 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java @@ -63,7 +63,7 @@ public class OutgoingFileTransfer extends FileTransfer { * Sets the time in milliseconds after which the file transfer negotiation * process will timeout if the other user has not responded. * - * @param responseTimeout + * @param responseTimeout TODO javadoc me please * The timeout time in milliseconds. */ public static void setResponseTimeout(int responseTimeout) { @@ -108,21 +108,21 @@ public class OutgoingFileTransfer extends FileTransfer { * This method handles the negotiation of the file transfer and the stream, * it only returns the created stream after the negotiation has been completed. * - * @param fileName + * @param fileName TODO javadoc me please * The name of the file that will be transmitted. It is * preferable for this name to have an extension as it will be * used to determine the type of file it is. - * @param fileSize + * @param fileSize TODO javadoc me please * The size in bytes of the file that will be transmitted. - * @param description + * @param description TODO javadoc me please * A description of the file that will be transmitted. * @return The OutputStream that is connected to the peer to transmit the * file. - * @throws XMPPException + * @throws XMPPException if an XMPP protocol error was received. * Thrown if an error occurs during the file transfer * negotiation process. * @throws SmackException if there was no response from the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public synchronized OutputStream sendFile(String fileName, long fileSize, String description) throws XMPPException, SmackException, InterruptedException { @@ -146,15 +146,15 @@ public class OutgoingFileTransfer extends FileTransfer { * returns immediately and its progress will be updated through the * {@link NegotiationProgress} callback. * - * @param fileName + * @param fileName TODO javadoc me please * The name of the file that will be transmitted. It is * preferable for this name to have an extension as it will be * used to determine the type of file it is. - * @param fileSize + * @param fileSize TODO javadoc me please * The size in bytes of the file that will be transmitted. - * @param description + * @param description TODO javadoc me please * A description of the file that will be transmitted. - * @param progress + * @param progress TODO javadoc me please * A callback to monitor the progress of the file transfer * negotiation process and to retrieve the OutputStream when it * is complete. @@ -212,7 +212,7 @@ public class OutgoingFileTransfer extends FileTransfer { * * @param file the file to transfer to the remote entity. * @param description a description for the file to transfer. - * @throws SmackException + * @throws SmackException if Smack detected an exceptional situation. * If there is an error during the negotiation process or the * sending of the file. */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java index 393be25e6..08031b6d3 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/StreamNegotiator.java @@ -152,7 +152,7 @@ public abstract class StreamNegotiator extends Manager { * @throws XMPPErrorException If an error occurs during this process an XMPPException is * thrown. * @throws InterruptedException If thread is interrupted. - * @throws SmackException + * @throws SmackException if Smack detected an exceptional situation. */ public abstract InputStream createIncomingStream(StreamInitiation initiation) throws XMPPErrorException, InterruptedException, SmackException; @@ -168,9 +168,9 @@ public abstract class StreamNegotiator extends Manager { * @param target The fully-qualified JID of the target or receiver of the file * transfer. * @return The negotiated stream ready for data. - * @throws SmackException - * @throws XMPPException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract OutputStream createOutgoingStream(String streamID, Jid initiator, Jid target) throws SmackException, XMPPException, InterruptedException; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/forward/packet/Forwarded.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/forward/packet/Forwarded.java index 17ebf299c..72d9fdb88 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/forward/packet/Forwarded.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/forward/packet/Forwarded.java @@ -111,7 +111,7 @@ public class Forwarded implements ExtensionElement { /** * Get the forwarded extension. - * @param packet + * @param packet TODO javadoc me please * @return the Forwarded extension or null */ public static Forwarded from(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/geoloc/GeoLocationManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/geoloc/GeoLocationManager.java index 1adb99b85..b8c0ff414 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/geoloc/GeoLocationManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/geoloc/GeoLocationManager.java @@ -100,12 +100,12 @@ public final class GeoLocationManager extends Manager { /** * Send geolocation through the PubSub node. * - * @param geoLocation - * @throws InterruptedException - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotALeafNodeException + * @param geoLocation TODO javadoc me please + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. */ public void sendGeolocation(GeoLocation geoLocation) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotALeafNodeException { @@ -115,11 +115,11 @@ public final class GeoLocationManager extends Manager { /** * Send empty geolocation through the PubSub node. * - * @throws InterruptedException - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotALeafNodeException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. */ public void stopPublishingGeolocation() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotALeafNodeException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/LastActivityManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/LastActivityManager.java index 551c27682..3b3ea38a7 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/LastActivityManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/LastActivityManager.java @@ -76,7 +76,6 @@ import org.jxmpp.jid.Jid; * * To get the uptime of a host, you simple send the LastActivity stanza to it, * as in the following code example: - *

    * *

      * LastActivity activity = LastActivity.getLastActivity(con, "jabber.org");
    @@ -98,7 +97,7 @@ public final class LastActivityManager extends Manager {
         /**
          * Enable or disable Last Activity for new XMPPConnections.
          *
    -     * @param enabledPerDefault
    +     * @param enabledPerDefault TODO javadoc me please
          */
         public static void setEnabledPerDefault(boolean enabledPerDefault) {
             LastActivityManager.enabledPerDefault = enabledPerDefault;
    @@ -127,7 +126,7 @@ public final class LastActivityManager extends Manager {
         /**
          * Creates a last activity manager to response last activity requests.
          *
    -     * @param connection
    +     * @param connection TODO javadoc me please
          *            The XMPPConnection that the last activity requests will use.
          */
         private LastActivityManager(XMPPConnection connection) {
    @@ -226,14 +225,14 @@ public final class LastActivityManager extends Manager {
          * Moreover, when the jid is a server or component (e.g., a JID of the form
          * 'host') the last activity is the uptime.
          *
    -     * @param jid
    +     * @param jid TODO javadoc me please
          *            the JID of the user.
          * @return the LastActivity stanza of the jid.
    -     * @throws XMPPErrorException
    +     * @throws XMPPErrorException if there was an XMPP error returned.
          *             thrown if a server error has occured.
          * @throws NoResponseException if there was no response from the server.
    -     * @throws NotConnectedException
    -     * @throws InterruptedException
    +     * @throws NotConnectedException if the XMPP connection is not connected.
    +     * @throws InterruptedException if the calling thread was interrupted.
          */
         public LastActivity getLastActivity(Jid jid) throws NoResponseException, XMPPErrorException,
                         NotConnectedException, InterruptedException {
    @@ -246,10 +245,10 @@ public final class LastActivityManager extends Manager {
          *
          * @param jid a JID to be tested for Last Activity support
          * @return true if Last Activity is supported, otherwise false
    -     * @throws NotConnectedException
    -     * @throws XMPPErrorException
    -     * @throws NoResponseException
    -     * @throws InterruptedException
    +     * @throws NotConnectedException if the XMPP connection is not connected.
    +     * @throws XMPPErrorException if there was an XMPP error returned.
    +     * @throws NoResponseException if there was no response from the remote entity.
    +     * @throws InterruptedException if the calling thread was interrupted.
          */
         public boolean isLastActivitySupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
             return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, LastActivity.NAMESPACE);
    diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/PrivateDataManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/PrivateDataManager.java
    index 7a1149ea6..e93c560de 100644
    --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/PrivateDataManager.java
    +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/PrivateDataManager.java
    @@ -154,10 +154,10 @@ public final class PrivateDataManager extends Manager {
          * @param elementName the element name.
          * @param namespace the namespace.
          * @return the private data.
    -     * @throws XMPPErrorException
    -     * @throws NoResponseException
    -     * @throws NotConnectedException
    -     * @throws InterruptedException
    +     * @throws XMPPErrorException if there was an XMPP error returned.
    +     * @throws NoResponseException if there was no response from the remote entity.
    +     * @throws NotConnectedException if the XMPP connection is not connected.
    +     * @throws InterruptedException if the calling thread was interrupted.
          */
         public PrivateData getPrivateData(final String elementName, final String namespace) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
             // Create an IQ packet to get the private data.
    @@ -174,10 +174,10 @@ public final class PrivateDataManager extends Manager {
          * element name and namespace, then the new private data will overwrite the old value.
          *
          * @param privateData the private data.
    -     * @throws XMPPErrorException
    -     * @throws NoResponseException
    -     * @throws NotConnectedException
    -     * @throws InterruptedException
    +     * @throws XMPPErrorException if there was an XMPP error returned.
    +     * @throws NoResponseException if there was no response from the remote entity.
    +     * @throws NotConnectedException if the XMPP connection is not connected.
    +     * @throws InterruptedException if the calling thread was interrupted.
          */
         public void setPrivateData(final PrivateData privateData) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
             // Create an IQ packet to set the private data.
    @@ -207,10 +207,10 @@ public final class PrivateDataManager extends Manager {
          * Check if the service supports private data.
          *
          * @return true if the service supports private data, false otherwise.
    -     * @throws NoResponseException
    -     * @throws NotConnectedException
    -     * @throws InterruptedException
    -     * @throws XMPPErrorException
    +     * @throws NoResponseException if there was no response from the remote entity.
    +     * @throws NotConnectedException if the XMPP connection is not connected.
    +     * @throws InterruptedException if the calling thread was interrupted.
    +     * @throws XMPPErrorException if there was an XMPP error returned.
          * @since 4.2
          */
         public boolean isSupported() throws NoResponseException, NotConnectedException,
    diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/provider/PrivateDataProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/provider/PrivateDataProvider.java
    index 6c8f72d3e..4f21a318c 100644
    --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/provider/PrivateDataProvider.java
    +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/provider/PrivateDataProvider.java
    @@ -41,8 +41,8 @@ public interface PrivateDataProvider {
          *
          * @param parser an XML parser.
          * @return a new PrivateData instance.
    -     * @throws XmlPullParserException
    -     * @throws IOException
    +     * @throws XmlPullParserException if an error in the XML parser occured.
    +     * @throws IOException if an I/O error occured.
          */
         PrivateData parsePrivateData(XmlPullParser parser) throws XmlPullParserException, IOException;
     }
    diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqregister/AccountManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqregister/AccountManager.java
    index af955915b..293cb5cbc 100644
    --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqregister/AccountManager.java
    +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqregister/AccountManager.java
    @@ -70,7 +70,7 @@ public final class AccountManager extends Manager {
         /**
          * The default value used by new account managers for allowSensitiveOperationOverInsecureConnection.
          *
    -     * @param allow
    +     * @param allow TODO javadoc me please
          * @see #sensitiveOperationOverInsecureConnection(boolean)
          * @since 4.1
          */
    @@ -87,7 +87,7 @@ public final class AccountManager extends Manager {
          * unencrypted) connections.
          * 

    * - * @param allow + * @param allow TODO javadoc me please * @since 4.1 */ public void sensitiveOperationOverInsecureConnection(boolean allow) { @@ -131,10 +131,10 @@ public final class AccountManager extends Manager { * behavior is to only create new accounts before having logged in to a server. * * @return true if the server support creating new accounts. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean supportsAccountCreation() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // TODO: Replace this body with isSupported() and possible deprecate this method. @@ -176,10 +176,10 @@ public final class AccountManager extends Manager { * the user's email address. * * @return the required account attributes. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Set getAccountAttributes() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (info == null) { @@ -200,10 +200,10 @@ public final class AccountManager extends Manager { * @param name the name of the account attribute to return its value. * @return the value of the account attribute or null if an account * attribute wasn't found for the requested name. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public String getAccountAttribute(String name) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (info == null) { @@ -218,10 +218,10 @@ public final class AccountManager extends Manager { * that will complete the registration process. * * @return the account creation instructions, or null if there are none. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public String getAccountInstructions() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (info == null) { @@ -240,10 +240,10 @@ public final class AccountManager extends Manager { * * @param username the username. * @param password the password. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void createAccount(Localpart username, String password) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Create a map for all the required attributes, but give them blank values. @@ -264,8 +264,8 @@ public final class AccountManager extends Manager { * @param attributes the account attributes. * @throws XMPPErrorException if an error occurs creating the account. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see #getAccountAttributes() */ public void createAccount(Localpart username, String password, Map attributes) @@ -298,8 +298,8 @@ public final class AccountManager extends Manager { * @throws IllegalStateException if not currently logged-in to the server. * @throws XMPPErrorException if an error occurs when changing the password. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void changePassword(String newPassword) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { if (!connection().isSecureConnection() && !allowSensitiveOperationOverInsecureConnection) { @@ -322,8 +322,8 @@ public final class AccountManager extends Manager { * @throws IllegalStateException if not currently logged-in to the server. * @throws XMPPErrorException if an error occurs when deleting the account. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void deleteAccount() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Map attributes = new HashMap<>(); @@ -356,10 +356,10 @@ public final class AccountManager extends Manager { /** * Gets the account registration info from the server. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * * @throws XMPPException if an error occurs. * @throws SmackException if there was no response from the server. diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqversion/VersionManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqversion/VersionManager.java index 4dce8988e..b111838d2 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqversion/VersionManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqversion/VersionManager.java @@ -135,12 +135,12 @@ public final class VersionManager extends Manager { /** * Request version information from a given JID. * - * @param jid + * @param jid TODO javadoc me please * @return the version information or {@code null} if not supported by JID - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Version getVersion(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleError.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleError.java index 2931973ee..15a07f1e0 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleError.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/element/JingleError.java @@ -62,7 +62,10 @@ public final class JingleError implements ExtensionElement { } /** - * Returns a Action instance associated with the String value. + * Returns a error instance associated with the String value. + * + * @param value the input String. + * @return the jingle error instance associated with the input String. */ public static JingleError fromString(String value) { value = value.toLowerCase(Locale.US); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesManager.java index 8074f052d..8bbe7812d 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/JivePropertiesManager.java @@ -68,8 +68,8 @@ public class JivePropertiesManager { * Convenience method to get a property from a packet. Will return null if the stanza contains * not property with the given name. * - * @param packet - * @param name + * @param packet TODO javadoc me please + * @param name TODO javadoc me please * @return the property or null if none found. */ public static Object getProperty(Stanza packet, String name) { @@ -85,7 +85,7 @@ public class JivePropertiesManager { * Return a collection of the names of all properties of the given packet. If the packet * contains no properties extension, then an empty collection will be returned. * - * @param packet + * @param packet TODO javadoc me please * @return a collection of the names of all properties. */ public static Collection getPropertiesNames(Stanza packet) { @@ -100,7 +100,7 @@ public class JivePropertiesManager { * Return a map of all properties of the given packet. If the stanza contains no properties * extension, an empty map will be returned. * - * @param packet + * @param packet TODO javadoc me please * @return a map of all properties of the given packet. */ public static Map getProperties(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/provider/JivePropertiesExtensionProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/provider/JivePropertiesExtensionProvider.java index 1e3eb2a91..d88b30708 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/provider/JivePropertiesExtensionProvider.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/provider/JivePropertiesExtensionProvider.java @@ -48,8 +48,8 @@ public class JivePropertiesExtensionProvider extends ExtensionElementProvider * * @param multiUserChat the MUC for this configuration form. - * @throws InterruptedException - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. */ MucConfigFormManager(MultiUserChat multiUserChat) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -156,7 +156,7 @@ public class MucConfigFormManager { * Make the room for members only. * * @return a reference to this object. - * @throws MucConfigurationNotSupportedException + * @throws MucConfigurationNotSupportedException if the requested MUC configuration is not supported by the MUC service. */ public MucConfigFormManager makeMembersOnly() throws MucConfigurationNotSupportedException { return setMembersOnly(true); @@ -167,7 +167,7 @@ public class MucConfigFormManager { * * @param isMembersOnly if the room should be members only. * @return a reference to this object. - * @throws MucConfigurationNotSupportedException + * @throws MucConfigurationNotSupportedException if the requested MUC configuration is not supported by the MUC service. */ public MucConfigFormManager setMembersOnly(boolean isMembersOnly) throws MucConfigurationNotSupportedException { if (!supportsMembersOnly()) { @@ -192,7 +192,7 @@ public class MucConfigFormManager { * * @param password the password to set. * @return a reference to this object. - * @throws MucConfigurationNotSupportedException + * @throws MucConfigurationNotSupportedException if the requested MUC configuration is not supported by the MUC service. */ public MucConfigFormManager setAndEnablePassword(String password) throws MucConfigurationNotSupportedException { @@ -203,7 +203,7 @@ public class MucConfigFormManager { * Make the room password protected. * * @return a reference to this object. - * @throws MucConfigurationNotSupportedException + * @throws MucConfigurationNotSupportedException if the requested MUC configuration is not supported by the MUC service. */ public MucConfigFormManager makePasswordProtected() throws MucConfigurationNotSupportedException { return setIsPasswordProtected(true); @@ -212,9 +212,9 @@ public class MucConfigFormManager { /** * Set if this room is password protected. Rooms are by default not password protected. * - * @param isPasswordProtected + * @param isPasswordProtected TODO javadoc me please * @return a reference to this object. - * @throws MucConfigurationNotSupportedException + * @throws MucConfigurationNotSupportedException if the requested MUC configuration is not supported by the MUC service. */ public MucConfigFormManager setIsPasswordProtected(boolean isPasswordProtected) throws MucConfigurationNotSupportedException { @@ -232,7 +232,7 @@ public class MucConfigFormManager { * * @param secret the secret/password. * @return a reference to this object. - * @throws MucConfigurationNotSupportedException + * @throws MucConfigurationNotSupportedException if the requested MUC configuration is not supported by the MUC service. */ public MucConfigFormManager setRoomSecret(String secret) throws MucConfigurationNotSupportedException { @@ -247,9 +247,9 @@ public class MucConfigFormManager { * Submit the configuration as {@link Form} to the room. * * @throws NoResponseException if there was no response from the room. - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void submitConfigurationForm() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucEnterConfiguration.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucEnterConfiguration.java index b9120f671..681d1e8a9 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucEnterConfiguration.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucEnterConfiguration.java @@ -101,7 +101,7 @@ public final class MucEnterConfiguration { * 'available', otherwise an {@link IllegalArgumentException} will be thrown. *

    * - * @param presence + * @param presence TODO javadoc me please * @return a reference to this builder. */ public Builder withPresence(Presence presence) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java index 15f0b20ff..605eaff2e 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java @@ -318,11 +318,11 @@ public class MultiUserChat { * * @param conf the configuration used to enter the room. * @return the returned presence by the service after the client send the initial presence in order to enter the room. - * @throws NotConnectedException - * @throws NoResponseException - * @throws XMPPErrorException - * @throws InterruptedException - * @throws NotAMucServiceException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotAMucServiceException if the entity is not a MUC serivce. * @see XEP-45 7.2 Entering a Room */ private Presence enter(MucEnterConfiguration conf) throws NotConnectedException, NoResponseException, @@ -444,11 +444,11 @@ public class MultiUserChat { * @throws XMPPErrorException if the room couldn't be created for some reason (e.g. 405 error if * the user is not allowed to create the room) * @throws NoResponseException if there was no response from the server. - * @throws InterruptedException - * @throws NotConnectedException - * @throws MucAlreadyJoinedException - * @throws MissingMucCreationAcknowledgeException - * @throws NotAMucServiceException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws MucAlreadyJoinedException if already joined the Multi-User Chat.7y + * @throws MissingMucCreationAcknowledgeException if there MUC creation was not acknowledged by the service. + * @throws NotAMucServiceException if the entity is not a MUC serivce. */ public synchronized MucCreateConfigFormHandle create(Resourcepart nickname) throws NoResponseException, XMPPErrorException, InterruptedException, MucAlreadyJoinedException, @@ -477,12 +477,12 @@ public class MultiUserChat { * * @param nickname the nickname to use in the MUC room. * @return A {@link MucCreateConfigFormHandle} if the room was created while joining, or {@code null} if the room was just joined. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws InterruptedException - * @throws NotConnectedException - * @throws MucAlreadyJoinedException - * @throws NotAMucServiceException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws MucAlreadyJoinedException if already joined the Multi-User Chat.7y + * @throws NotAMucServiceException if the entity is not a MUC serivce. */ public synchronized MucCreateConfigFormHandle createOrJoin(Resourcepart nickname) throws NoResponseException, XMPPErrorException, InterruptedException, MucAlreadyJoinedException, NotConnectedException, NotAMucServiceException { @@ -501,10 +501,10 @@ public class MultiUserChat { * @throws XMPPErrorException if the room couldn't be created for some reason (e.g. 405 error if * the user is not allowed to create the room) * @throws NoResponseException if there was no response from the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. * @throws MucAlreadyJoinedException if the MUC is already joined - * @throws NotConnectedException - * @throws NotAMucServiceException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NotAMucServiceException if the entity is not a MUC serivce. */ public synchronized MucCreateConfigFormHandle createOrJoin(MucEnterConfiguration mucEnterConfiguration) throws NoResponseException, XMPPErrorException, InterruptedException, MucAlreadyJoinedException, NotConnectedException, NotAMucServiceException { @@ -539,10 +539,10 @@ public class MultiUserChat { * Create an instant room. The default configuration will be accepted and the room will become unlocked, i.e. * other users are able to join. * - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-45 § 10.1.2 Creating an * Instant Room */ @@ -555,10 +555,10 @@ public class MultiUserChat { * Alias for {@link MultiUserChat#getConfigFormManager()}. * * @return a MUC configuration form manager for this room. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see MultiUserChat#getConfigFormManager() */ public MucConfigFormManager getConfigFormManager() throws NoResponseException, @@ -573,11 +573,11 @@ public class MultiUserChat { * @param nickname the required nickname to use. * @param password the optional password required to join * @return A {@link MucCreateConfigFormHandle} if the room was created while joining, or {@code null} if the room was just joined. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotAMucServiceException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotAMucServiceException if the entity is not a MUC serivce. */ public MucCreateConfigFormHandle createOrJoinIfNecessary(Resourcepart nickname, String password) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAMucServiceException { @@ -602,7 +602,7 @@ public class MultiUserChat { * joining the room, the room will decide the amount of history to send. * * @param nickname the nickname to use. - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if an error occurs joining the room. In particular, a * 401 error can occur if no password was provided and one is required; or a * 403 error can occur if the user is banned; or a @@ -610,9 +610,9 @@ public class MultiUserChat { * 407 error can occur if user is not on the member list; or a * 409 error can occur if someone is already in the group chat with the same nickname. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotAMucServiceException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotAMucServiceException if the entity is not a MUC serivce. */ public void join(Resourcepart nickname) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAMucServiceException { @@ -638,10 +638,10 @@ public class MultiUserChat { * 404 error can occur if the room does not exist or is locked; or a * 407 error can occur if user is not on the member list; or a * 409 error can occur if someone is already in the group chat with the same nickname. - * @throws InterruptedException - * @throws NotConnectedException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. * @throws NoResponseException if there was no response from the server. - * @throws NotAMucServiceException + * @throws NotAMucServiceException if the entity is not a MUC serivce. */ public void join(Resourcepart nickname, String password) throws XMPPErrorException, InterruptedException, NoResponseException, NotConnectedException, NotAMucServiceException { MucEnterConfiguration.Builder builder = getEnterConfigurationBuilder(nickname).withPassword( @@ -671,9 +671,9 @@ public class MultiUserChat { * 407 error can occur if user is not on the member list; or a * 409 error can occur if someone is already in the group chat with the same nickname. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotAMucServiceException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotAMucServiceException if the entity is not a MUC serivce. */ public synchronized void join(MucEnterConfiguration mucEnterConfiguration) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException, NotAMucServiceException { @@ -704,11 +704,11 @@ public class MultiUserChat { * Leave the chat room. * * @return the leave presence as reflected by the MUC. - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws MucNotJoinedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws MucNotJoinedException if not joined to the Multi-User Chat. * @deprecated use {@link #leave()} instead. */ @Deprecated @@ -721,11 +721,11 @@ public class MultiUserChat { * Leave the chat room. * * @return the leave presence as reflected by the MUC. - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws MucNotJoinedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws MucNotJoinedException if not joined to the Multi-User Chat. */ public synchronized Presence leave() throws NotConnectedException, InterruptedException, NoResponseException, XMPPErrorException, MucNotJoinedException { @@ -768,10 +768,10 @@ public class MultiUserChat { *

    * * @return a MUC configuration form manager for this room. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-45 § 10.2 Subsequent Room Configuration * @since 4.2 */ @@ -789,8 +789,8 @@ public class MultiUserChat { * null if no configuration is possible. * @throws XMPPErrorException if an error occurs asking the configuration form for the room. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Form getConfigurationForm() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCOwner iq = new MUCOwner(); @@ -808,8 +808,8 @@ public class MultiUserChat { * @param form the form with the new settings. * @throws XMPPErrorException if an error occurs setting the new rooms' configuration. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendConfigurationForm(Form form) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCOwner iq = new MUCOwner(); @@ -834,8 +834,8 @@ public class MultiUserChat { * @throws XMPPErrorException if an error occurs asking the registration form for the room or a * 405 error if the user is not allowed to register with the room. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Form getRegistrationForm() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Registration reg = new Registration(); @@ -860,8 +860,8 @@ public class MultiUserChat { * 409 error can occur if the desired room nickname is already reserved for that room; * or a 503 error can occur if the room does not support registration. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendRegistrationForm(Form form) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Registration reg = new Registration(); @@ -884,8 +884,8 @@ public class MultiUserChat { * XMPP error code 403. The error code can be used to present more * appropiate error messages to end-users. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void destroy(String reason, EntityBareJid alternateJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCOwner iq = new MUCOwner(); @@ -923,8 +923,8 @@ public class MultiUserChat { * * @param user the user to invite to the room.(e.g. hecate@shakespeare.lit) * @param reason the reason why the user is being invited. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void invite(EntityBareJid user, String reason) throws NotConnectedException, InterruptedException { invite(new Message(), user, reason); @@ -940,8 +940,8 @@ public class MultiUserChat { * @param message the message to use for sending the invitation. * @param user the user to invite to the room.(e.g. hecate@shakespeare.lit) * @param reason the reason why the user is being invited. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void invite(Message message, EntityBareJid user, String reason) throws NotConnectedException, InterruptedException { // TODO listen for 404 error code when inviter supplies a non-existent JID @@ -1067,7 +1067,7 @@ public class MultiUserChat { * * @return the reserved room nickname or null if none. * @throws SmackException if there was no response from the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public String getReservedNickname() throws SmackException, InterruptedException { try { @@ -1111,9 +1111,9 @@ public class MultiUserChat { * @param nickname the new nickname within the room. * @throws XMPPErrorException if the new nickname is already in use by another occupant. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException - * @throws MucNotJoinedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws MucNotJoinedException if not joined to the Multi-User Chat. */ public synchronized void changeNickname(Resourcepart nickname) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, MucNotJoinedException { Objects.requireNonNull(nickname, "Nickname must not be null or blank."); @@ -1150,9 +1150,9 @@ public class MultiUserChat { * * @param status a text message describing the presence update. * @param mode the mode type for the presence update. - * @throws NotConnectedException - * @throws InterruptedException - * @throws MucNotJoinedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws MucNotJoinedException if not joined to the Multi-User Chat. */ public void changeAvailabilityStatus(String status, Presence.Mode mode) throws NotConnectedException, InterruptedException, MucNotJoinedException { final EntityFullJid myRoomJid = this.myRoomJid; @@ -1194,8 +1194,8 @@ public class MultiUserChat { * not have kicking privileges (i.e. Forbidden error); or a * 400 error can occur if the provided nickname is not present in the room. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void kickParticipant(Resourcepart nickname, String reason) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nickname, MUCRole.none, reason); @@ -1204,8 +1204,8 @@ public class MultiUserChat { /** * Sends a voice request to the MUC. The room moderators usually need to approve this request. * - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-45 § 7.13 Requesting * Voice * @since 4.1 @@ -1236,8 +1236,8 @@ public class MultiUserChat { * a moderator in this room (i.e. Forbidden error); or a * 400 error can occur if the provided nickname is not present in the room. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantVoice(Collection nicknames) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nicknames, MUCRole.participant); @@ -1254,8 +1254,8 @@ public class MultiUserChat { * a moderator in this room (i.e. Forbidden error); or a * 400 error can occur if the provided nickname is not present in the room. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantVoice(Resourcepart nickname) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nickname, MUCRole.participant, null); @@ -1272,8 +1272,8 @@ public class MultiUserChat { * was tried to revoke his voice (i.e. Not Allowed error); or a * 400 error can occur if the provided nickname is not present in the room. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeVoice(Collection nicknames) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nicknames, MUCRole.visitor); @@ -1290,8 +1290,8 @@ public class MultiUserChat { * was tried to revoke his voice (i.e. Not Allowed error); or a * 400 error can occur if the provided nickname is not present in the room. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeVoice(Resourcepart nickname) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nickname, MUCRole.visitor, null); @@ -1309,8 +1309,8 @@ public class MultiUserChat { * 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin" * was tried to be banned (i.e. Not Allowed error). * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void banUsers(Collection jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.outcast); @@ -1329,8 +1329,8 @@ public class MultiUserChat { * 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin" * was tried to be banned (i.e. Not Allowed error). * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void banUser(Jid jid, String reason) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.outcast, reason); @@ -1344,8 +1344,8 @@ public class MultiUserChat { * @param jids the XMPP user IDs of the users to grant membership. * @throws XMPPErrorException if an error occurs granting membership to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantMembership(Collection jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.member); @@ -1359,8 +1359,8 @@ public class MultiUserChat { * @param jid the XMPP user ID of the user to grant membership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs granting membership to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantMembership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.member, null); @@ -1375,8 +1375,8 @@ public class MultiUserChat { * @param jids the bare XMPP user IDs of the users to revoke membership. * @throws XMPPErrorException if an error occurs revoking membership to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeMembership(Collection jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.none); @@ -1391,8 +1391,8 @@ public class MultiUserChat { * @param jid the bare XMPP user ID of the user to revoke membership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs revoking membership to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeMembership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.none, null); @@ -1406,8 +1406,8 @@ public class MultiUserChat { * @param nicknames the nicknames of the occupants to grant moderator privileges. * @throws XMPPErrorException if an error occurs granting moderator privileges to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantModerator(Collection nicknames) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nicknames, MUCRole.moderator); @@ -1421,8 +1421,8 @@ public class MultiUserChat { * @param nickname the nickname of the occupant to grant moderator privileges. * @throws XMPPErrorException if an error occurs granting moderator privileges to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantModerator(Resourcepart nickname) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nickname, MUCRole.moderator, null); @@ -1437,8 +1437,8 @@ public class MultiUserChat { * @param nicknames the nicknames of the occupants to revoke moderator privileges. * @throws XMPPErrorException if an error occurs revoking moderator privileges from a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeModerator(Collection nicknames) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nicknames, MUCRole.participant); @@ -1453,8 +1453,8 @@ public class MultiUserChat { * @param nickname the nickname of the occupant to revoke moderator privileges. * @throws XMPPErrorException if an error occurs revoking moderator privileges from a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeModerator(Resourcepart nickname) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeRole(nickname, MUCRole.participant, null); @@ -1469,8 +1469,8 @@ public class MultiUserChat { * @param jids the collection of bare XMPP user IDs of the users to grant ownership. * @throws XMPPErrorException if an error occurs granting ownership privileges to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantOwnership(Collection jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.owner); @@ -1485,8 +1485,8 @@ public class MultiUserChat { * @param jid the bare XMPP user ID of the user to grant ownership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs granting ownership privileges to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantOwnership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.owner, null); @@ -1500,8 +1500,8 @@ public class MultiUserChat { * @param jids the bare XMPP user IDs of the users to revoke ownership. * @throws XMPPErrorException if an error occurs revoking ownership privileges from a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeOwnership(Collection jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.admin); @@ -1515,8 +1515,8 @@ public class MultiUserChat { * @param jid the bare XMPP user ID of the user to revoke ownership (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs revoking ownership privileges from a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeOwnership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.admin, null); @@ -1530,8 +1530,8 @@ public class MultiUserChat { * @param jids the bare XMPP user IDs of the users to grant administrator privileges. * @throws XMPPErrorException if an error occurs granting administrator privileges to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantAdmin(Collection jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.admin); @@ -1546,8 +1546,8 @@ public class MultiUserChat { * (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs granting administrator privileges to a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void grantAdmin(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.admin); @@ -1561,8 +1561,8 @@ public class MultiUserChat { * @param jids the bare XMPP user IDs of the user to revoke administrator privileges. * @throws XMPPErrorException if an error occurs revoking administrator privileges from a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeAdmin(Collection jids) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jids, MUCAffiliation.admin); @@ -1577,8 +1577,8 @@ public class MultiUserChat { * (e.g. "user@host.org"). * @throws XMPPErrorException if an error occurs revoking administrator privileges from a user. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void revokeAdmin(EntityJid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.member); @@ -1587,12 +1587,12 @@ public class MultiUserChat { /** * Tries to change the affiliation with an 'muc#admin' namespace * - * @param jid - * @param affiliation - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @param jid TODO javadoc me please + * @param affiliation TODO javadoc me please + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private void changeAffiliationByAdmin(Jid jid, MUCAffiliation affiliation) throws NoResponseException, XMPPErrorException, @@ -1603,13 +1603,13 @@ public class MultiUserChat { /** * Tries to change the affiliation with an 'muc#admin' namespace * - * @param jid - * @param affiliation + * @param jid TODO javadoc me please + * @param affiliation TODO javadoc me please * @param reason the reason for the affiliation change (optional) - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private void changeAffiliationByAdmin(Jid jid, MUCAffiliation affiliation, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCAdmin iq = new MUCAdmin(); @@ -1750,8 +1750,8 @@ public class MultiUserChat { * @return a list of Affiliate with the room owners. * @throws XMPPErrorException if you don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getOwners() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getAffiliatesByAdmin(MUCAffiliation.owner); @@ -1763,8 +1763,8 @@ public class MultiUserChat { * @return a list of Affiliate with the room administrators. * @throws XMPPErrorException if you don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getAdmins() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getAffiliatesByAdmin(MUCAffiliation.admin); @@ -1776,8 +1776,8 @@ public class MultiUserChat { * @return a list of Affiliate with the room members. * @throws XMPPErrorException if you don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getMembers() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getAffiliatesByAdmin(MUCAffiliation.member); @@ -1789,8 +1789,8 @@ public class MultiUserChat { * @return a list of Affiliate with the room outcasts. * @throws XMPPErrorException if you don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getOutcasts() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getAffiliatesByAdmin(MUCAffiliation.outcast); @@ -1804,8 +1804,8 @@ public class MultiUserChat { * @return a collection of Affiliate that have the specified room affiliation. * @throws XMPPErrorException if you don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private List getAffiliatesByAdmin(MUCAffiliation affiliation) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCAdmin iq = new MUCAdmin(); @@ -1831,8 +1831,8 @@ public class MultiUserChat { * @return a list of Occupant with the room moderators. * @throws XMPPErrorException if you don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getModerators() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getOccupants(MUCRole.moderator); @@ -1844,8 +1844,8 @@ public class MultiUserChat { * @return a list of Occupant with the room participants. * @throws XMPPErrorException if you don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getParticipants() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getOccupants(MUCRole.participant); @@ -1859,8 +1859,8 @@ public class MultiUserChat { * @throws XMPPErrorException if an error occured while performing the request to the server or you * don't have enough privileges to get this information. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private List getOccupants(MUCRole role) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { MUCAdmin iq = new MUCAdmin(); @@ -1883,8 +1883,8 @@ public class MultiUserChat { * Sends a message to the chat room. * * @param text the text of the message to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendMessage(String text) throws NotConnectedException, InterruptedException { Message message = createMessage(); @@ -1923,8 +1923,8 @@ public class MultiUserChat { * Sends a Message to the chat room. * * @param message the message. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendMessage(Message message) throws NotConnectedException, InterruptedException { message.setTo(room); @@ -1942,7 +1942,7 @@ public class MultiUserChat { * * @return the next message if one is immediately available and * null otherwise. - * @throws MucNotJoinedException + * @throws MucNotJoinedException if not joined to the Multi-User Chat. */ public Message pollMessage() throws MucNotJoinedException { if (messageCollector == null) { @@ -1956,8 +1956,8 @@ public class MultiUserChat { * (not return) until a message is available. * * @return the next message. - * @throws MucNotJoinedException - * @throws InterruptedException + * @throws MucNotJoinedException if not joined to the Multi-User Chat. + * @throws InterruptedException if the calling thread was interrupted. */ public Message nextMessage() throws MucNotJoinedException, InterruptedException { if (messageCollector == null) { @@ -1974,8 +1974,8 @@ public class MultiUserChat { * @param timeout the maximum amount of time to wait for the next message. * @return the next message, or null if the timeout elapses without a * message becoming available. - * @throws MucNotJoinedException - * @throws InterruptedException + * @throws MucNotJoinedException if not joined to the Multi-User Chat. + * @throws InterruptedException if the calling thread was interrupted. */ public Message nextMessage(long timeout) throws MucNotJoinedException, InterruptedException { if (messageCollector == null) { @@ -2020,8 +2020,8 @@ public class MultiUserChat { * @throws XMPPErrorException if someone without appropriate privileges attempts to change the * room subject will throw an error with code 403 (i.e. Forbidden) * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void changeSubject(final String subject) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Message message = createMessage(); @@ -2367,10 +2367,10 @@ public class MultiUserChat { /** * Fires events according to the received presence code. * - * @param statusCodes - * @param isUserModification - * @param mucUser - * @param from + * @param statusCodes TODO javadoc me please + * @param isUserModification TODO javadoc me please + * @param mucUser TODO javadoc me please + * @param from TODO javadoc me please */ private void checkPresenceCode( Set statusCodes, diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java index 97d70a862..d2cb2e122 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatManager.java @@ -120,7 +120,7 @@ public final class MultiUserChatManager extends Manager { /** * Get a instance of a multi user chat manager for the given connection. * - * @param connection + * @param connection TODO javadoc me please * @return a multi user chat manager. */ public static synchronized MultiUserChatManager getInstanceFor(XMPPConnection connection) { @@ -281,10 +281,10 @@ public final class MultiUserChatManager extends Manager { * * @param user the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com. * @return a boolean indicating whether the specified user supports the MUC protocol. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isServiceEnabled(Jid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.supportsFeature(user, MUCInitialPresence.NAMESPACE); @@ -309,10 +309,10 @@ public final class MultiUserChatManager extends Manager { * * @param user the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com. * @return a List of the rooms where the requested user has joined. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getJoinedRooms(EntityFullJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -338,10 +338,10 @@ public final class MultiUserChatManager extends Manager { * * @param room the name of the room in the form "roomName@service" of which we want to discover its information. * @return the discovered information of a given room without actually having to join the room. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public RoomInfo getRoomInfo(EntityBareJid room) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverInfo info = serviceDiscoveryManager.discoverInfo(room); @@ -352,10 +352,10 @@ public final class MultiUserChatManager extends Manager { * Returns a collection with the XMPP addresses of the Multi-User Chat services. * * @return a collection with the XMPP addresses of the Multi-User Chat services. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getMucServiceDomains() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return serviceDiscoveryManager.findServices(MUCInitialPresence.NAMESPACE, false, false); @@ -365,10 +365,10 @@ public final class MultiUserChatManager extends Manager { * Returns a collection with the XMPP addresses of the Multi-User Chat services. * * @return a collection with the XMPP addresses of the Multi-User Chat services. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @deprecated use {@link #getMucServiceDomains()} instead. */ // TODO: Remove in Smack 4.5 @@ -382,10 +382,10 @@ public final class MultiUserChatManager extends Manager { * * @param domainBareJid the domain bare JID to check. * @return true if the provided JID provides a MUC service, false otherwise. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-45 § 6.2 Discovering the Features Supported by a MUC Service * @since 4.2 */ @@ -402,11 +402,11 @@ public final class MultiUserChatManager extends Manager { * * @param serviceName the service that is hosting the rooms to discover. * @return a map from the room's address to its HostedRoom information. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotAMucServiceException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotAMucServiceException if the entity is not a MUC serivce. * @since 4.3.1 */ public Map getRoomsHostedBy(DomainBareJid serviceName) throws NoResponseException, XMPPErrorException, @@ -434,8 +434,8 @@ public final class MultiUserChatManager extends Manager { * @param room the room that sent the original invitation. * @param inviter the inviter of the declined invitation. * @param reason the reason why the invitee is declining the invitation. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void decline(EntityBareJid room, EntityBareJid inviter, String reason) throws NotConnectedException, InterruptedException { Message message = new Message(room); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitation.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitation.java index d00f71586..f1244870e 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitation.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitation.java @@ -113,7 +113,7 @@ public class GroupChatInvitation implements ExtensionElement { /** * Deprecated. - * @param packet + * @param packet TODO javadoc me please * @return the GroupChatInvitation or null * @deprecated use {@link #from(Stanza)} instead */ @@ -124,7 +124,7 @@ public class GroupChatInvitation implements ExtensionElement { /** * Get the group chat invitation from the given stanza. - * @param packet + * @param packet TODO javadoc me please * @return the GroupChatInvitation or null */ public static GroupChatInvitation from(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCInitialPresence.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCInitialPresence.java index f96e5e835..e47450932 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCInitialPresence.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCInitialPresence.java @@ -140,7 +140,7 @@ public class MUCInitialPresence implements ExtensionElement { /** * Retrieve the MUCInitialPresence PacketExtension from packet, if any. * - * @param packet + * @param packet TODO javadoc me please * @return the MUCInitialPresence PacketExtension or {@code null} * @deprecated use {@link #from(Stanza)} instead */ @@ -152,7 +152,7 @@ public class MUCInitialPresence implements ExtensionElement { /** * Retrieve the MUCInitialPresence PacketExtension from packet, if any. * - * @param packet + * @param packet TODO javadoc me please * @return the MUCInitialPresence PacketExtension or {@code null} */ public static MUCInitialPresence from(Stanza packet) { @@ -169,22 +169,10 @@ public class MUCInitialPresence implements ExtensionElement { public static final String ELEMENT = "history"; - // TODO make those fields final once the deprecated setter methods have been removed. - private int maxChars; - private int maxStanzas; - private int seconds; - private Date since; - - /** - * Deprecated constructor. - * @deprecated use {@link #History(int, int, int, Date)} instead. - */ - @Deprecated - public History() { - this.maxChars = -1; - this.maxStanzas = -1; - this.seconds = -1; - } + private final int maxChars; + private final int maxStanzas; + private final int seconds; + private final Date since; public History(int maxChars, int maxStanzas, int seconds, Date since) { if (maxChars < 0 && maxStanzas < 0 && seconds < 0 && since == null) { @@ -236,55 +224,6 @@ public class MUCInitialPresence implements ExtensionElement { return since; } - /** - * Sets the total number of characters to receive in the history. - * - * @param maxChars the total number of characters to receive in the history. - * @deprecated use {@link #History(int, int, int, Date)} instead. - */ - @Deprecated - public void setMaxChars(int maxChars) { - this.maxChars = maxChars; - } - - /** - * Sets the total number of messages to receive in the history. - * - * @param maxStanzas the total number of messages to receive in the history. - * @deprecated use {@link #History(int, int, int, Date)} instead. - */ - @Deprecated - public void setMaxStanzas(int maxStanzas) { - this.maxStanzas = maxStanzas; - } - - /** - * Sets the number of seconds to use to filter the messages received during that time. - * In other words, only the messages received in the last "X" seconds will be included in - * the history. - * - * @param seconds the number of seconds to use to filter the messages received during - * that time. - * @deprecated use {@link #History(int, int, int, Date)} instead. - */ - @Deprecated - public void setSeconds(int seconds) { - this.seconds = seconds; - } - - /** - * Sets the since date to use to filter the messages received during that time. - * In other words, only the messages received since the datetime specified will be - * included in the history. - * - * @param since the since date to use to filter the messages received during that time. - * @deprecated use {@link #History(int, int, int, Date)} instead. - */ - @Deprecated - public void setSince(Date since) { - this.since = since; - } - @Override public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) { XmlStringBuilder xml = new XmlStringBuilder(this); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCItem.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCItem.java index b2b49c9b7..c1ee5ae28 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCItem.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCItem.java @@ -71,11 +71,11 @@ public class MUCItem implements NamedElement { * * @param affiliation the actor's affiliation to the room * @param role the privilege level of an occupant within a room. - * @param actor - * @param reason - * @param jid - * @param nick - * @param actorNick + * @param actor TODO javadoc me please + * @param reason TODO javadoc me please + * @param jid TODO javadoc me please + * @param nick TODO javadoc me please + * @param actorNick TODO javadoc me please */ public MUCItem(MUCAffiliation affiliation, MUCRole role, Jid actor, String reason, Jid jid, Resourcepart nick, Resourcepart actorNick) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCUser.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCUser.java index eba5144fe..9d5ff84a9 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCUser.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/packet/MUCUser.java @@ -220,7 +220,7 @@ public class MUCUser implements ExtensionElement { /** * Retrieve the MUCUser PacketExtension from packet, if any. * - * @param packet + * @param packet TODO javadoc me please * @return the MUCUser PacketExtension or {@code null} * @deprecated use {@link #from(Stanza)} instead */ @@ -232,7 +232,7 @@ public class MUCUser implements ExtensionElement { /** * Retrieve the MUCUser PacketExtension from packet, if any. * - * @param packet + * @param packet TODO javadoc me please * @return the MUCUser PacketExtension or {@code null} */ public static MUCUser from(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/MUCUserProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/MUCUserProvider.java index d96f1fc42..4eed95435 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/MUCUserProvider.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/MUCUserProvider.java @@ -43,8 +43,8 @@ public class MUCUserProvider extends ExtensionElementProvider { * * @param parser the XML parser, positioned at the starting element of the extension. * @return a PacketExtension. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public MUCUser parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/OfflineMessageManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/OfflineMessageManager.java index f1bbb7d7e..367e7811a 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/OfflineMessageManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/OfflineMessageManager.java @@ -81,8 +81,8 @@ public class OfflineMessageManager { * @return a boolean indicating if the server supports Flexible Offline Message Retrieval. * @throws XMPPErrorException If the user is not allowed to make this request. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean supportsFlexibleRetrieval() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection).serverSupportsFeature(namespace); @@ -95,8 +95,8 @@ public class OfflineMessageManager { * @throws XMPPErrorException If the user is not allowed to make this request or the server does * not support offline message retrieval. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public int getMessageCount() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverInfo info = ServiceDiscoveryManager.getInstanceFor(connection).discoverInfo(null, @@ -119,8 +119,8 @@ public class OfflineMessageManager { * @throws XMPPErrorException If the user is not allowed to make this request or the server does * not support offline message retrieval. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getHeaders() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { List answer = new ArrayList<>(); @@ -144,8 +144,8 @@ public class OfflineMessageManager { * @throws XMPPErrorException If the user is not allowed to make this request or the server does * not support offline message retrieval. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getMessages(final List nodes) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { List messages = new ArrayList<>(nodes.size()); @@ -192,8 +192,8 @@ public class OfflineMessageManager { * @throws XMPPErrorException If the user is not allowed to make this request or the server does * not support offline message retrieval. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getMessages() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { OfflineMessageRequest request = new OfflineMessageRequest(); @@ -226,8 +226,8 @@ public class OfflineMessageManager { * @throws XMPPErrorException If the user is not allowed to make this request or the server does * not support offline message retrieval. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void deleteMessages(List nodes) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { OfflineMessageRequest request = new OfflineMessageRequest(); @@ -246,8 +246,8 @@ public class OfflineMessageManager { * @throws XMPPErrorException If the user is not allowed to make this request or the server does * not support offline message retrieval. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void deleteMessages() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { OfflineMessageRequest request = new OfflineMessageRequest(); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/packet/OfflineMessageInfo.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/packet/OfflineMessageInfo.java index 0bbb078ba..ee80d5a9b 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/packet/OfflineMessageInfo.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/offline/packet/OfflineMessageInfo.java @@ -99,8 +99,8 @@ public class OfflineMessageInfo implements ExtensionElement { * * @param parser the XML parser, positioned at the starting element of the extension. * @return a PacketExtension. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public OfflineMessageInfo parse(XmlPullParser parser, diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java index d41d4b89d..b31a3d3e2 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pep/PepManager.java @@ -153,11 +153,11 @@ public final class PepManager extends Manager { * @param nodeId the ID of the node to publish on. * @param item the item to publish. * @return the leaf node the item was published on. - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotALeafNodeException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. */ public LeafNode publish(String nodeId, Item item) throws NotConnectedException, InterruptedException, NoResponseException, XMPPErrorException, NotALeafNodeException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/PingManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/PingManager.java index 89d4b5bb3..0bb1b0e65 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/PingManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/PingManager.java @@ -79,7 +79,7 @@ public final class PingManager extends Manager { * Retrieves a {@link PingManager} for the specified {@link XMPPConnection}, creating one if it doesn't already * exist. * - * @param connection + * @param connection TODO javadoc me please * The connection the manager is attached to. * @return The new or existing manager. */ @@ -223,8 +223,8 @@ public final class PingManager extends Manager { * @param pingTimeout The time to wait for a reply in milliseconds * @return true if a reply was received from the entity, false otherwise. * @throws NoResponseException if there was no response from the jid. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean ping(Jid jid, long pingTimeout) throws NotConnectedException, NoResponseException, InterruptedException { final XMPPConnection connection = connection(); @@ -249,9 +249,9 @@ public final class PingManager extends Manager { * * @param jid The id of the entity the ping is being sent to * @return true if a reply was received from the entity, false otherwise. - * @throws NotConnectedException + * @throws NotConnectedException if the XMPP connection is not connected. * @throws NoResponseException if there was no response from the jid. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public boolean ping(Jid jid) throws NotConnectedException, NoResponseException, InterruptedException { return ping(jid, connection().getReplyTimeout()); @@ -264,8 +264,8 @@ public final class PingManager extends Manager { * @return true if it supports ping, false otherwise. * @throws XMPPErrorException An XMPP related error occurred during the request * @throws NoResponseException if there was no response from the jid. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isPingSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, Ping.NAMESPACE); @@ -279,8 +279,8 @@ public final class PingManager extends Manager { * {@link #isPingSupported(Jid)} is false. * * @return true if a reply was received from the server, false otherwise. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean pingMyServer() throws NotConnectedException, InterruptedException { return pingMyServer(true); @@ -295,8 +295,8 @@ public final class PingManager extends Manager { * * @param notifyListeners Notify the PingFailedListener in case of error if true * @return true if the user's server could be pinged. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean pingMyServer(boolean notifyListeners) throws NotConnectedException, InterruptedException { return pingMyServer(notifyListeners, connection().getReplyTimeout()); @@ -312,8 +312,8 @@ public final class PingManager extends Manager { * @param notifyListeners Notify the PingFailedListener in case of error if true * @param pingTimeout The time to wait for a reply in milliseconds * @return true if the user's server could be pinged. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean pingMyServer(boolean notifyListeners, long pingTimeout) throws NotConnectedException, InterruptedException { boolean res; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/PrivacyListManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/PrivacyListManager.java index 6e3dcd405..bf40cc8e6 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/PrivacyListManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/PrivacyListManager.java @@ -224,10 +224,10 @@ public final class PrivacyListManager extends Manager { * @param requestPrivacy is the {@link Privacy} stanza configured properly whose XML * will be sent to the server. * @return a new {@link Privacy} with the data received from the server. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private Privacy getRequest(Privacy requestPrivacy) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request is a get iq type @@ -243,10 +243,10 @@ public final class PrivacyListManager extends Manager { * @param requestPrivacy is the {@link Privacy} stanza configured properly whose xml will be * sent to the server. * @return a new {@link Privacy} with the data received from the server. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private Stanza setRequest(Privacy requestPrivacy) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request is a get iq type @@ -259,10 +259,10 @@ public final class PrivacyListManager extends Manager { * Answer a privacy containing the list structure without {@link PrivacyItem}. * * @return a Privacy with the list names. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private Privacy getPrivacyWithListNames() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request of the list is an empty privacy message @@ -276,10 +276,10 @@ public final class PrivacyListManager extends Manager { * Answer the active privacy list. Returns null if there is no active list. * * @return the privacy list of the active list. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public PrivacyList getActiveList() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Privacy privacyAnswer = this.getPrivacyWithListNames(); @@ -295,10 +295,10 @@ public final class PrivacyListManager extends Manager { * Get the name of the active list. * * @return the name of the active list or null if there is none set. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.1 */ public String getActiveListName() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -312,10 +312,10 @@ public final class PrivacyListManager extends Manager { * Answer the default privacy list. Returns null if there is no default list. * * @return the privacy list of the default list. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public PrivacyList getDefaultList() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Privacy privacyAnswer = this.getPrivacyWithListNames(); @@ -331,10 +331,10 @@ public final class PrivacyListManager extends Manager { * Get the name of the default list. * * @return the name of the default list or null if there is none set. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.1 */ public String getDefaultListName() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -352,10 +352,10 @@ public final class PrivacyListManager extends Manager { *

    * * @return the name of the effective privacy list or null if there is none set. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.1 */ public String getEffectiveListName() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -371,10 +371,10 @@ public final class PrivacyListManager extends Manager { * * @param listName the name of the list to get the allowed and blocked permissions. * @return a list of privacy items under the list listName. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private List getPrivacyListItems(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { assert StringUtils.isNotEmpty(listName); @@ -393,10 +393,10 @@ public final class PrivacyListManager extends Manager { * * @param listName the name of the list to get the allowed and blocked permissions. * @return a privacy list under the list listName. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public PrivacyList getPrivacyList(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { listName = StringUtils.requireNotNullNorEmpty(listName, "List name must not be null"); @@ -407,10 +407,10 @@ public final class PrivacyListManager extends Manager { * Answer every privacy list with the allowed and blocked permissions. * * @return an array of privacy lists. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getPrivacyLists() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Privacy privacyAnswer = getPrivacyWithListNames(); @@ -429,10 +429,10 @@ public final class PrivacyListManager extends Manager { * Set or change the active list to listName. * * @param listName the list name to set as the active one. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void setActiveListName(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request of the list is an privacy message with an empty list @@ -445,10 +445,10 @@ public final class PrivacyListManager extends Manager { /** * Client declines the use of active lists. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void declineActiveList() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request of the list is an privacy message with an empty list @@ -463,10 +463,10 @@ public final class PrivacyListManager extends Manager { * Set or change the default list to listName. * * @param listName the list name to set as the default one. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void setDefaultListName(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request of the list is an privacy message with an empty list @@ -479,10 +479,10 @@ public final class PrivacyListManager extends Manager { /** * Client declines the use of default lists. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void declineDefaultList() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request of the list is an privacy message with an empty list @@ -498,10 +498,10 @@ public final class PrivacyListManager extends Manager { * * @param listName the list that has changed its content. * @param privacyItems a List with every privacy item in the list. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void createPrivacyList(String listName, List privacyItems) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { updatePrivacyList(listName, privacyItems); @@ -514,10 +514,10 @@ public final class PrivacyListManager extends Manager { * * @param listName the list that has changed its content. * @param privacyItems a List with every privacy item in the list. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void updatePrivacyList(String listName, List privacyItems) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Build the privacy package to add or update the new list @@ -532,10 +532,10 @@ public final class PrivacyListManager extends Manager { * Remove a privacy list. * * @param listName the list that has changed its content. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void deletePrivacyList(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // The request of the list is an privacy message with an empty list @@ -560,7 +560,7 @@ public final class PrivacyListManager extends Manager { /** * Removes the privacy list listener. * - * @param listener + * @param listener TODO javadoc me please * @return true, if the listener was removed. */ public boolean removeListener(PrivacyListListener listener) { @@ -571,10 +571,10 @@ public final class PrivacyListManager extends Manager { * Check if the user's server supports privacy lists. * * @return true, if the server supports privacy lists, false otherwise. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isSupported() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).serverSupportsFeature(NAMESPACE); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Affiliation.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Affiliation.java index 65195cca0..982f8668d 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Affiliation.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Affiliation.java @@ -95,8 +95,8 @@ public class Affiliation implements ExtensionElement { /** * Construct a affiliation modification request. * - * @param jid - * @param affiliation + * @param jid TODO javadoc me please + * @param affiliation TODO javadoc me please */ public Affiliation(BareJid jid, Type affiliation) { this(jid, affiliation, AffiliationNamespace.owner); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ConfigureForm.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ConfigureForm.java index f3671d07b..d77602583 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ConfigureForm.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ConfigureForm.java @@ -39,7 +39,7 @@ public class ConfigureForm extends Form { * Create a decorator from an existing {@link DataForm} that has been * retrieved from parsing a node configuration request. * - * @param configDataForm + * @param configDataForm TODO javadoc me please */ public ConfigureForm(DataForm configDataForm) { super(configDataForm); @@ -50,7 +50,7 @@ public class ConfigureForm extends Form { * Typically, this can be used to create a decorator for an answer form * by using the result of {@link #createAnswerForm()} as the input parameter. * - * @param nodeConfigForm + * @param nodeConfigForm TODO javadoc me please */ public ConfigureForm(Form nodeConfigForm) { super(nodeConfigForm.getDataFormToSend()); @@ -61,7 +61,7 @@ public class ConfigureForm extends Form { * when creating and configuring a node at the same time via {@link PubSubManager#createNode(String, Form)}, since * configuration of an existing node is typically accomplished by calling {@link LeafNode#getNodeConfiguration()} and * using the resulting form to create a answer form. See {@link #ConfigureForm(Form)}. - * @param formType + * @param formType TODO javadoc me please */ public ConfigureForm(DataForm.Type formType) { super(formType); @@ -84,7 +84,7 @@ public class ConfigureForm extends Form { /** * Sets the value of access model. * - * @param accessModel + * @param accessModel TODO javadoc me please */ public void setAccessModel(AccessModel accessModel) { addField(ConfigureNodeFields.access_model, FormField.Type.list_single); @@ -124,7 +124,7 @@ public class ConfigureForm extends Form { /** * Set the list of child node ids that are associated with a collection node. * - * @param children + * @param children TODO javadoc me please */ public void setChildren(List children) { addField(ConfigureNodeFields.children, FormField.Type.text_multi); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Item.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Item.java index 04f277339..eaee0b168 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Item.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Item.java @@ -99,6 +99,7 @@ public class Item extends NodeExtension { * Create an Item with an id but no payload. This is a valid item for nodes which are configured * so that {@link ConfigureForm#isDeliverPayloads()} is false. * + * @param itemNamespace the namespace of the item. * @param itemId The id if the item. It must be unique within the node unless overwriting and existing item. * Passing null is the equivalent of calling {@link #Item()}. */ @@ -129,6 +130,7 @@ public class Item extends NodeExtension { * (via {@link LeafNode#publish(Item)}, the server may return an * error for an invalid packet. * + * @param itemNamespace the namespace of the item. * @param itemId The id of the item. * @param nodeId The id of the node which the item was published to. */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ItemsExtension.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ItemsExtension.java index c960a8843..12d7a4aa6 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ItemsExtension.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ItemsExtension.java @@ -106,7 +106,7 @@ public class ItemsExtension extends NodeExtension implements EmbeddedPacketExten * * @param nodeId The node to which the items are being sent or deleted * @param items The list of {@link Item} or {@link RetractItem} - * @param notify + * @param notify TODO javadoc me please */ public ItemsExtension(String nodeId, List items, boolean notify) { super(ItemsElementType.retract.getNodeElement(), nodeId); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java index f2ea6abf0..be658275e 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java @@ -47,10 +47,10 @@ public class LeafNode extends Node { * {@link DiscoverItems} format. * * @return The item details in {@link DiscoverItems} format - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverItems discoverItems() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverItems items = new DiscoverItems(); @@ -64,10 +64,10 @@ public class LeafNode extends Node { * * @param type of the items. * @return List of {@link Item} in the node - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getItems() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getItems((List) null, null); @@ -83,10 +83,10 @@ public class LeafNode extends Node { * @param type of the items. * * @return List of {@link Item} in the node - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getItems(String subscriptionId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub request = createPubsubPacket(Type.get, new GetItemsRequest(getId(), subscriptionId)); @@ -104,10 +104,10 @@ public class LeafNode extends Node { * @param type of the items. * * @return The list of {@link Item} with payload - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getItems(Collection ids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { List itemList = new ArrayList<>(ids.size()); @@ -126,10 +126,10 @@ public class LeafNode extends Node { * @param type of the items. * * @return List of {@link Item} - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getItems(int maxItems) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub request = createPubsubPacket(Type.get, new GetItemsRequest(getId(), maxItems)); @@ -147,10 +147,10 @@ public class LeafNode extends Node { * @return List of {@link Item} * @param type of the items. * - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getItems(int maxItems, String subscriptionId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub request = createPubsubPacket(Type.get, new GetItemsRequest(getId(), subscriptionId, maxItems)); @@ -171,10 +171,10 @@ public class LeafNode extends Node { * @param type of the items. * * @return List of {@link Item} - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getItems(List additionalExtensions, List returnedExtensions) throws NoResponseException, @@ -208,10 +208,10 @@ public class LeafNode extends Node { * This is only acceptable for nodes with {@link ConfigureForm#isPersistItems()}=false * and {@link ConfigureForm#isDeliverPayloads()}=false. * - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException - * @throws NoResponseException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. * @deprecated use {@link #publish()} instead. */ @Deprecated @@ -230,10 +230,10 @@ public class LeafNode extends Node { * @param item - The item being sent * @param type of the items. * - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException - * @throws NoResponseException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. * @deprecated use {@link #publish(Item)} instead. */ @SuppressWarnings("unchecked") @@ -251,10 +251,10 @@ public class LeafNode extends Node { * @param items - The collection of items being sent * @param type of the items. * - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException - * @throws NoResponseException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. * @deprecated use {@link #publish(Collection)} instead. */ @Deprecated @@ -269,10 +269,10 @@ public class LeafNode extends Node { * This is only acceptable for nodes with {@link ConfigureForm#isPersistItems()}=false * and {@link ConfigureForm#isDeliverPayloads()}=false. * - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ public void publish() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -296,10 +296,10 @@ public class LeafNode extends Node { * @param item - The item being sent * @param type of the items. * - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ @SuppressWarnings("unchecked") @@ -318,10 +318,10 @@ public class LeafNode extends Node { * @param items - The collection of {@link Item} objects being sent * @param type of the items. * - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ public void publish(Collection items) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -335,10 +335,10 @@ public class LeafNode extends Node { * *

    Note: Some implementations may keep the last item * sent. - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void deleteAllItems() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub request = createPubsubPacket(Type.set, new NodeExtension(PubSubElementType.PURGE_OWNER, getId())); @@ -350,10 +350,10 @@ public class LeafNode extends Node { * Delete the item with the specified id from the node. * * @param itemId The id of the item - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void deleteItem(String itemId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Collection items = new ArrayList<>(1); @@ -365,10 +365,10 @@ public class LeafNode extends Node { * Delete the items with the specified id's from the node. * * @param itemIds The list of id's of items to delete - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void deleteItem(Collection itemIds) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { List items = new ArrayList<>(itemIds.size()); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java index 05def395b..2af5c3b19 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java @@ -83,10 +83,10 @@ public abstract class Node { * via the {@link #sendConfigurationForm(Form)}. * * @return the configuration form - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public ConfigureForm getNodeConfiguration() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub pubSub = createPubsubPacket(Type.get, new NodeExtension( @@ -98,11 +98,11 @@ public abstract class Node { /** * Update the configuration with the contents of the new {@link Form}. * - * @param submitForm - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @param submitForm TODO javadoc me please + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendConfigurationForm(Form submitForm) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub packet = createPubsubPacket(Type.set, new FormNode(FormNodeType.CONFIGURE_OWNER, @@ -114,10 +114,10 @@ public abstract class Node { * Discover node information in standard {@link DiscoverInfo} format. * * @return The discovery information about the node. - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverInfo discoverInfo() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverInfo info = new DiscoverInfo(); @@ -130,10 +130,10 @@ public abstract class Node { * Get the subscriptions currently associated with this node. * * @return List of {@link Subscription} - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ public List getSubscriptions() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -147,14 +147,14 @@ public abstract class Node { * {@code returnedExtensions} will be filled with the stanza extensions found in the answer. *

    * - * @param additionalExtensions + * @param additionalExtensions TODO javadoc me please * @param returnedExtensions a collection that will be filled with the returned packet * extensions * @return List of {@link Subscription} - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getSubscriptions(List additionalExtensions, Collection returnedExtensions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -165,10 +165,10 @@ public abstract class Node { * Get the subscriptions currently associated with this node as owner. * * @return List of {@link Subscription} - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see #getSubscriptionsAsOwner(List, Collection) * @since 4.1 */ @@ -189,13 +189,13 @@ public abstract class Node { * {@code returnedExtensions} will be filled with the stanza extensions found in the answer. *

    * - * @param additionalExtensions + * @param additionalExtensions TODO javadoc me please * @param returnedExtensions a collection that will be filled with the returned stanza extensions * @return List of {@link Subscription} - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-60 § 8.8.1 - * Retrieve Subscriptions List * @since 4.1 @@ -234,10 +234,10 @@ public abstract class Node { * * @param changedSubs subscriptions that have changed * @return null or a PubSub stanza with additional information on success. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-60 § 8.8.2 Modify Subscriptions * @since 4.3 */ @@ -253,10 +253,10 @@ public abstract class Node { * Get the affiliations of this node. * * @return List of {@link Affiliation} - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getAffiliations() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -274,10 +274,10 @@ public abstract class Node { * @param returnedExtensions a collection that will be filled with the returned packet * extensions * @return List of {@link Affiliation} - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getAffiliations(List additionalExtensions, Collection returnedExtensions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -289,10 +289,10 @@ public abstract class Node { * Retrieve the affiliation list for this node as owner. * * @return list of entities whose affiliation is not 'none'. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see #getAffiliations(List, Collection) * @since 4.2 */ @@ -312,10 +312,10 @@ public abstract class Node { * @param returnedExtensions an optional collection that will be filled with the returned * extension elements. * @return list of entities whose affiliation is not 'none'. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-60 § 8.9.1 Retrieve Affiliations List * @since 4.2 */ @@ -351,12 +351,12 @@ public abstract class Node { * Note that this is an optional PubSub feature ('pubsub#modify-affiliations'). *

    * - * @param affiliations + * @param affiliations TODO javadoc me please * @return null or a PubSub stanza with additional information on success. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-60 § 8.9.2 Modify Affiliation * @since 4.2 */ @@ -385,10 +385,10 @@ public abstract class Node { * the caller can configure it but is not required to do so. * @param jid The jid to subscribe as. * @return The subscription - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Subscription subscribe(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub pubSub = createPubsubPacket(Type.set, new SubscribeExtension(jid, getId())); @@ -410,10 +410,10 @@ public abstract class Node { * * @param jidString The jid to subscribe as. * @return The subscription - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @throws IllegalArgumentException if the provided string is not a valid JID. * @deprecated use {@link #subscribe(Jid)} instead. */ @@ -443,13 +443,13 @@ public abstract class Node { * the caller can configure it but is not required to do so. * * @param jid The jid to subscribe as. - * @param subForm + * @param subForm TODO javadoc me please * * @return The subscription - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Subscription subscribe(Jid jid, SubscribeForm subForm) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub request = createPubsubPacket(Type.set, new SubscribeExtension(jid, getId())); @@ -472,13 +472,13 @@ public abstract class Node { * the caller can configure it but is not required to do so. * * @param jidString The jid to subscribe as. - * @param subForm + * @param subForm TODO javadoc me please * * @return The subscription - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @throws IllegalArgumentException if the provided string is not a valid JID. * @deprecated use {@link #subscribe(Jid, SubscribeForm)} instead. */ @@ -500,10 +500,10 @@ public abstract class Node { * use {@link #unsubscribe(String, String)}. * * @param jid The JID used to subscribe to the node - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ public void unsubscribe(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -515,10 +515,10 @@ public abstract class Node { * * @param jid The JID used to subscribe to the node * @param subscriptionId The id of the subscription being removed - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void unsubscribe(String jid, String subscriptionId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { sendPubsubPacket(createPubsubPacket(Type.set, new UnsubscribeExtension(jid, getId(), subscriptionId))); @@ -528,13 +528,13 @@ public abstract class Node { * Returns a SubscribeForm for subscriptions, from which you can create an answer form to be submitted * via the {@link #sendConfigurationForm(Form)}. * - * @param jid + * @param jid TODO javadoc me please * * @return A subscription options form - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public SubscribeForm getSubscriptionOptions(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getSubscriptionOptions(jid, null); @@ -548,10 +548,10 @@ public abstract class Node { * @param subscriptionId The subscription id * * @return The subscription option form - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ public SubscribeForm getSubscriptionOptions(String jid, String subscriptionId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PayloadItem.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PayloadItem.java index ca843a805..f2c9058aa 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PayloadItem.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PayloadItem.java @@ -107,6 +107,7 @@ public class PayloadItem extends Item { * error for an invalid packet. *

    * + * @param itemNamespace the namespace of the item. * @param itemId The id of this item. * @param nodeId The id of the node the item was published to. * @param payloadExt A {@link ExtensionElement} which represents the payload data. diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java index 85e37e25e..be92f373b 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java @@ -86,7 +86,7 @@ public final class PubSubManager extends Manager { /** * Get a PubSub manager for the default PubSub service of the connection. * - * @param connection + * @param connection TODO javadoc me please * @return the default PubSub manager. */ // CHECKSTYLE:OFF:RegexpSingleline @@ -155,6 +155,8 @@ public final class PubSubManager extends Manager { /** * Deprecated. * + * @param connection the connection. + * @return the PubSub manager for the given connection. * @deprecated use {@link #getInstanceFor(XMPPConnection)} instead. */ @Deprecated @@ -166,6 +168,9 @@ public final class PubSubManager extends Manager { /** * Deprecated. * + * @param connection the connection. + * @param pubSubService the XMPP address of the PubSub service. + * @return the PubSub manager for the given connection. * @deprecated use {@link #getInstanceFor(XMPPConnection, BareJid)} instead. */ @Deprecated @@ -201,10 +206,10 @@ public final class PubSubManager extends Manager { * Creates an instant node, if supported. * * @return The node that was created - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public LeafNode createNode() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub reply = sendPubsubPacket(Type.set, new NodeExtension(PubSubElementType.CREATE), null); @@ -222,10 +227,10 @@ public final class PubSubManager extends Manager { * @param nodeId The id of the node, which must be unique within the * pubsub service * @return The node that was created - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public LeafNode createNode(String nodeId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return (LeafNode) createNode(nodeId, null); @@ -240,10 +245,10 @@ public final class PubSubManager extends Manager { * pubsub service * @param config The configuration for the node * @return The node that was created - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Node createNode(String nodeId, Form config) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub request = PubSub.createPubsubPacket(pubSubService, Type.set, new NodeExtension(PubSubElementType.CREATE, nodeId)); @@ -275,9 +280,9 @@ public final class PubSubManager extends Manager { * @return the node * @throws XMPPErrorException The node does not exist * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotAPubSubNodeException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotAPubSubNodeException if a involved node is not a PubSub node. */ public Node getNode(String id) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAPubSubNodeException { StringUtils.requireNotNullNorEmpty(id, "The node ID can not be null or the empty string"); @@ -309,10 +314,10 @@ public final class PubSubManager extends Manager { * * @param id The unique ID of the node. * @return the leaf node. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NotALeafNodeException in case the node already exists as collection node. * @since 4.2.1 */ @@ -361,11 +366,11 @@ public final class PubSubManager extends Manager { * @param id the node ID. * @return the requested leaf node. * @throws NotALeafNodeException in case the node exists but is a collection node. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException - * @throws NotAPubSubNodeException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotAPubSubNodeException if a involved node is not a PubSub node. * @since 4.2.1 */ public LeafNode getLeafNode(String id) throws NotALeafNodeException, NoResponseException, NotConnectedException, @@ -431,11 +436,11 @@ public final class PubSubManager extends Manager { * @param type of the item. * * @return the LeafNode on which the item was published. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException - * @throws NotALeafNodeException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. * @since 4.2.1 */ public LeafNode tryToPublishAndPossibleAutoCreate(String id, I item) @@ -467,10 +472,10 @@ public final class PubSubManager extends Manager { * @param nodeId - The id of the collection node for which the child * nodes will be returned. * @return {@link DiscoverItems} representing the existing nodes - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverItems discoverNodes(String nodeId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverItems items = new DiscoverItems(); @@ -486,10 +491,10 @@ public final class PubSubManager extends Manager { * Gets the subscriptions on the root node. * * @return List of exceptions - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getSubscriptions() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Stanza reply = sendPubsubPacket(Type.get, new NodeExtension(PubSubElementType.SUBSCRIPTIONS), null); @@ -501,10 +506,10 @@ public final class PubSubManager extends Manager { * Gets the affiliations on the root node. * * @return List of affiliations - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * */ public List getAffiliations() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -516,11 +521,11 @@ public final class PubSubManager extends Manager { /** * Delete the specified node. * - * @param nodeId - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @param nodeId TODO javadoc me please + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @return true if this node existed and was deleted and false if this node did not exist. */ public boolean deleteNode(String nodeId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -542,10 +547,10 @@ public final class PubSubManager extends Manager { * Returns the default settings for Node configuration. * * @return configuration form containing the default settings. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public ConfigureForm getDefaultConfiguration() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Errors will cause exceptions in getReply, so it only returns @@ -568,10 +573,10 @@ public final class PubSubManager extends Manager { * as a standard {@link DiscoverInfo} instance. * * @return The supported features - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public DiscoverInfo getSupportedFeatures() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { ServiceDiscoveryManager mgr = ServiceDiscoveryManager.getInstanceFor(connection()); @@ -582,10 +587,10 @@ public final class PubSubManager extends Manager { * Check if the PubSub service supports automatic node creation. * * @return true if the PubSub service supports automatic node creation. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2.1 * @see XEP-0060 § 7.1.4 Automatic Node Creation */ @@ -606,10 +611,10 @@ public final class PubSubManager extends Manager { *

    * * @return true if it is possible to create nodes, false otherwise. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException - * @throws XMPPErrorException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPErrorException if there was an XMPP error returned. */ public boolean canCreateNodesAndPublishItems() throws NoResponseException, NotConnectedException, InterruptedException, XMPPErrorException { LeafNode leafNode = null; @@ -664,12 +669,12 @@ public final class PubSubManager extends Manager { * simply an arbitrary XMPP service with the PubSub feature and an identity of category "pubsub" * and type "service". * - * @param connection + * @param connection TODO javadoc me please * @return the default PubSub service or null. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-60 § 5.1 Discover * Features */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java index f68524d16..857c61054 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java @@ -65,7 +65,7 @@ public class SubscribeForm extends Form { /** * Sets whether an entity wants to receive notifications. * - * @param deliverNotifications + * @param deliverNotifications TODO javadoc me please */ public void setDeliverOn(boolean deliverNotifications) { addField(SubscribeOptionFields.deliver, FormField.Type.bool); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/util/NodeUtils.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/util/NodeUtils.java index 43a2ee002..b505b364b 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/util/NodeUtils.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/util/NodeUtils.java @@ -32,8 +32,8 @@ public class NodeUtils { /** * Get a {@link ConfigureForm} from a packet. * - * @param packet - * @param elem + * @param packet TODO javadoc me please + * @param elem TODO javadoc me please * @return The configuration form */ public static ConfigureForm getFormFromPacket(Stanza packet, PubSubElementType elem) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/receipts/DeliveryReceiptManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/receipts/DeliveryReceiptManager.java index ca15cb0cc..0fc5d1cdd 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/receipts/DeliveryReceiptManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/receipts/DeliveryReceiptManager.java @@ -207,11 +207,11 @@ public final class DeliveryReceiptManager extends Manager { /** * Returns true if Delivery Receipts are supported by a given JID. * - * @param jid + * @param jid TODO javadoc me please * @return true if supported * @throws SmackException if there was no response from the server. - * @throws XMPPException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isSupported(Jid jid) throws SmackException, XMPPException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java index cf22f3266..2b734f61d 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java @@ -65,10 +65,10 @@ public class UserSearch extends SimpleIQ { * @param con the current XMPPConnection. * @param searchService the search service to use. (ex. search.jivesoftware.com) * @return the search form received by the server. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Form getSearchForm(XMPPConnection con, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { UserSearch search = new UserSearch(); @@ -86,10 +86,10 @@ public class UserSearch extends SimpleIQ { * @param searchForm the Form to send for querying. * @param searchService the search service to use. (ex. search.jivesoftware.com) * @return ReportedData the data found from the query. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public ReportedData sendSearchForm(XMPPConnection con, Form searchForm, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { UserSearch search = new UserSearch(); @@ -108,10 +108,10 @@ public class UserSearch extends SimpleIQ { * @param searchForm the Form to send for querying. * @param searchService the search service to use. (ex. search.jivesoftware.com) * @return ReportedData the data found from the query. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public ReportedData sendSimpleSearchForm(XMPPConnection con, Form searchForm, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { SimpleUserSearch search = new SimpleUserSearch(); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearchManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearchManager.java index 2566a548e..85bcddd6f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearchManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearchManager.java @@ -66,10 +66,10 @@ public class UserSearchManager { * * @param searchService the search service to query. * @return the form to fill out to perform a search. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Form getSearchForm(DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return userSearch.getSearchForm(con, searchService); @@ -82,10 +82,10 @@ public class UserSearchManager { * @param searchForm the Form to submit for searching. * @param searchService the name of the search service to use. * @return the ReportedData returned by the server. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public ReportedData getSearchResults(Form searchForm, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return userSearch.sendSearchForm(con, searchForm, searchService); @@ -96,10 +96,10 @@ public class UserSearchManager { * Returns a collection of search services found on the server. * * @return a Collection of search services found on the server. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public List getSearchServices() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(con); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/sharedgroups/SharedGroupManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/sharedgroups/SharedGroupManager.java index 21d500a96..3ed412f57 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/sharedgroups/SharedGroupManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/sharedgroups/SharedGroupManager.java @@ -42,10 +42,10 @@ public class SharedGroupManager { * * @param connection connection to use to get the user's shared groups. * @return collection with the shared groups' name of the logged user. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static List getSharedGroups(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Discover the shared groups of the logged user diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/shim/packet/HeadersExtension.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/shim/packet/HeadersExtension.java index d56051289..914f6dfa5 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/shim/packet/HeadersExtension.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/shim/packet/HeadersExtension.java @@ -70,7 +70,7 @@ public class HeadersExtension implements ExtensionElement { /** * Return the SHIM headers extension of this stanza or null if there is none. * - * @param packet + * @param packet TODO javadoc me please * @return the headers extension or null. */ public static HeadersExtension from(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java index 01579f09e..28e126d7f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/VCardManager.java @@ -69,13 +69,13 @@ public final class VCardManager extends Manager { /** * Returns true if the given entity understands the vCard-XML format and allows the exchange of such. * - * @param jid - * @param connection + * @param jid TODO javadoc me please + * @param connection TODO javadoc me please * @return true if the given entity understands the vCard-XML format and exchange. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @deprecated use {@link #isSupported(Jid)} instead. */ @Deprecated @@ -96,8 +96,8 @@ public final class VCardManager extends Manager { * * @throws XMPPErrorException thrown if there was an issue setting the VCard in the server. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void saveVCard(VCard vcard) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // XEP-54 § 3.2 "A user may publish or update his or her vCard by sending an IQ of type "set" with no 'to' address…" @@ -113,10 +113,10 @@ public final class VCardManager extends Manager { * Load the VCard of the current user. * * @return VCard. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public VCard loadVCard() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return loadVCard(null); @@ -128,10 +128,10 @@ public final class VCardManager extends Manager { * @param bareJid bareJid of the user. * * @return VCard. - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public VCard loadVCard(EntityBareJid bareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { VCard vcardRequest = new VCard(); @@ -143,12 +143,12 @@ public final class VCardManager extends Manager { /** * Returns true if the given entity understands the vCard-XML format and allows the exchange of such. * - * @param jid + * @param jid TODO javadoc me please * @return true if the given entity understands the vCard-XML format and exchange. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, NAMESPACE); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java index 244762f4a..58d5d6eee 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java @@ -547,8 +547,8 @@ public final class VCard extends IQ { * @param connection the XMPPConnection to use. * @throws XMPPErrorException thrown if there was an issue setting the VCard in the server. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @deprecated use {@link VCardManager#saveVCard(VCard)} instead. */ @Deprecated @@ -561,10 +561,10 @@ public final class VCard extends IQ { * and not anonymous. * * @param connection connection. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @deprecated use {@link VCardManager#loadVCard()} instead. */ @Deprecated @@ -578,10 +578,10 @@ public final class VCard extends IQ { * @param connection connection. * @param user user whos information we want to load. * - * @throws XMPPErrorException + * @throws XMPPErrorException if there was an XMPP error returned. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @deprecated use {@link VCardManager#loadVCard(EntityBareJid)} instead. */ @Deprecated diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormField.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormField.java index 6eca9b39e..387c1e7fd 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormField.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormField.java @@ -491,6 +491,7 @@ public final class FormField implements FullyQualifiedElement { * Sets an indicative of the format for the data to answer. * * @param type an indicative of the format for the data to answer. + * @return a reference to this builder. * @see Type */ public Builder setType(Type type) { @@ -517,6 +518,7 @@ public final class FormField implements FullyQualifiedElement { *

    * * @param description provides extra clarification about the question. + * @return a reference to this builder. */ public Builder setDescription(String description) { Description descriptionElement = new Description(description); @@ -529,6 +531,7 @@ public final class FormField implements FullyQualifiedElement { * fill out the form. * * @param label the label of the question. + * @return a reference to this builder. */ public Builder setLabel(String label) { this.label = label; @@ -539,6 +542,7 @@ public final class FormField implements FullyQualifiedElement { * Sets if the question must be answered in order to complete the questionnaire. * * @param required if the question must be answered in order to complete the questionnaire. + * @return a reference to this builder. */ public Builder setRequired(boolean required) { setOnlyElement(Required.INSTANCE, Required.class); @@ -550,6 +554,7 @@ public final class FormField implements FullyQualifiedElement { * Otherwise, adds an answered value to the question. * * @param value a default value or an answered value of the question. + * @return a reference to this builder. */ public Builder addValue(CharSequence value) { return addFormFieldChildElement(new Value(value)); @@ -560,6 +565,7 @@ public final class FormField implements FullyQualifiedElement { * instance was formated. * * @param date the date instance to add as XEP-0082 formated string. + * @return a reference to this builder. */ public Builder addValue(Date date) { String dateString = XmppDateTime.formatXEP0082Date(date); @@ -571,6 +577,7 @@ public final class FormField implements FullyQualifiedElement { * Otherwise, adds an answered values to the question. * * @param values default values or an answered values of the question. + * @return a reference to this builder. */ public Builder addValues(Collection values) { for (CharSequence value : values) { @@ -588,6 +595,7 @@ public final class FormField implements FullyQualifiedElement { * the question. * * @param option a new available option for the question. + * @return a reference to this builder. */ public Builder addOption(Option option) { return addFormFieldChildElement(option); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/XDataManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/XDataManager.java index 38099fa1c..fc6a23d84 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/XDataManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/XDataManager.java @@ -88,10 +88,10 @@ public final class XDataManager extends Manager { * * @param jid the JID of the entity to check. * @return true if the entity supports data forms. - * @throws NoResponseException - * @throws XMPPErrorException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see XEP-0004: Data Forms § 6. Service Discovery * @since 4.1 */ diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java index 5c53a24e1..661f3bd08 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/packet/DataForm.java @@ -151,7 +151,7 @@ public class DataForm implements ExtensionElement { /** * Return the form field with the given variable name or null. * - * @param variableName + * @param variableName TODO javadoc me please * @return the form field or null. * @since 4.1 */ @@ -175,7 +175,7 @@ public class DataForm implements ExtensionElement { /** * Check if a form field with the given variable name exists. * - * @param variableName + * @param variableName TODO javadoc me please * @return true if a form field with the variable name exists, false otherwise. * @since 4.2 */ @@ -250,7 +250,7 @@ public class DataForm implements ExtensionElement { /** * Add the given fields to this form. * - * @param fieldsToAdd + * @param fieldsToAdd TODO javadoc me please * @return true if a field was overridden. * @since 4.3.0 */ @@ -357,7 +357,7 @@ public class DataForm implements ExtensionElement { /** * Get data form from stanza. - * @param packet + * @param packet TODO javadoc me please * @return the DataForm or null */ public static DataForm from(Stanza packet) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayout.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayout.java index 59f0e2f72..4d5720829 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayout.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayout.java @@ -41,7 +41,7 @@ public class DataLayout implements ExtensionElement { /** * Data layout constructor. - * @param label + * @param label TODO javadoc me please */ public DataLayout(String label) { this.label = label; @@ -104,8 +104,8 @@ public class DataLayout implements ExtensionElement { } /** - * @param buf - * @param pageLayout + * @param buf TODO javadoc me please + * @param pageLayout TODO javadoc me please */ private static void walkList(XmlStringBuilder buf, List pageLayout) { for (DataFormLayoutElement object : pageLayout) { @@ -158,7 +158,7 @@ public class DataLayout implements ExtensionElement { /** * Section constructor. - * @param label + * @param label TODO javadoc me please */ public Section(String label) { this.label = label; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java index 3a0c8a33c..66aa3b9d1 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java @@ -33,7 +33,7 @@ public class ValidationConsistencyException extends IllegalArgumentException { /** * Validation consistency exception constructor. - * @param message + * @param message TODO javadoc me please */ public ValidationConsistencyException(String message) { super(message); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/packet/ValidateElement.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/packet/ValidateElement.java index cf2be2b09..83edfdf1c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/packet/ValidateElement.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/packet/ValidateElement.java @@ -108,7 +108,7 @@ public abstract class ValidateElement implements FormFieldChildElement { } /** - * @param buf + * @param buf TODO javadoc me please */ protected abstract void appendXML(XmlStringBuilder buf); @@ -152,7 +152,7 @@ public abstract class ValidateElement implements FormFieldChildElement { /** * Basic validate element constructor. - * @param datatype + * @param datatype TODO javadoc me please * @see #getDatatype() */ public BasicValidateElement(String datatype) { @@ -195,7 +195,7 @@ public abstract class ValidateElement implements FormFieldChildElement { /** * Open validate element constructor. - * @param datatype + * @param datatype TODO javadoc me please * @see #getDatatype() */ public OpenValidateElement(String datatype) { @@ -237,7 +237,7 @@ public abstract class ValidateElement implements FormFieldChildElement { /** * Range validate element constructor. - * @param datatype + * @param datatype TODO javadoc me please * @param min the minimum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use. * @param max the maximum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use. * @see #getDatatype() @@ -302,8 +302,8 @@ public abstract class ValidateElement implements FormFieldChildElement { /** * Regex validate element. - * @param datatype - * @param regex + * @param datatype TODO javadoc me please + * @param regex TODO javadoc me please * @see #getDatatype() */ public RegexValidateElement(String datatype, String regex) { @@ -351,8 +351,8 @@ public abstract class ValidateElement implements FormFieldChildElement { * specifies the minimum allowable number of selected/entered values. Both attributes are optional, but at * least one must bet set, and the value must be within the range of a unsigned 32-bit integer. * - * @param min - * @param max + * @param min TODO javadoc me please + * @param max TODO javadoc me please */ public ListRange(UInt32 min, UInt32 max) { if (max == null && min == null) { @@ -400,7 +400,7 @@ public abstract class ValidateElement implements FormFieldChildElement { * The >list-range/< element SHOULD be included only when the <field/> is of type "list-multi" and SHOULD be ignored * otherwise. * - * @param formField + * @param formField TODO javadoc me please */ protected void checkListRangeConsistency(FormField.Builder formField) { ListRange listRange = getListRange(); @@ -417,8 +417,8 @@ public abstract class ValidateElement implements FormFieldChildElement { } /** - * @param formField - * @param method + * @param formField TODO javadoc me please + * @param method TODO javadoc me please */ protected void checkNonMultiConsistency(FormField.Builder formField, String method) { checkListRangeConsistency(formField); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xhtmlim/XHTMLManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xhtmlim/XHTMLManager.java index 665a10026..6a72b855c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xhtmlim/XHTMLManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xhtmlim/XHTMLManager.java @@ -129,10 +129,10 @@ public class XHTMLManager { * @param connection the connection to use to perform the service discovery * @param userID the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com * @return a boolean indicating whether the specified user handles XHTML messages - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean isServiceEnabled(XMPPConnection connection, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java index 43bede073..7032ff1f7 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManagerTest.java @@ -61,9 +61,9 @@ public class InBandBytestreamManagerTest extends InitExtensions { /** * Initialize fields used in the tests. - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ @Before public void setup() throws XMPPException, SmackException, InterruptedException { @@ -105,9 +105,9 @@ public class InBandBytestreamManagerTest extends InitExtensions { * Invoking {@link InBandBytestreamManager#establishSession(org.jxmpp.jid.Jid)} should * throw an exception if the given target does not support in-band * bytestream. - * @throws SmackException - * @throws XMPPException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. */ @Test public void shouldFailIfTargetDoesNotSupportIBB() throws SmackException, XMPPException, InterruptedException { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java index 44bbc0dd2..5f5ae2974 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamRequestTest.java @@ -71,8 +71,8 @@ public class InBandBytestreamRequestTest extends InitExtensions { /** * Test reject() method. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Test public void shouldReplyWithErrorIfRequestIsRejected() throws NotConnectedException, InterruptedException { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java index f4c2f7be8..eb172880a 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionMessageTest.java @@ -75,9 +75,9 @@ public class InBandBytestreamSessionMessageTest extends InitExtensions { /** * Initialize fields used in the tests. - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ @Before public void setup() throws XMPPException, SmackException, InterruptedException { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java index 477859996..f1cb3bb61 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java @@ -76,9 +76,9 @@ public class InBandBytestreamSessionTest extends InitExtensions { /** * Initialize fields used in the tests. - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ @Before public void setup() throws XMPPException, SmackException, InterruptedException { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java index 0b297c1ad..a84a90996 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java @@ -109,9 +109,9 @@ public class Socks5ByteStreamManagerTest { * The SOCKS5 Bytestream feature should be removed form the service discovery manager if Socks5 * bytestream feature is disabled. * - * @throws InterruptedException - * @throws SmackException - * @throws XMPPErrorException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPErrorException if there was an XMPP error returned. */ @Test public void shouldDisableService() throws XMPPErrorException, SmackException, InterruptedException { @@ -131,10 +131,10 @@ public class Socks5ByteStreamManagerTest { /** * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid)} should throw an exception * if the given target does not support SOCKS5 Bytestream. - * @throws XMPPException - * @throws InterruptedException - * @throws SmackException - * @throws IOException + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws IOException if an I/O error occured. */ @Test public void shouldFailIfTargetDoesNotSupportSocks5() @@ -159,10 +159,10 @@ public class Socks5ByteStreamManagerTest { /** * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} should fail if XMPP * server doesn't return any proxies. - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. */ @Test public void shouldFailIfNoSocks5ProxyFound1() @@ -211,10 +211,10 @@ public class Socks5ByteStreamManagerTest { * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} should fail if no * proxy is a SOCKS5 proxy. * - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. */ @Test public void shouldFailIfNoSocks5ProxyFound2() @@ -273,10 +273,10 @@ public class Socks5ByteStreamManagerTest { * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} should fail if no * SOCKS5 proxy can be found. If it turns out that a proxy is not a SOCKS5 proxy it should not * be queried again. - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. */ @Test public void shouldBlacklistNonSocks5Proxies() throws SmackException, InterruptedException, IOException, XMPPException { @@ -355,10 +355,10 @@ public class Socks5ByteStreamManagerTest { * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} should fail if the * target does not accept a SOCKS5 Bytestream. See XEP-0065 Section 5.2 A2 - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. */ @Test public void shouldFailIfTargetDoesNotAcceptSocks5Bytestream() throws SmackException, InterruptedException, IOException, XMPPException { @@ -435,10 +435,10 @@ public class Socks5ByteStreamManagerTest { * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} should fail if the * proxy used by target is invalid. * - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. */ @Test public void shouldFailIfTargetUsesInvalidSocks5Proxy() @@ -517,10 +517,10 @@ public class Socks5ByteStreamManagerTest { * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} should fail if * initiator can not connect to the SOCKS5 proxy used by target. * - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws XmppStringprepException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws XmppStringprepException if the provided string is invalid. */ @Test public void shouldFailIfInitiatorCannotConnectToSocks5Proxy() @@ -617,10 +617,10 @@ public class Socks5ByteStreamManagerTest { * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} should successfully * negotiate and return a SOCKS5 Bytestream connection. * - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. */ @Test public void shouldNegotiateSocks5BytestreamAndTransferData() @@ -737,11 +737,11 @@ public class Socks5ByteStreamManagerTest { * If multiple network addresses are added to the local SOCKS5 proxy, all of them should be * contained in the SOCKS5 Bytestream request. * - * @throws InterruptedException - * @throws SmackException - * @throws IOException - * @throws XMPPException - * @throws TimeoutException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws IOException if an I/O error occured. + * @throws XMPPException if an XMPP protocol error was received. + * @throws TimeoutException if there was a timeout. */ @Test public void shouldUseMultipleAddressesForLocalSocks5Proxy() @@ -843,10 +843,10 @@ public class Socks5ByteStreamManagerTest { * Invoking {@link Socks5BytestreamManager#establishSession(org.jxmpp.jid.Jid, String)} the first time * should successfully negotiate a SOCKS5 Bytestream via the second SOCKS5 proxy and should * prioritize this proxy for a second SOCKS5 Bytestream negotiation. - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. * */ @Test @@ -932,10 +932,10 @@ public class Socks5ByteStreamManagerTest { * should successfully negotiate a SOCKS5 Bytestream via the second SOCKS5 proxy. The second * negotiation should run in the same manner if prioritization is disabled. * - * @throws IOException - * @throws InterruptedException - * @throws SmackException - * @throws XMPPException + * @throws IOException if an I/O error occured. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. * */ @Test diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamRequestTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamRequestTest.java index 59d5f99c1..33d038aaf 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamRequestTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamRequestTest.java @@ -98,7 +98,7 @@ public class Socks5ByteStreamRequestTest { * Accepting a SOCKS5 Bytestream request should fail if target is not able to connect to any of * the provided SOCKS5 proxies. * - * @throws Exception + * @throws Exception if an exception occurs. */ @Test public void shouldFailIfRequestHasInvalidStreamHosts() throws Exception { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java index bd6908d4b..518d0142e 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/caps/EntityCapsManagerTest.java @@ -47,7 +47,7 @@ public class EntityCapsManagerTest extends InitExtensions { /** * XEP- * 0115 Complex Generation Example. - * @throws XmppStringprepException + * @throws XmppStringprepException if the provided string is invalid. */ @Test public void testComplexGenerationExample() throws XmppStringprepException { diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java index 18a528d90..3eef31b83 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/ping/PingTest.java @@ -98,10 +98,10 @@ public class PingTest extends InitExtensions { /** * DummyConnection will not reply so it will timeout. - * @throws SmackException - * @throws XMPPException - * @throws IOException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. + * @throws InterruptedException if the calling thread was interrupted. */ @Test public void checkFailedPingOnTimeout() throws SmackException, IOException, XMPPException, InterruptedException { @@ -119,7 +119,7 @@ public class PingTest extends InitExtensions { /** * Server returns an exception for entity. - * @throws Exception + * @throws Exception if an exception occurs. */ @Test public void checkFailedPingToEntityError() throws Exception { @@ -155,7 +155,7 @@ public class PingTest extends InitExtensions { /** * Server returns an exception. - * @throws Exception + * @throws Exception if an exception occurs. */ @Test public void checkPingToServerError() throws Exception { @@ -243,10 +243,10 @@ public class PingTest extends InitExtensions { * The returned connection won't send replies to IQs * * @return - * @throws XMPPException - * @throws IOException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ private static DummyConnection getAuthenticatedDummyConnectionWithoutIqReplies() throws SmackException, IOException, XMPPException, InterruptedException { DummyConnection con = new DummyConnection(); diff --git a/smack-extensions/src/test/java/org/jivesoftware/util/ConnectionUtils.java b/smack-extensions/src/test/java/org/jivesoftware/util/ConnectionUtils.java index 79f0db915..cc90c29ca 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/util/ConnectionUtils.java +++ b/smack-extensions/src/test/java/org/jivesoftware/util/ConnectionUtils.java @@ -64,9 +64,9 @@ public class ConnectionUtils { * @param protocol protocol helper containing answer packets * @param initiatorJID the user associated to the XMPP connection * @return a mocked XMPP connection - * @throws SmackException - * @throws XMPPErrorException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws InterruptedException if the calling thread was interrupted. */ public static XMPPConnection createMockedConnection(final Protocol protocol, EntityFullJid initiatorJID) throws SmackException, XMPPErrorException, InterruptedException { diff --git a/smack-im/src/main/java/org/jivesoftware/smack/chat/Chat.java b/smack-im/src/main/java/org/jivesoftware/smack/chat/Chat.java index 41bbddb6c..f5df0834f 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/chat/Chat.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/chat/Chat.java @@ -94,8 +94,8 @@ public class Chat { *
    * * @param text the text to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendMessage(String text) throws NotConnectedException, InterruptedException { Message message = new Message(); @@ -108,8 +108,8 @@ public class Chat { * and message type of the message will automatically set to those of this chat. * * @param message the message to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendMessage(Message message) throws NotConnectedException, InterruptedException { // Force the recipient, message type, and thread ID since the user elected diff --git a/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java b/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java index fa5699a97..1cc6c12ff 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java @@ -279,7 +279,7 @@ public final class ChatManager extends Manager{ * Creates a new {@link Chat} based on the message. May returns null if no chat could be * created, e.g. because the message comes without from. * - * @param message + * @param message TODO javadoc me please * @return a Chat or null if none can be created */ private Chat createChat(Message message) { diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java index 790e4d059..e1d49d8ed 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java @@ -437,8 +437,8 @@ public final class Roster extends Manager { * which means the method will return immediately, and the roster will be * reloaded at a later point when the server responds to the reload request. * @throws NotLoggedInException If not logged in. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void reload() throws NotLoggedInException, NotConnectedException, InterruptedException { final XMPPConnection connection = getAuthenticatedConnectionOrThrow(); @@ -474,9 +474,9 @@ public final class Roster extends Manager { /** * Reload the roster and block until it is reloaded. * - * @throws NotLoggedInException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotLoggedInException if the XMPP connection is not authenticated. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.1 */ public void reloadAndWait() throws NotLoggedInException, NotConnectedException, InterruptedException { @@ -487,7 +487,7 @@ public final class Roster extends Manager { /** * Set the roster store, may cause a roster reload. * - * @param rosterStore + * @param rosterStore TODO javadoc me please * @return true if the roster reload was initiated, false otherwise. * @since 4.1 */ @@ -642,8 +642,8 @@ public final class Roster extends Manager { * @throws NoResponseException if there was no response from the server. * @throws XMPPErrorException if an XMPP exception occurs. * @throws NotLoggedInException If not logged in. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @deprecated use {@link #createItemAndRequestSubscription(BareJid, String, String[])} instead. */ // TODO: Remove in Smack 4.5. @@ -667,8 +667,8 @@ public final class Roster extends Manager { * @throws NoResponseException if there was no response from the server. * @throws XMPPErrorException if an XMPP exception occurs. * @throws NotLoggedInException If not logged in. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.4.0 */ public void createItem(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -700,8 +700,8 @@ public final class Roster extends Manager { * @throws NoResponseException if there was no response from the server. * @throws XMPPErrorException if an XMPP exception occurs. * @throws NotLoggedInException If not logged in. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.4.0 */ public void createItemAndRequestSubscription(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -721,8 +721,8 @@ public final class Roster extends Manager { * @throws NoResponseException if there was no response from the server. * @throws XMPPErrorException if an XMPP exception occurs. * @throws NotLoggedInException if not logged in. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @throws FeatureNotSupportedException if pre-approving is not supported. * @since 4.2 */ @@ -736,8 +736,8 @@ public final class Roster extends Manager { * * @param user the user. (e.g. johndoe@jabber.org) * @throws NotLoggedInException if not logged in. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @throws FeatureNotSupportedException if pre-approving is not supported. * @since 4.2 */ @@ -795,7 +795,7 @@ public final class Roster extends Manager { * Remove a subscribe listener. Also restores the previous subscription mode * state, if the last listener got removed. * - * @param subscribeListener + * @param subscribeListener TODO javadoc me please * the subscribe listener to remove. * @return true if the listener registered and got removed. * @since 4.2 @@ -818,8 +818,8 @@ public final class Roster extends Manager { * @throws XMPPErrorException if an XMPP error occurs. * @throws NotLoggedInException if not logged in. * @throws NoResponseException SmackException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void removeEntry(RosterEntry entry) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { final XMPPConnection connection = getAuthenticatedConnectionOrThrow(); @@ -971,7 +971,7 @@ public final class Roster extends Manager { * Returns the presence info for a particular user. If the user is offline, or * if no presence data is available (such as when you are not subscribed to the * user's presence updates), unavailable presence will be returned. - *

    + * * If the user has several presences (one for each resource), then the presence with * highest priority will be returned. If multiple presences have the same priority, * the one with the "most available" presence mode will be returned. In order, @@ -979,8 +979,8 @@ public final class Roster extends Manager { * {@link org.jivesoftware.smack.packet.Presence.Mode#available available}, * {@link org.jivesoftware.smack.packet.Presence.Mode#away away}, * {@link org.jivesoftware.smack.packet.Presence.Mode#xa extended away}, and - * {@link org.jivesoftware.smack.packet.Presence.Mode#dnd do not disturb}.

    - *

    + * {@link org.jivesoftware.smack.packet.Presence.Mode#dnd do not disturb}. + * *

    * Note that presence information is received asynchronously. So, just after logging * in to the server, presence values for users in the roster may be unavailable @@ -1184,7 +1184,7 @@ public final class Roster extends Manager { *

    * Note that if the roster is not loaded, then this method will always return false. * - * @param jid + * @param jid TODO javadoc me please * @return true if the given JID is allowed to see the users presence. * @since 4.1 */ @@ -1871,7 +1871,7 @@ public final class Roster extends Manager { /** * Set the maximum size of the non-Roster presence map. * - * @param maximumSize + * @param maximumSize TODO javadoc me please * @since 4.2 * @see #setDefaultNonRosterPresenceMapMaxSize(int) */ diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java index 6e3f2db20..60b50cce9 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java @@ -94,10 +94,10 @@ public final class RosterEntry extends Manager { * Sets the name associated with this entry. * * @param name the name. - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws InterruptedException if the calling thread was interrupted. */ public synchronized void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException { // Do nothing if the name hasn't changed. @@ -213,8 +213,8 @@ public final class RosterEntry extends Manager { /** * Cancel the presence subscription the XMPP entity representing this roster entry has with us. * - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2 */ public void cancelSubscription() throws NotConnectedException, InterruptedException { diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java index f245289fe..e67f3e6fc 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterGroup.java @@ -71,10 +71,10 @@ public class RosterGroup extends Manager { * be invalid and will need to be updated to the new group specified by the new name. * * @param name the name of the group. - * @throws NotConnectedException - * @throws XMPPErrorException - * @throws NoResponseException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws InterruptedException if the calling thread was interrupted. */ public void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException { synchronized (entries) { @@ -167,8 +167,8 @@ public class RosterGroup extends Manager { * @param entry a roster entry. * @throws XMPPErrorException if an error occured while trying to add the entry to the group. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void addEntry(RosterEntry entry) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Only add the entry if it isn't already in the list. @@ -195,8 +195,8 @@ public class RosterGroup extends Manager { * @param entry a roster entry. * @throws XMPPErrorException if an error occurred while trying to remove the entry from the group. * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void removeEntry(RosterEntry entry) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Only remove the entry if it's in the entry list. diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterUtil.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterUtil.java index 03b1c6ad5..843b24bad 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterUtil.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterUtil.java @@ -92,9 +92,9 @@ public class RosterUtil { * * @param roster The roster which should be used for the pre-approval. * @param jid The XMPP address which should be pre-approved. - * @throws NotLoggedInException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotLoggedInException if the XMPP connection is not authenticated. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @since 4.2.2 */ public static void preApproveSubscriptionIfRequiredAndPossible(Roster roster, BareJid jid) diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/packet/RosterPacket.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/packet/RosterPacket.java index 430fa3434..3c079a39c 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/packet/RosterPacket.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/packet/RosterPacket.java @@ -137,8 +137,8 @@ public final class RosterPacket extends IQ { /** * Creates a new roster item. * - * @param jid - * @param name + * @param jid TODO javadoc me please + * @param name TODO javadoc me please */ public Item(BareJid jid, String name) { this(jid, name, false); @@ -149,7 +149,7 @@ public final class RosterPacket extends IQ { * * @param jid the jid. * @param name the user's name. - * @param subscriptionPending + * @param subscriptionPending TODO javadoc me please */ public Item(BareJid jid, String name, boolean subscriptionPending) { this.jid = Objects.requireNonNull(jid); diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java index 3dd4fde6a..dec89bc68 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/rosterstore/DirectoryRosterStore.java @@ -67,7 +67,7 @@ public final class DirectoryRosterStore implements RosterStore { }; /** - * @param baseDir + * @param baseDir TODO javadoc me please * will be the directory where all roster entries are stored. One * file for each entry, such that file.name = entry.username. * There is also one special file '__version__' that contains the @@ -80,7 +80,7 @@ public final class DirectoryRosterStore implements RosterStore { /** * Creates a new roster store on disk. * - * @param baseDir + * @param baseDir TODO javadoc me please * The directory to create the store in. The directory should * be empty * @return A {@link DirectoryRosterStore} instance if successful, @@ -98,7 +98,7 @@ public final class DirectoryRosterStore implements RosterStore { /** * Opens a roster store. - * @param baseDir + * @param baseDir TODO javadoc me please * The directory containing the roster store. * @return A {@link DirectoryRosterStore} instance if successful, * null else. diff --git a/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java b/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java index 1af4f574c..8bd98748c 100644 --- a/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java +++ b/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterTest.java @@ -369,7 +369,7 @@ public class RosterTest extends InitSmackIm { /** * Tests that roster pushes with invalid from are ignored. - * @throws XmppStringprepException + * @throws XmppStringprepException if the provided string is invalid. * * @see RFC 6121, Section 2.1.6 */ @@ -538,8 +538,8 @@ public class RosterTest extends InitSmackIm { * RFC3921: Retrieving One's Roster on Login. * - * @throws SmackException - * @throws XmppStringprepException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XmppStringprepException if the provided string is invalid. */ private void initRoster() throws InterruptedException, SmackException, XmppStringprepException { roster.reload(); diff --git a/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterVersioningTest.java b/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterVersioningTest.java index f3eeb3b23..91be648ed 100644 --- a/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterVersioningTest.java +++ b/smack-im/src/test/java/org/jivesoftware/smack/roster/RosterVersioningTest.java @@ -95,8 +95,8 @@ public class RosterVersioningTest { /** * Tests that receiving an empty roster result causes the roster to be populated * by all entries of the roster store. - * @throws SmackException - * @throws XMPPException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. */ @Test(timeout = 300000) public void testEqualVersionStored() throws InterruptedException, IOException, XMPPException, SmackException { @@ -129,9 +129,9 @@ public class RosterVersioningTest { /** * Tests that a non-empty roster result empties the store. - * @throws SmackException - * @throws XMPPException - * @throws XmppStringprepException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws XmppStringprepException if the provided string is invalid. */ @Test(timeout = 5000) public void testOtherVersionStored() throws XMPPException, SmackException, XmppStringprepException { diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java index ab18e9d2a..a2c07772a 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java @@ -689,7 +689,7 @@ public class SmackIntegrationTestFramework { * Execute the test. * * @throws IllegalAccessException - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. * @throws InvocationTargetException if the reflective invoked test throws an exception. * @throws XMPPException in case an XMPPException happens when preparing the test. * @throws IOException in case an IOException happens when preparing the test. diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smack/LoginIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smack/LoginIntegrationTest.java index 0c44c42f4..541de5163 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smack/LoginIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smack/LoginIntegrationTest.java @@ -41,12 +41,12 @@ public class LoginIntegrationTest extends AbstractSmackLowLevelIntegrationTest { * Check that the server is returning the correct error when trying to login using an invalid * (i.e. non-existent) user. * - * @throws InterruptedException - * @throws XMPPException - * @throws IOException - * @throws SmackException - * @throws NoSuchAlgorithmException - * @throws KeyManagementException + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPException if an XMPP protocol error was received. + * @throws IOException if an I/O error occured. + * @throws SmackException if Smack detected an exceptional situation. + * @throws NoSuchAlgorithmException if no such algorithm is available. + * @throws KeyManagementException if there was a key mangement error. */ @SmackIntegrationTest public void testInvalidLogin() throws SmackException, IOException, XMPPException, diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/caps/EntityCapsTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/caps/EntityCapsTest.java index 3dcbc8161..c3aa5ede0 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/caps/EntityCapsTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/caps/EntityCapsTest.java @@ -124,10 +124,10 @@ public class EntityCapsTest extends AbstractSmackIntegrationTest { /** * Test if entity caps actually prevent a disco info request and reply. * - * @throws XMPPException - * @throws InterruptedException - * @throws NotConnectedException - * @throws NoResponseException + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws NoResponseException if there was no response from the remote entity. * */ @SmackIntegrationTest diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java index 9d39fc30d..c6f8b275d 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java @@ -52,8 +52,8 @@ public class IoTControlIntegrationTest extends AbstractSmackIntegrationTest { /** * Connection one provides a thing, which is controlled by connection two. * - * @throws Exception - * @throws TimeoutException + * @throws Exception if an exception occurs. + * @throws TimeoutException if there was a timeout. */ @SmackIntegrationTest // @SmackSerialIntegrationTest diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDataIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDataIntegrationTest.java index 90543108f..1fec14577 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDataIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDataIntegrationTest.java @@ -54,8 +54,8 @@ public class IoTDataIntegrationTest extends AbstractSmackIntegrationTest { /** * Connection one provides a thing, which momentary value is read out by connection two. * - * @throws Exception - * @throws TimeoutException + * @throws Exception if an exception occurs. + * @throws TimeoutException if there was a timeout. */ @SmackIntegrationTest public void dataTest() throws Exception { diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/omemo/MessageEncryptionIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/omemo/MessageEncryptionIntegrationTest.java index db9a6522d..6a9ba5e20 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/omemo/MessageEncryptionIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/omemo/MessageEncryptionIntegrationTest.java @@ -53,7 +53,7 @@ public class MessageEncryptionIntegrationTest extends AbstractTwoUsersOmemoInteg * Bob responds to Alice (normal message) * Alice still has A1 * Bob still has B2 - * @throws Exception + * @throws Exception if an exception occurs. */ @SuppressWarnings("SynchronizeOnNonFinalField") @SmackIntegrationTest diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java index 65c26d3ba..5137960e4 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java @@ -90,12 +90,12 @@ public class OXSecretKeyBackupIntegrationTest extends AbstractOpenPgpIntegration * * @see * XEP-0373 §5: Synchronizing the Secret Key with a Private PEP Node - * @param environment - * @throws XMPPException.XMPPErrorException - * @throws TestNotPossibleException - * @throws SmackException.NotConnectedException - * @throws InterruptedException - * @throws SmackException.NoResponseException + * @param environment TODO javadoc me please + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws TestNotPossibleException if the test is not possible. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. */ public OXSecretKeyBackupIntegrationTest(SmackIntegrationTestEnvironment environment) throws XMPPException.XMPPErrorException, TestNotPossibleException, SmackException.NotConnectedException, diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java index aa84f8122..6a89976fb 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java @@ -81,11 +81,11 @@ public class OXInstantMessagingIntegrationTest extends AbstractOpenPgpIntegratio * * @param environment test environment * - * @throws XMPPException.XMPPErrorException - * @throws InterruptedException - * @throws SmackException.NotConnectedException + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. * @throws TestNotPossibleException if the test is not possible due to lacking server support for PEP. - * @throws SmackException.NoResponseException + * @throws SmackException.NoResponseException if there was no response from the remote entity. */ public OXInstantMessagingIntegrationTest(SmackIntegrationTestEnvironment environment) throws XMPPException.XMPPErrorException, InterruptedException, SmackException.NotConnectedException, diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java index 8b7e04e86..cc5811ad0 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java @@ -54,6 +54,11 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest { /** * Asserts that an event notification (publication without item) can be published to * a node that is both 'notification-only' as well as 'transient'. + * + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @SmackIntegrationTest public void transientNotificationOnlyNodeWithoutItemTest() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -74,6 +79,10 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest { } } + /** + + */ + /** * Asserts that an error is returned when a publish request to a node that is both * 'notification-only' as well as 'transient' contains an item element. @@ -85,6 +94,10 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest { * and a pubsub-specific error condition of <item-forbidden/>. * * + * @throws NoResponseException if there was no response from the remote entity. + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. * @see * 7.1.3.6 Request Does Not Match Configuration */ diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/xdata/FormTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/xdata/FormTest.java index 61eb04129..682f3b82f 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/xdata/FormTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/xdata/FormTest.java @@ -48,8 +48,8 @@ public class FormTest extends AbstractSmackIntegrationTest { * 2. Retrieve the form to fill out, complete it and return it to the requestor * 3. Retrieve the completed form and check that everything is OK * - * @throws InterruptedException - * @throws NotConnectedException + * @throws InterruptedException if the calling thread was interrupted. + * @throws NotConnectedException if the XMPP connection is not connected. */ @SuppressWarnings("deprecation") @SmackIntegrationTest diff --git a/smack-java7/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java b/smack-java7/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java index f817fd058..94f3f198a 100644 --- a/smack-java7/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java +++ b/smack-java7/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java @@ -203,8 +203,8 @@ public class XmppHostnameVerifier implements HostnameVerifier { /** * Returns true if the name matches against the template that may contain the wildcard char '*'. * - * @param name - * @param template + * @param name TODO javadoc me please + * @param template TODO javadoc me please * @return true if name matches template. */ private static boolean matchWildCards(String name, String template) { @@ -243,8 +243,8 @@ public class XmppHostnameVerifier implements HostnameVerifier { * must exactly match the IP in the URI." *

    * - * @param expectedIP - * @param cert + * @param expectedIP TODO javadoc me please + * @param cert TODO javadoc me please * @throws CertificateException */ private static void matchIp(String expectedIP, X509Certificate cert) diff --git a/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/JingleManagerTest.java b/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/JingleManagerTest.java index 3acbd4c77..49c89c355 100644 --- a/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/JingleManagerTest.java +++ b/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/JingleManagerTest.java @@ -59,7 +59,7 @@ public class JingleManagerTest extends SmackTestCase { /** * Constructor for JingleManagerTest. * - * @param name + * @param name TODO javadoc me please */ public JingleManagerTest(final String name) { super(name); diff --git a/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/nat/STUNResolverTest.java b/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/nat/STUNResolverTest.java index 732cb7122..2f1ee9b92 100644 --- a/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/nat/STUNResolverTest.java +++ b/smack-jingle-old/src/integration-test/java/org/jivesoftware/smackx/jingle/nat/STUNResolverTest.java @@ -77,7 +77,7 @@ public class STUNResolverTest extends SmackTestCase { /** * Test for getPreferredCandidate() * - * @throws Exception + * @throws Exception if an exception occurs. */ public void testGetPreferredCandidate() throws Exception { int highestPref = 100; @@ -105,7 +105,7 @@ public class STUNResolverTest extends SmackTestCase { /** * Test for getPreferredCandidate() * - * @throws Exception + * @throws Exception if an exception occurs. */ public void testGetPreferredCandidateICE() throws Exception { int highestPref = 100; @@ -133,7 +133,7 @@ public class STUNResolverTest extends SmackTestCase { /** * Test priority generated by STUN lib * - * @throws Exception + * @throws Exception if an exception occurs. */ public void testICEPriority() throws Exception { @@ -193,7 +193,7 @@ public class STUNResolverTest extends SmackTestCase { /** * Test for loadSTUNServers() * - * @throws Exception + * @throws Exception if an exception occurs. */ public void testLoadSTUNServers() throws Exception { STUNResolver stunResolver = new STUNResolver() { @@ -218,7 +218,7 @@ public class STUNResolverTest extends SmackTestCase { /** * Test for resolve() * - * @throws Exception + * @throws Exception if an exception occurs. */ public void testResolve() throws Exception { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/ContentNegotiator.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/ContentNegotiator.java index 797ce194c..2d9d663b5 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/ContentNegotiator.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/ContentNegotiator.java @@ -124,7 +124,7 @@ public class ContentNegotiator extends JingleNegotiator { /** * Set jingle transport manager. - * @param jingleTransportManager + * @param jingleTransportManager TODO javadoc me please */ public void setJingleTransportManager(JingleTransportManager jingleTransportManager) { this.jingleTransportManager = jingleTransportManager; @@ -175,7 +175,7 @@ public class ContentNegotiator extends JingleNegotiator { /** * Set the jmf negotiator. * - * @param mediaNeg + * @param mediaNeg TODO javadoc me please * the description negotiator to set */ protected void setMediaNegotiator(MediaNegotiator mediaNeg) { @@ -205,7 +205,7 @@ public class ContentNegotiator extends JingleNegotiator { /** * Set TransportNegotiator * - * @param transNeg + * @param transNeg TODO javadoc me please * the transNeg to set */ protected void setTransportNegotiator(TransportNegotiator transNeg) { @@ -225,6 +225,8 @@ public class ContentNegotiator extends JingleNegotiator { /** * Return true if the transport and content negotiators have finished. + * + * @return true if fully established. */ public boolean isFullyEstablished() { boolean result = true; @@ -275,8 +277,8 @@ public class ContentNegotiator extends JingleNegotiator { /** * Trigger a session established event. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private void triggerContentEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc) throws NotConnectedException, InterruptedException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleActionEnum.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleActionEnum.java index 685d9aef5..fd4af3719 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleActionEnum.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleActionEnum.java @@ -53,6 +53,9 @@ public enum JingleActionEnum { /** * Returns the Action enum for a String action value. + * + * @param inActionCode the action code. + * @return the jingle action. */ public static JingleActionEnum getAction(String inActionCode) { for (JingleActionEnum jingleAction : JingleActionEnum.values()) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleManager.java index 842dc11a6..acd9a5796 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleManager.java @@ -194,8 +194,8 @@ public class JingleManager implements JingleSessionListener { * * @param connection XMPP XMPPConnection to be used * @param jingleMediaManagers an implemented JingleMediaManager to be used. - * @throws SmackException - * @throws XMPPException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. */ public JingleManager(XMPPConnection connection, List jingleMediaManagers) throws XMPPException, SmackException { this.connection = connection; @@ -303,8 +303,8 @@ public class JingleManager implements JingleSessionListener { * @return a boolean indicating whether the specified user handles Jingle * messages * @throws SmackException if there was no response from the server. - * @throws XMPPException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean isServiceEnabled(XMPPConnection connection, Jid userID) throws XMPPException, SmackException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(userID, Jingle.NAMESPACE); @@ -367,7 +367,7 @@ public class JingleManager implements JingleSessionListener { * Adds a CreatedJingleSessionListener. * This listener will be called when a session is created by the JingleManager instance. * - * @param createdJingleSessionListener + * @param createdJingleSessionListener TODO javadoc me please */ public void addCreationListener(CreatedJingleSessionListener createdJingleSessionListener) { this.creationListeners.add(createdJingleSessionListener); @@ -377,7 +377,7 @@ public class JingleManager implements JingleSessionListener { * Removes a CreatedJingleSessionListener. * This listener will be called when a session is created by the JingleManager instance. * - * @param createdJingleSessionListener + * @param createdJingleSessionListener TODO javadoc me please */ public void removeCreationListener(CreatedJingleSessionListener createdJingleSessionListener) { this.creationListeners.remove(createdJingleSessionListener); @@ -386,7 +386,7 @@ public class JingleManager implements JingleSessionListener { /** * Trigger CreatedJingleSessionListeners that a session was created. * - * @param jingleSession + * @param jingleSession TODO javadoc me please */ public void triggerSessionCreated(JingleSession jingleSession) { jingleSessions.add(jingleSession); @@ -517,6 +517,7 @@ public class JingleManager implements JingleSessionListener { * @param responder the fully qualified jabber ID with resource of the other * user. * @return The session on which the negotiation can be run. + * @throws XMPPException if an XMPP protocol error was received. */ public JingleSession createOutgoingJingleSession(EntityFullJid responder) throws XMPPException { JingleSession session = new JingleSession(connection, null, connection.getUser(), responder, jingleMediaManagers); @@ -543,6 +544,7 @@ public class JingleManager implements JingleSessionListener { * * @param request the remote request that is being accepted. * @return the session which manages the rest of the negotiation. + * @throws XMPPException if an XMPP protocol error was received. */ public JingleSession createIncomingJingleSession(JingleSessionRequest request) throws XMPPException { if (request == null) { @@ -576,7 +578,7 @@ public class JingleManager implements JingleSessionListener { /** * Get a session with the informed JID. If no session is found, return null. * - * @param jid + * @param jid TODO javadoc me please * @return the JingleSession */ public JingleSession getSession(String jid) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleNegotiator.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleNegotiator.java index 475411846..656faad25 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleNegotiator.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleNegotiator.java @@ -129,7 +129,7 @@ public abstract class JingleNegotiator { /** * Add expected ID. * - * @param id + * @param id TODO javadoc me please */ public void addExpectedId(String id) { expectedAckId = id; @@ -138,7 +138,7 @@ public abstract class JingleNegotiator { /** * Check if the passed ID is the expected ID. * - * @param id + * @param id TODO javadoc me please * @return true if is expected id */ public boolean isExpectedId(String id) { @@ -152,7 +152,7 @@ public abstract class JingleNegotiator { /** * Remove and expected ID. * - * @param id + * @param id TODO javadoc me please */ public void removeExpectedId(String id) { addExpectedId(null); @@ -229,8 +229,9 @@ public abstract class JingleNegotiator { * @param iq the stanza received * @param id the ID of the response that will be sent * @return the new stanza to send (either a Jingle or an IQ error). - * @throws XMPPException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract List dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java index 296630f26..fdd529e5f 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java @@ -100,15 +100,15 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Full featured JingleSession constructor. * - * @param conn + * @param conn TODO javadoc me please * the XMPPConnection which is used - * @param initiator + * @param initiator TODO javadoc me please * the initiator JID - * @param responder + * @param responder TODO javadoc me please * the responder JID - * @param sessionid + * @param sessionid TODO javadoc me please * the session ID - * @param jingleMediaManagers + * @param jingleMediaManagers TODO javadoc me please * the jingleMediaManager */ public JingleSession(XMPPConnection conn, Jid initiator, Jid responder, String sessionid, @@ -138,6 +138,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * * @param conn * Connection + * @param request the request. * @param initiator * the initiator JID * @param responder @@ -168,7 +169,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Set the session initiator. * - * @param initiator + * @param initiator TODO javadoc me please * the initiator to set */ public void setInitiator(Jid initiator) { @@ -187,7 +188,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Set the Media Manager of this Jingle Session. * - * @param jingleMediaManagers + * @param jingleMediaManagers TODO javadoc me please */ public void setMediaManagers(List jingleMediaManagers) { this.jingleMediaManagers = jingleMediaManagers; @@ -205,7 +206,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Set the session responder. * - * @param responder + * @param responder TODO javadoc me please * the receptor to set */ public void setResponder(Jid responder) { @@ -224,7 +225,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Set the session ID * - * @param sessionId + * @param sessionId TODO javadoc me please * the sid to set */ protected void setSid(String sessionId) { @@ -233,6 +234,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Generate a unique session ID. + * + * @return the generated session ID. */ protected static String generateSessionId() { return String.valueOf(randomGenerator.nextInt(Integer.MAX_VALUE) + randomGenerator.nextInt(Integer.MAX_VALUE)); @@ -240,6 +243,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Validate the state changes. + * + * @param stateIs the jingle session state. */ public void setSessionState(JingleSessionState stateIs) { @@ -255,6 +260,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Return true if all of the media managers have finished. + * + * @return true if fully established. */ public boolean isFullyEstablished() { boolean result = true; @@ -277,11 +284,11 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * a response. The response will be another Jingle stanza that will be sent * to the other end point. * - * @param iq + * @param iq TODO javadoc me please * the stanza received - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public synchronized void receivePacketAndRespond(IQ iq) throws XMPPException, SmackException, InterruptedException { List responses = new ArrayList<>(); @@ -346,12 +353,12 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * the stanza type and, depending on the current state, delivering the * stanza to the right event handler and wait for a response. * - * @param iq + * @param iq TODO javadoc me please * the stanza received * @return the new Jingle stanza to send. - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public List dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException { @@ -395,6 +402,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Add a new content negotiator on behalf of a <content/> section received. + * + * @param inContentNegotiator the content negotiator. */ public void addContentNegotiator(ContentNegotiator inContentNegotiator) { contentNegotiators.add(inContentNegotiator); @@ -424,8 +433,9 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * * @param jout * the Jingle stanza we want to complete and send - * @throws NotConnectedException - * @throws InterruptedException + * @return the Jingle stanza. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Jingle sendFormattedJingle(Jingle jout) throws NotConnectedException, InterruptedException { return sendFormattedJingle(null, jout); @@ -436,12 +446,11 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * reponse, using the session information we have or some info from the * incoming packet. * - * @param iq - * The Jingle stanza we are responding to - * @param jout - * the Jingle stanza we want to complete and send - * @throws NotConnectedException - * @throws InterruptedException + * @param iq The Jingle stanza we are responding to + * @param jout the Jingle stanza we want to complete and send + * @return the Jingle stanza. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Jingle sendFormattedJingle(IQ iq, Jingle jout) throws NotConnectedException, InterruptedException { if (jout != null) { @@ -486,8 +495,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv } /** - * @param inJingle - * @param inAction + * @param inJingle TODO javadoc me please + * @param inAction TODO javadoc me please */ // private void sendUnknownStateAction(Jingle inJingle, JingleActionEnum inAction) { // @@ -508,8 +517,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Acknowledge a IQ packet. * - * @param iq - * The IQ to acknowledge + * @param iq The IQ to acknowledge. + * @return the ack IQ. */ public IQ createAck(IQ iq) { IQ result = null; @@ -595,7 +604,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Clean a session from the list. * - * @param connection + * @param connection TODO javadoc me please * The connection to clean up */ private void unregisterInstanceFor(XMPPConnection connection) { @@ -616,7 +625,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Returns the JingleSession related to a particular connection. * - * @param con + * @param con TODO javadoc me please * A XMPP connection * @return a Jingle session */ @@ -638,7 +647,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Configure a session, setting some action listeners... * - * @param connection + * @param connection TODO javadoc me please * The connection to set up */ private void installConnectionListeners(final XMPPConnection connection) { @@ -750,7 +759,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Add a listener for jmf negotiation events. * - * @param li + * @param li TODO javadoc me please * The listener */ public void addMediaListener(JingleMediaListener li) { @@ -765,7 +774,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Remove a listener for jmf negotiation events. * - * @param li + * @param li TODO javadoc me please * The listener */ public void removeMediaListener(JingleMediaListener li) { @@ -779,7 +788,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Add a listener for transport negotiation events. * - * @param li + * @param li TODO javadoc me please * The listener */ public void addTransportListener(JingleTransportListener li) { @@ -793,7 +802,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Remove a listener for transport negotiation events. * - * @param li + * @param li TODO javadoc me please * The listener */ public void removeTransportListener(JingleTransportListener li) { @@ -883,6 +892,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Trigger a session closed event. + * + * @param reason the reason. */ protected void triggerSessionClosed(String reason) { // for (ContentNegotiator contentNegotiator : contentNegotiators) { @@ -905,6 +916,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Trigger a session closed event due to an error. + * + * @param exc the exception. */ protected void triggerSessionClosedOnError(XMPPException exc) { for (ContentNegotiator contentNegotiator : contentNegotiators) { @@ -938,6 +951,8 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv // } /** * Trigger a media received event. + * + * @param participant the participant. */ protected void triggerMediaReceived(String participant) { List listeners = getListenersList(); @@ -980,9 +995,9 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Terminates the session with default reason. * - * @throws XMPPException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void terminate() throws XMPPException, NotConnectedException, InterruptedException { terminate("Closed Locally"); @@ -991,9 +1006,10 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * Terminates the session with a custom reason. * - * @throws XMPPException - * @throws NotConnectedException - * @throws InterruptedException + * @param reason the reason. + * @throws XMPPException if an XMPP protocol error was received. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void terminate(String reason) throws XMPPException, NotConnectedException, InterruptedException { if (isClosed()) @@ -1048,6 +1064,7 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * The Jingle stanza we are responding to * @param jingleError * the IQ stanza we want to complete and send + * @return the jingle error IQ. */ public IQ createJingleError(IQ iq, JingleError jingleError) { IQ errorPacket = null; @@ -1078,9 +1095,9 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv /** * This is the starting point for intitiating a new session. * - * @throws IllegalStateException - * @throws SmackException - * @throws InterruptedException + * @throws IllegalStateException if an illegal state was encountered + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public void startOutgoing() throws IllegalStateException, SmackException, InterruptedException { @@ -1168,6 +1185,9 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * The jingle session may have one or more media managers that are trying to establish media sessions. * When the media manager succeeds in creating a media session is registers it with the session by the * media manager's static name. This routine is where the media manager does the registering. + * + * @param mediaManagerName the name of the media manager. + * @param mediaSession the jingle media session. */ public void addJingleMediaSession(String mediaManagerName, JingleMediaSession mediaSession) { mediaSessionMap.put(mediaManagerName, mediaSession); @@ -1178,6 +1198,9 @@ public final class JingleSession extends JingleNegotiator implements MediaReceiv * When the media manager succeeds in creating a media session is registers it with the session by the * media manager's static name. This routine is where other objects can access the registered media sessions. * NB: If the media manager has not succeeded in establishing a media session then this could return null. + * + * @param mediaManagerName the name of the media manager. + * @return the jingle media session. */ public JingleMediaSession getMediaSession(String mediaManagerName) { return mediaSessionMap.get(mediaManagerName); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java index d363cac5d..afbc34369 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java @@ -80,6 +80,8 @@ public class JingleSessionRequest { /** * Returns the Jingle stanza that was sent by the requester which contains * the parameters of the session. + * + * @return the jingle stanza. */ public Jingle getJingle() { return jingle; @@ -109,8 +111,9 @@ public class JingleSessionRequest { * * @return Returns the IncomingJingleSession on which the * negotiation can be carried out. - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public synchronized JingleSession accept() throws XMPPException, SmackException, InterruptedException { JingleSession session; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionState.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionState.java index 693a3fc2f..a1bc7263b 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionState.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionState.java @@ -36,6 +36,8 @@ public abstract class JingleSessionState { /** * Called when entering the state. + * + * @return the jingle session state. */ public static JingleSessionState getInstance() { // Since we can never instantiate this class there is nothing to return (ever). @@ -54,8 +56,14 @@ public abstract class JingleSessionState { /** * Process an incoming Jingle Packet. - * When you look at the GoF State pattern this method roughly corresponds to example on p310: ProcessOctect(). - * @throws InterruptedException + * When you look at the GoF State pattern this method roughly corresponds to example on p310: ProcessOctect() + * + * @param session the jingle session. + * @param jingle the jingle stanza. + * @param action the jingle action. + * @return the resulting IQ. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract IQ processJingle(JingleSession session, Jingle jingle, JingleActionEnum action) throws SmackException, InterruptedException; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionStateUnknown.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionStateUnknown.java index 24455c4b9..619458f29 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionStateUnknown.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionStateUnknown.java @@ -98,8 +98,8 @@ public class JingleSessionStateUnknown extends JingleSessionState { /** * In the UNKNOWN state we received a action. * This method processes that action. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ private IQ receiveSessionInitiateAction(JingleSession session, Jingle inJingle) throws SmackException, InterruptedException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleMediaListener.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleMediaListener.java index 1601282b5..47a599a7c 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleMediaListener.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleMediaListener.java @@ -30,8 +30,8 @@ public interface JingleMediaListener extends JingleListener { * Notification that the jmf has been negotiated and established. * * @param pt The payload type agreed. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ void mediaEstablished(PayloadType pt) throws NotConnectedException, InterruptedException; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java index 95e3a1852..b51e6e9f6 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java @@ -37,8 +37,8 @@ public interface JingleSessionListener extends JingleListener { * service. * @param localCandidate the local candidate where we must listen for connections * @param jingleSession Session that called the method - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ void sessionEstablished(PayloadType pt, TransportCandidate remoteCandidate, TransportCandidate localCandidate, JingleSession jingleSession) throws NotConnectedException, InterruptedException; @@ -54,7 +54,7 @@ public interface JingleSessionListener extends JingleListener { /** * Notification that the session was redirected. * - * @param redirection + * @param redirection TODO javadoc me please * @param jingleSession session that called the method */ void sessionRedirected(String redirection, JingleSession jingleSession); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java index 3b1817d29..e4ca3ca67 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java @@ -35,8 +35,8 @@ public interface JingleTransportListener extends JingleListener { * in the local machine * @param remote The transport candidate that has been used for * transmitting to the remote machine - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ void transportEstablished(TransportCandidate local, TransportCandidate remote) throws NotConnectedException, InterruptedException; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/ContentInfo.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/ContentInfo.java index dbdcbd63b..8db3f03b9 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/ContentInfo.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/ContentInfo.java @@ -56,6 +56,9 @@ public abstract class ContentInfo { /** * Returns the MediaInfo constant associated with the String value. + * + * @param value the input string. + * @return the content info. */ public static ContentInfo fromString(String value) { value = value.toLowerCase(Locale.US); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaManager.java index 1ad3dc1d6..a1c7cc9a5 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaManager.java @@ -45,7 +45,9 @@ public abstract class JingleMediaManager { } /** - * Return The transport manager that goes with this media manager. + * Returns the transport manager that goes with this media manager. + * + * @return the transport manager. */ public JingleTransportManager getTransportManager() { return transportManager; @@ -70,9 +72,10 @@ public abstract class JingleMediaManager { /** * Create a Media Session Implementation. * - * @param payloadType - * @param remote - * @param local + * @param payloadType TODO javadoc me please + * @param remote TODO javadoc me please + * @param local TODO javadoc me please + * @param jingleSession the jingle session. * @return the media session */ public abstract JingleMediaSession createMediaSession(PayloadType payloadType, TransportCandidate remote, diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaSession.java index 44effa49e..2956a265a 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/JingleMediaSession.java @@ -56,6 +56,7 @@ public abstract class JingleMediaSession { * @param remote Remote accepted Transport Candidate * @param local Local accepted Transport Candidate * @param mediaLocator Media Locator of the capture device + * @param jingleSession the jingle session. */ public JingleMediaSession(PayloadType payloadType, TransportCandidate remote, TransportCandidate local, String mediaLocator, JingleSession jingleSession) { @@ -114,7 +115,7 @@ public abstract class JingleMediaSession { /** * Adds a Media Received Listener. * - * @param mediaReceivedListener + * @param mediaReceivedListener TODO javadoc me please */ public void addMediaReceivedListener(MediaReceivedListener mediaReceivedListener) { mediaReceivedListeners.add(mediaReceivedListener); @@ -123,7 +124,7 @@ public abstract class JingleMediaSession { /** * Removes a Media Received Listener. * - * @param mediaReceivedListener + * @param mediaReceivedListener TODO javadoc me please */ public void removeMediaReceivedListener(MediaReceivedListener mediaReceivedListener) { mediaReceivedListeners.remove(mediaReceivedListener); @@ -155,7 +156,7 @@ public abstract class JingleMediaSession { * Set transmit activity. If the active is true, the instance should trasmit. * If it is set to false, the instance should pause transmit. * - * @param active + * @param active TODO javadoc me please */ public abstract void setTransmit(boolean active); @@ -171,6 +172,8 @@ public abstract class JingleMediaSession { /** * Called when new Media is received. + * + * @param participant the particpant. */ public void mediaReceived(String participant) { for (MediaReceivedListener mediaReceivedListener : mediaReceivedListeners) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java index c2f809e93..eb461208c 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java @@ -69,8 +69,10 @@ public class MediaNegotiator extends JingleNegotiator { * but it does not start the negotiation. For starting the negotiation, call * startNegotiation. * - * @param session - * The jingle session. + * @param session TODO javadoc me please + * @param mediaManager the media manager. + * @param pts the list of payload types. + * @param parentNegotiator the parent content negotiator. */ public MediaNegotiator(JingleSession session, JingleMediaManager mediaManager, List pts, ContentNegotiator parentNegotiator) { @@ -89,7 +91,9 @@ public class MediaNegotiator extends JingleNegotiator { } /** - * Return The media manager for this negotiator. + * Returns the media manager for this negotiator. + * + * @return the media manager. */ public JingleMediaManager getMediaManager() { return mediaManager; @@ -100,12 +104,12 @@ public class MediaNegotiator extends JingleNegotiator { * the stanza type and, depending on the current state, delivering the * stanza to the right event handler and wait for a response. * - * @param iq + * @param iq TODO javadoc me please * the stanza received * @return the new Jingle stanza to send. - * @throws XMPPException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public List dispatchIncomingPacket(IQ iq, String id) throws XMPPException, NotConnectedException, InterruptedException { @@ -203,10 +207,10 @@ public class MediaNegotiator extends JingleNegotiator { * This means we can walk through our list, in order, until we find one from their list that matches. This * will be the best payload type to use. * - * @param jingle + * @param jingle TODO javadoc me please * @return the iq - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private IQ receiveContentAcceptAction(Jingle jingle, JingleDescription description) throws XMPPException, NotConnectedException, InterruptedException { IQ response; @@ -233,8 +237,8 @@ public class MediaNegotiator extends JingleNegotiator { /** * Receive a session-initiate packet. - * @param jingle - * @param description + * @param jingle TODO javadoc me please + * @param description TODO javadoc me please * @return the iq */ private IQ receiveSessionInitiateAction(Jingle jingle, JingleDescription description) { @@ -264,7 +268,7 @@ public class MediaNegotiator extends JingleNegotiator { * A content info has been received. This is done for publishing the * list of payload types... * - * @param jingle + * @param jingle TODO javadoc me please * The input packet * @return a Jingle packet * @throws JingleException @@ -304,7 +308,7 @@ public class MediaNegotiator extends JingleNegotiator { * A jmf description has been accepted. In this case, we must save the * accepted payload type and notify any listener... * - * @param jin + * @param jin TODO javadoc me please * The input packet * @return a Jingle packet * @throws JingleException @@ -409,7 +413,7 @@ public class MediaNegotiator extends JingleNegotiator { /** * Adds a payload type to the list of remote payloads. * - * @param pt + * @param pt TODO javadoc me please * the remote payload type */ public void addRemoteAudioPayloadType(PayloadType.Audio pt) { @@ -475,10 +479,10 @@ public class MediaNegotiator extends JingleNegotiator { /** * Trigger a session established event. * - * @param bestPt + * @param bestPt TODO javadoc me please * payload type that has been agreed. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void triggerMediaEstablished(PayloadType bestPt) throws NotConnectedException, InterruptedException { List listeners = getListenersList(); @@ -493,7 +497,7 @@ public class MediaNegotiator extends JingleNegotiator { /** * Trigger a jmf closed event. * - * @param currPt + * @param currPt TODO javadoc me please * current payload type that is cancelled. */ protected void triggerMediaClosed(PayloadType currPt) { @@ -525,6 +529,8 @@ public class MediaNegotiator extends JingleNegotiator { /** * Create a JingleDescription that matches this negotiator. + * + * @return the jingle description. */ public JingleDescription getJingleDescription() { JingleDescription result = null; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaReceivedListener.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaReceivedListener.java index 2a4997dcf..d4266c3d3 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaReceivedListener.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaReceivedListener.java @@ -23,6 +23,8 @@ public interface MediaReceivedListener { /** * Called when new Media is received. + * + * @param participant the participant. */ void mediaReceived(String participant); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioChannel.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioChannel.java index d5bbbb285..4d16933d0 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioChannel.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioChannel.java @@ -100,6 +100,7 @@ public class AudioChannel { * @param localPort local port number * @param remotePort remote port number * @param format audio format + * @param jingleMediaSession the jingle media session. */ public AudioChannel(MediaLocator locator, String localIpAddress, @@ -312,10 +313,10 @@ public class AudioChannel { /** * Get the best stanza size for a given codec and a codec rate * - * @param codecFormat - * @param milliseconds + * @param codecFormat TODO javadoc me please + * @param milliseconds TODO javadoc me please * @return the best stanza size - * @throws IllegalArgumentException + * @throws IllegalArgumentException if an illegal argument was given. */ private int getPacketSize(Format codecFormat, int milliseconds) throws IllegalArgumentException { String encoding = codecFormat.getEncoding(); @@ -336,7 +337,7 @@ public class AudioChannel { * Use the RTPManager API to create sessions for each jmf * track of the processor. * - * @return description + * @return description TODO javadoc me please */ private String createTransmitter() { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java index 3e0aace1a..42525c68d 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java @@ -51,6 +51,7 @@ public class AudioMediaSession extends JingleMediaSession { * @param remote the remote information. The candidate that the jmf will be sent to. * @param local the local information. The candidate that will receive the jmf * @param locator media locator + * @param jingleSession the jingle session. */ public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, String locator, JingleSession jingleSession) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java index dc20a6844..4ac3e5396 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java @@ -50,6 +50,8 @@ public class JmfMediaManager extends JingleMediaManager { /** * Creates a Media Manager instance. + * + * @param transportManager the transport manger. */ public JmfMediaManager(JingleTransportManager transportManager) { super(transportManager); @@ -60,6 +62,7 @@ public class JmfMediaManager extends JingleMediaManager { * Creates a Media Manager instance. * * @param mediaLocator Media Locator + * @param transportManager the transport manger. */ public JmfMediaManager(String mediaLocator, JingleTransportManager transportManager) { super(transportManager); @@ -73,7 +76,7 @@ public class JmfMediaManager extends JingleMediaManager { * @param payloadType payloadType * @param remote remote Candidate * @param local local Candidate - * @return JingleMediaSession + * @return JingleMediaSession TODO javadoc me please */ @Override public JingleMediaSession createMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java index dcea33c02..229a1521f 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java @@ -67,11 +67,11 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio * @param quality quality * @param secure secure * @param micOn micOn - * @return MediaSession - * @throws NoProcessorException - * @throws UnsupportedFormatException - * @throws IOException - * @throws GeneralSecurityException + * @return MediaSession TODO javadoc me please + * @throws NoProcessorException if there is no media processor. + * @throws UnsupportedFormatException if the format is not supported. + * @throws IOException if an I/O error occured. + * @throws GeneralSecurityException if there was a geneeral security exception. */ public static MediaSession createSession(String localhost, int localPort, String remoteHost, int remotePort, MediaSessionListener eventHandler, int quality, boolean secure, boolean micOn) throws NoProcessorException, UnsupportedFormatException, IOException, GeneralSecurityException { @@ -102,6 +102,7 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio * @param remote the remote information. The candidate that the jmf will be sent to. * @param local the local information. The candidate that will receive the jmf * @param locator media locator + * @param jingleSession the jingle session. */ public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, String locator, JingleSession jingleSession) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/SpeexMediaManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/SpeexMediaManager.java index d77d9206c..f99077345 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/SpeexMediaManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/SpeexMediaManager.java @@ -58,7 +58,7 @@ public class SpeexMediaManager extends JingleMediaManager { * @param payloadType payloadType * @param remote remote Candidate * @param local local Candidate - * @return JingleMediaSession + * @return JingleMediaSession TODO javadoc me please */ @Override public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java index 4af4a56c3..8a33211e0 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java @@ -64,6 +64,7 @@ public class ScreenShareSession extends JingleMediaSession { * @param remote the remote information. The candidate that the jmf will be sent to. * @param local the local information. The candidate that will receive the jmf * @param locator media locator + * @param jingleSession the jingle session. */ public ScreenShareSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final String locator, JingleSession jingleSession) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageTransmitter.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageTransmitter.java index 39db457b8..6a51b339a 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageTransmitter.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageTransmitter.java @@ -196,7 +196,7 @@ public class ImageTransmitter implements Runnable { /** * Get the encoder used to encode Images Tiles. * - * @return encoder + * @return encoder TODO javadoc me please */ public ImageEncoder getEncoder() { return encoder; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/PixelUtils.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/PixelUtils.java index bd7e326f4..f6001c762 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/PixelUtils.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/PixelUtils.java @@ -52,6 +52,9 @@ public class PixelUtils { /** * Clamp a value to the range 0..255. + * + * @param c the input integer. + * @return the output integer. */ public static int clamp(int c) { if (c < 0) diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java index afecb9b58..1bb4cf746 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java @@ -35,6 +35,7 @@ public class TestMediaSession extends JingleMediaSession { * @param remote the remote information. The candidate that the jmf will be sent to. * @param local the local information. The candidate that will receive the jmf * @param locator media locator + * @param jingleSession the jingle session. */ public TestMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final String locator, JingleSession jingleSession) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BasicResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BasicResolver.java index c77a16c01..fed641d7f 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BasicResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BasicResolver.java @@ -48,8 +48,8 @@ public class BasicResolver extends TransportResolver { * * The BasicResolver takes the IP addresses of the interfaces and uses the * first non-loopback, non-linklocal and non-sitelocal address. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedResolver.java index 5efb2a610..05482014f 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedResolver.java @@ -54,18 +54,20 @@ public class BridgedResolver extends TransportResolver { /** * Constructor. * A Bridged Resolver need an XMPPConnection to connect to a RTP Bridge. + * + * @param connection the XMPP connection. */ public BridgedResolver(XMPPConnection connection) { super(); this.connection = connection; } - /**1 + /** * Resolve Bridged Candidate. * * The BridgedResolver takes the IP address and ports of a jmf proxy service. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java index eaeb70ee2..faa18e8e0 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java @@ -46,7 +46,7 @@ public class BridgedTransportManager extends JingleTransportManager implements J * Return the correspondent resolver * * @param session correspondent Jingle Session - * @return resolver + * @return resolver TODO javadoc me please */ @Override protected TransportResolver createResolver(JingleSession session) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java index 59aba815d..d1ea13fad 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java @@ -34,6 +34,9 @@ public class FixedResolver extends TransportResolver { /** * Constructor. + * + * @param ip the IP address. + * @param port the port number. */ public FixedResolver(String ip, int port) { super(); @@ -52,8 +55,8 @@ public class FixedResolver extends TransportResolver { /** * Resolve the IP address. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException { @@ -76,7 +79,7 @@ public class FixedResolver extends TransportResolver { /** * Initialize the resolver. * - * @throws XMPPException + * @throws XMPPException if an XMPP protocol error was received. */ @Override public void initialize() throws XMPPException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java index d47970893..f286f5f38 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java @@ -96,8 +96,8 @@ public class ICEResolver extends TransportResolver { /** * Resolve the IP and obtain a valid transport method. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public synchronized void resolve(JingleSession session) throws XMPPException, SmackException, InterruptedException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/JingleTransportManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/JingleTransportManager.java index 68f032293..bc5bf2aaa 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/JingleTransportManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/JingleTransportManager.java @@ -51,8 +51,11 @@ public abstract class JingleTransportManager { /** * Get a new Transport Resolver to be used in a Jingle Session. * + * @param session the jingle session. * @return the TransportResolver to be used - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public TransportResolver getResolver(JingleSession session) throws XMPPException, SmackException, InterruptedException { TransportResolver resolver = createResolver(session); @@ -67,8 +70,10 @@ public abstract class JingleTransportManager { /** * Create a Transport Resolver instance according to the implementation. * + * @param session the jingle session. * @return the TransportResolver - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ protected abstract TransportResolver createResolver(JingleSession session) throws SmackException, InterruptedException; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/RTPBridge.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/RTPBridge.java index b4160d833..04668e6ba 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/RTPBridge.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/RTPBridge.java @@ -92,7 +92,7 @@ public class RTPBridge extends IQ { /** * Creates a RTPBridge Instance with defined Session ID. * - * @param sid + * @param sid TODO javadoc me please */ public RTPBridge(String sid) { this(); @@ -102,7 +102,7 @@ public class RTPBridge extends IQ { /** * Creates a RTPBridge Instance with defined Session ID. * - * @param action + * @param action TODO javadoc me please */ public RTPBridge(BridgeAction action) { this(); @@ -112,8 +112,8 @@ public class RTPBridge extends IQ { /** * Creates a RTPBridge Instance with defined Session ID. * - * @param sid - * @param bridgeAction + * @param sid TODO javadoc me please + * @param bridgeAction TODO javadoc me please */ public RTPBridge(String sid, BridgeAction bridgeAction) { this(); @@ -130,6 +130,8 @@ public class RTPBridge extends IQ { /** * Get the attributes string. + * + * @return the attributes. */ public String getAttributes() { StringBuilder str = new StringBuilder(); @@ -167,7 +169,7 @@ public class RTPBridge extends IQ { /** * Set the Session ID of the Stanza (usually same as Jingle Session ID). * - * @param sid + * @param sid TODO javadoc me please */ public void setSid(String sid) { this.sid = sid; @@ -185,7 +187,7 @@ public class RTPBridge extends IQ { /** * Set the Host A IP Address. * - * @param hostA + * @param hostA TODO javadoc me please */ public void setHostA(String hostA) { this.hostA = hostA; @@ -203,7 +205,7 @@ public class RTPBridge extends IQ { /** * Set the Host B IP Address. * - * @param hostB + * @param hostB TODO javadoc me please */ public void setHostB(String hostB) { this.hostB = hostB; @@ -221,7 +223,7 @@ public class RTPBridge extends IQ { /** * Set Side A receive port. * - * @param portA + * @param portA TODO javadoc me please */ public void setPortA(int portA) { this.portA = portA; @@ -239,7 +241,7 @@ public class RTPBridge extends IQ { /** * Set Side B receive port. * - * @param portB + * @param portB TODO javadoc me please */ public void setPortB(int portB) { this.portB = portB; @@ -257,7 +259,7 @@ public class RTPBridge extends IQ { /** * Set the RTP Bridge IP. * - * @param ip + * @param ip TODO javadoc me please */ public void setIp(String ip) { this.ip = ip; @@ -275,7 +277,7 @@ public class RTPBridge extends IQ { /** * Set the RTP Agent Pass. * - * @param pass + * @param pass TODO javadoc me please */ public void setPass(String pass) { this.pass = pass; @@ -293,7 +295,7 @@ public class RTPBridge extends IQ { /** * Set the name of the Candidate. * - * @param name + * @param name TODO javadoc me please */ public void setName(String name) { this.name = name; @@ -389,11 +391,11 @@ public class RTPBridge extends IQ { * Get a new RTPBridge Candidate from the server. * If a error occurs or the server don't support RTPBridge Service, null is returned. * - * @param connection - * @param sessionID + * @param connection TODO javadoc me please + * @param sessionID TODO javadoc me please * @return the new RTPBridge - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @SuppressWarnings("deprecation") public static RTPBridge getRTPBridge(XMPPConnection connection, String sessionID) throws NotConnectedException, InterruptedException { @@ -418,12 +420,12 @@ public class RTPBridge extends IQ { /** * Check if the server support RTPBridge Service. * - * @param connection + * @param connection TODO javadoc me please * @return true if the server supports the RTPBridge service - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean serviceAvailable(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { @@ -458,10 +460,14 @@ public class RTPBridge extends IQ { /** * Check if the server support RTPBridge Service. * - * @param connection + * @param connection TODO javadoc me please + * @param sessionID the session id. + * @param pass the password. + * @param proxyCandidate the proxy candidate. + * @param localCandidate the local candidate. * @return the RTPBridge - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @SuppressWarnings("deprecation") public static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) throws NotConnectedException, InterruptedException { @@ -495,10 +501,10 @@ public class RTPBridge extends IQ { /** * Get Public Address from the Server. * - * @param xmppConnection + * @param xmppConnection TODO javadoc me please * @return public IP String or null if not found - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @SuppressWarnings("deprecation") public static String getPublicIP(XMPPConnection xmppConnection) throws NotConnectedException, InterruptedException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java index 72bfd7ed2..cd32d7381 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java @@ -101,7 +101,7 @@ public class STUN extends SimpleIQ { /** * Set Public Ip returned from the XMPP server * - * @param publicIp + * @param publicIp TODO javadoc me please */ private void setPublicIp(String publicIp) { this.publicIp = publicIp; @@ -172,10 +172,10 @@ public class STUN extends SimpleIQ { * Get a new STUN Server Address and port from the server. * If a error occurs or the server don't support STUN Service, null is returned. * - * @param connection + * @param connection TODO javadoc me please * @return the STUN server address - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @SuppressWarnings("deprecation") public static STUN getSTUNServer(XMPPConnection connection) throws NotConnectedException, InterruptedException { @@ -202,9 +202,9 @@ public class STUN extends SimpleIQ { * * @param connection the connection * @return true if the server support STUN - * @throws SmackException - * @throws XMPPException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws XMPPException if an XMPP protocol error was received. + * @throws InterruptedException if the calling thread was interrupted. */ public static boolean serviceAvailable(XMPPConnection connection) throws XMPPException, SmackException, InterruptedException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUNResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUNResolver.java index 0ab8fa71b..dd68939c0 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUNResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUNResolver.java @@ -263,8 +263,8 @@ public class STUNResolver extends TransportResolver { /** * Resolve the IP and obtain a valid transport method. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException { @@ -288,7 +288,7 @@ public class STUNResolver extends TransportResolver { /** * Initialize the resolver. * - * @throws XMPPException + * @throws XMPPException if an XMPP protocol error was received. */ @Override public void initialize() throws XMPPException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportCandidate.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportCandidate.java index d1d2a63ad..103286862 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportCandidate.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportCandidate.java @@ -117,7 +117,7 @@ public abstract class TransportCandidate { /** * Set local IP to bind to this candidate. * - * @param localIp + * @param localIp TODO javadoc me please */ public void setLocalIp(String localIp) { this.localIp = localIp; @@ -135,7 +135,7 @@ public abstract class TransportCandidate { /** * Set the symmetric candidate for this candidate. * - * @param symmetric + * @param symmetric TODO javadoc me please */ public void setSymmetric(TransportCandidate symmetric) { this.symmetric = symmetric; @@ -171,7 +171,7 @@ public abstract class TransportCandidate { /** * Set the XMPPConnection use to send or receive this candidate. * - * @param connection + * @param connection TODO javadoc me please */ public void setConnection(XMPPConnection connection) { this.connection = connection; @@ -189,7 +189,7 @@ public abstract class TransportCandidate { /** * Set the jingle's sessionId that is using this candidate. * - * @param sessionId + * @param sessionId TODO javadoc me please */ public void setSessionId(String sessionId) { this.sessionId = sessionId; @@ -349,6 +349,8 @@ public abstract class TransportCandidate { * usable. * * Subclasses should provide better methods if they can... + * + * @param localCandidates a list of local candidates. */ @SuppressWarnings("UnusedVariable") public void check(final List localCandidates) { @@ -474,6 +476,9 @@ public abstract class TransportCandidate { /** * Returns the Protocol constant associated with the String value. + * + * @param value the input String. + * @return the protocol. */ public static Protocol fromString(String value) { if (value == null) { @@ -563,6 +568,9 @@ public abstract class TransportCandidate { /** * Returns the MediaChannel constant associated with the String value. + * + * @param value the input String. + * @return the channel. */ public static Channel fromString(String value) { if (value == null) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportNegotiator.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportNegotiator.java index 8d63b4019..cbba19505 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportNegotiator.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportNegotiator.java @@ -94,6 +94,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { * * @param session The Jingle session * @param transResolver The JingleTransportManager to use + * @param parentNegotiator the parent ngeotiator. */ public TransportNegotiator(JingleSession session, TransportResolver transResolver, ContentNegotiator parentNegotiator) { super(session); @@ -108,6 +109,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { * Get a new instance of the right TransportNegotiator class with this * candidate. * + * @param cand the transport candidate. * @return A TransportNegotiator instance */ public abstract JingleTransport getJingleTransport(TransportCandidate cand); @@ -116,6 +118,8 @@ public abstract class TransportNegotiator extends JingleNegotiator { * Return true if the transport candidate is acceptable for the current * negotiator. * + * @param tc the transport candidate. + * @param localCandidates a list of local transport candidates. * @return true if the transport candidate is acceptable */ public abstract boolean acceptableTransportCandidate(TransportCandidate tc, List localCandidates); @@ -184,6 +188,8 @@ public abstract class TransportNegotiator extends JingleNegotiator { /** * Return a JingleTransport that best reflects this transport negotiator. + * + * @return the jingle transport. */ public JingleTransport getJingleTransport() { return getJingleTransport(getBestRemoteCandidate()); @@ -531,9 +537,9 @@ public abstract class TransportNegotiator extends JingleNegotiator { /** * Send an offer for a transport candidate * - * @param cand - * @throws NotConnectedException - * @throws InterruptedException + * @param cand TODO javadoc me please + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private synchronized void sendTransportCandidateOffer(TransportCandidate cand) throws NotConnectedException, InterruptedException { if (!cand.isNull()) { @@ -554,9 +560,9 @@ public abstract class TransportNegotiator extends JingleNegotiator { /** * Create a Jingle stanza where we announce our transport candidates. * - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ private void sendTransportCandidatesOffer() throws XMPPException, SmackException, InterruptedException { List notOffered = resolver.getCandidatesList(); @@ -603,9 +609,9 @@ public abstract class TransportNegotiator extends JingleNegotiator { * * @param iq the stanza received * @return the new Jingle stanza to send. - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ @Override public final List dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException { @@ -675,9 +681,9 @@ public abstract class TransportNegotiator extends JingleNegotiator { * offering a list of candidates. * * @return an IQ packet - * @throws XMPPException - * @throws SmackException - * @throws InterruptedException + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ private Jingle receiveResult(IQ iq) throws XMPPException, SmackException, InterruptedException { Jingle response = null; @@ -689,10 +695,10 @@ public abstract class TransportNegotiator extends JingleNegotiator { } /** - * @param jingle + * @param jingle TODO javadoc me please * @return the iq - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ private IQ receiveSessionInitiateAction(Jingle jingle) throws XMPPException, SmackException, InterruptedException { IQ response = null; @@ -714,7 +720,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { } /** - * @param jingle + * @param jingle TODO javadoc me please * @return the iq */ private IQ receiveTransportInfoAction(Jingle jingle) { @@ -775,7 +781,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { } /** - * @param jingle + * @param jingle TODO javadoc me please * @return the iq */ private static IQ receiveSessionAcceptAction(Jingle jingle) { @@ -794,8 +800,8 @@ public abstract class TransportNegotiator extends JingleNegotiator { * * @param local TransportCandidate that has been agreed. * @param remote TransportCandidate that has been agreed. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private void triggerTransportEstablished(TransportCandidate local, TransportCandidate remote) throws NotConnectedException, InterruptedException { List listeners = getListenersList(); @@ -838,6 +844,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { * * @param js The Jingle session this negotiation belongs to. * @param res The transport resolver to use. + * @param parentNegotiator the parent content negotiator. */ public RawUdp(JingleSession js, final TransportResolver res, ContentNegotiator parentNegotiator) { super(js, res, parentNegotiator); @@ -893,6 +900,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { * * @param js The Jingle session this negotiation belongs to. * @param res The transport manager to use. + * @param parentNegotiator the parent content negotiator. */ public Ice(JingleSession js, final TransportResolver res, ContentNegotiator parentNegotiator) { super(js, res, parentNegotiator); @@ -901,7 +909,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { /** * Get a TransportNegotiator instance. * - * @param candidate + * @param candidate TODO javadoc me please */ @Override public org.jivesoftware.smackx.jingleold.packet.JingleTransport getJingleTransport(TransportCandidate candidate) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolver.java index 9c3eccd5a..75c1e2f71 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolver.java @@ -90,20 +90,27 @@ public abstract class TransportResolver { /** * Initialize the Resolver. - * @throws InterruptedException + * + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract void initialize() throws XMPPException, SmackException, InterruptedException; /** * Start a the resolution. - * @throws InterruptedException + * + * @param session the Jingle session. + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public abstract void resolve(JingleSession session) throws XMPPException, SmackException, InterruptedException; /** * Clear the list of candidates and start a new resolution process. * - * @throws XMPPException + * @throws XMPPException if an XMPP protocol error was received. */ public void clear() throws XMPPException { cancel(); @@ -112,6 +119,8 @@ public abstract class TransportResolver { /** * Cancel any asynchronous resolution operation. + * + * @throws XMPPException if an XMPP protocol error was received. */ public abstract void cancel() throws XMPPException; @@ -211,8 +220,8 @@ public abstract class TransportResolver { * Trigger a new candidate added event. * * @param cand The candidate added to the list of candidates. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void triggerCandidateAdded(TransportCandidate cand) throws NotConnectedException, InterruptedException { Iterator iter = getListenersList().iterator(); @@ -269,8 +278,8 @@ public abstract class TransportResolver { * Add a new transport candidate * * @param cand The candidate to add - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void addCandidate(TransportCandidate cand) throws NotConnectedException, InterruptedException { synchronized (candidates) { @@ -347,6 +356,7 @@ public abstract class TransportResolver { /** * Get the n-th candidate. * + * @param i the index of the candidate. * @return a transport candidate */ public TransportCandidate getCandidate(int i) { @@ -360,8 +370,10 @@ public abstract class TransportResolver { /** * Initialize Transport Resolver and wait until it is completely uninitialized. - * @throws SmackException - * @throws InterruptedException + * + * @throws XMPPException if an XMPP protocol error was received. + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public void initializeAndWait() throws XMPPException, SmackException, InterruptedException { this.initialize(); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolverListener.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolverListener.java index 4f4bb3d0e..e7bbda378 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolverListener.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolverListener.java @@ -35,8 +35,8 @@ public interface TransportResolverListener { * A transport candidate has been added. * * @param cand The transport candidate. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ void candidateAdded(TransportCandidate cand) throws NotConnectedException, InterruptedException; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java index 7712a3474..cfb08d374 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java @@ -66,6 +66,10 @@ public class Jingle extends IQ { /** * A constructor where the main components can be initialized. + * + * @param contents the contents. + * @param mi the jingle content info + * @param sid the sid. */ public Jingle(final List contents, final JingleContentInfo mi, final String sid) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContent.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContent.java index 6506b9de8..8fdafde6b 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContent.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContent.java @@ -41,7 +41,10 @@ public class JingleContent implements ExtensionElement { private final List transports = new ArrayList<>(); /** - * Creates a content description.. + * Creates a content description. + * + * @param creator the creator. + * @param name the name. */ public JingleContent(String creator, String name) { super(); @@ -81,7 +84,7 @@ public class JingleContent implements ExtensionElement { /** * Sets the description for this Jingle content. * - * @param description + * @param description TODO javadoc me please * The description */ public void setDescription(JingleDescription description) { @@ -100,7 +103,7 @@ public class JingleContent implements ExtensionElement { /** * Adds a JingleTransport type to the packet. * - * @param transport + * @param transport TODO javadoc me please * the JingleTransport to add. */ public void addJingleTransport(final JingleTransport transport) { @@ -112,7 +115,7 @@ public class JingleContent implements ExtensionElement { /** * Adds a list of transports to add to the packet. * - * @param transports + * @param transports TODO javadoc me please * the transports to add. */ public void addTransports(final List transports) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java index 01cbcb8ea..3df98e574 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java @@ -181,6 +181,8 @@ public abstract class JingleContentDescription implements ExtensionElement { /** * Utility constructor, with a JinglePayloadType. + * + * @param pt the payload type. */ public Audio(final JinglePayloadType pt) { super(); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java index 57e9450a1..4e143f266 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java @@ -188,6 +188,8 @@ public abstract class JingleDescription implements ExtensionElement { /** * Utility constructor, with a PayloadType. + * + * @param pt the payload type. */ public Audio(final PayloadType pt) { super(); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleError.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleError.java index e261588d9..301a72596 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleError.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleError.java @@ -89,6 +89,9 @@ public class JingleError implements ExtensionElement { /** * Returns a Action instance associated with the String value. + * + * @param value the input string. + * @return the jingle error. */ public static JingleError fromString(String value) { if (value != null) { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java index 07cafdd3b..40553ea27 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java @@ -314,6 +314,8 @@ public class JingleTransport implements ExtensionElement { /** * Constructor with a transport candidate. + * + * @param tc the transport candidate. */ public Candidate(final TransportCandidate tc) { super(tc); @@ -403,6 +405,8 @@ public class JingleTransport implements ExtensionElement { /** * Constructor with a transport candidate. + * + * @param tc the transport candidate. */ public Candidate(final TransportCandidate tc) { super(tc); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleContentDescriptionProvider.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleContentDescriptionProvider.java index de8553a32..5d2f90bc3 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleContentDescriptionProvider.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleContentDescriptionProvider.java @@ -65,8 +65,8 @@ public abstract class JingleContentDescriptionProvider extends ExtensionElementP * * @param parser the input to parse * @return a description element - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public JingleContentDescription parse(XmlPullParser parser, @@ -98,6 +98,8 @@ public abstract class JingleContentDescriptionProvider extends ExtensionElementP /** * Return a new instance of this class. Subclasses must overwrite this * method. + * + * @return the jingle content description. */ protected abstract JingleContentDescription getInstance(); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleDescriptionProvider.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleDescriptionProvider.java index 70aea87f2..124258680 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleDescriptionProvider.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleDescriptionProvider.java @@ -36,7 +36,7 @@ public abstract class JingleDescriptionProvider extends ExtensionElementProvider /** * Parse a iq/jingle/description/payload-type element. * - * @param parser + * @param parser TODO javadoc me please * the input to parse * @return a payload type element */ @@ -63,11 +63,11 @@ public abstract class JingleDescriptionProvider extends ExtensionElementProvider /** * Parse a iq/jingle/description element. * - * @param parser + * @param parser TODO javadoc me please * the input to parse * @return a description element - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public JingleDescription parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { @@ -97,6 +97,8 @@ public abstract class JingleDescriptionProvider extends ExtensionElementProvider /** * Return a new instance of this class. Subclasses must overwrite this * method. + * + * @return the jingle description. */ protected abstract JingleDescription getInstance(); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java index 499dde5b6..e78457342 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleProvider.java @@ -45,9 +45,9 @@ public class JingleProvider extends IQProvider { /** * Parse a iq/jingle element. - * @throws XmlPullParserException - * @throws IOException - * @throws SmackParsingException + * @throws XmlPullParserException if an error in the XML parser occured. + * @throws IOException if an I/O error occured. + * @throws SmackParsingException if the Smack parser (provider) encountered invalid input. */ @Override public Jingle parse(XmlPullParser parser, int intialDepth, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException { diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleTransportProvider.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleTransportProvider.java index ee3d78e48..87d39360b 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleTransportProvider.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleTransportProvider.java @@ -49,8 +49,8 @@ public abstract class JingleTransportProvider extends ExtensionElementProviderChatNote associated with a given chat session. * @throws XMPPErrorException if an error occurs while retrieving the ChatNote. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public ChatNotes getNote(String sessionID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { ChatNotes request = new ChatNotes(); @@ -890,8 +890,8 @@ public class AgentSession { * @param startDate point in time from which on history should get retrieved. * @return the chat history associated with a given jid. * @throws XMPPException if an error occurs while retrieving the AgentChatHistory. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public AgentChatHistory getAgentHistory(EntityBareJid jid, int maxSessions, Date startDate) throws XMPPException, NotConnectedException, InterruptedException { AgentChatHistory request; @@ -915,10 +915,10 @@ public class AgentSession { * Asks the workgroup for it's Search Settings. * * @return SearchSettings the search settings for this workgroup. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public SearchSettings getSearchSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { SearchSettings request = new SearchSettings(); @@ -935,9 +935,9 @@ public class AgentSession { * @param global true to retrieve global macros, otherwise false for personal macros. * @return MacroGroup the root macro group. * @throws XMPPErrorException if an error occurs while getting information from the server. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public MacroGroup getMacros(boolean global) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Macros request = new Macros(); @@ -953,10 +953,10 @@ public class AgentSession { * Persists the Personal Macro for an agent. * * @param group the macro group to save. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void saveMacros(MacroGroup group) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Macros request = new Macros(); @@ -974,8 +974,8 @@ public class AgentSession { * @param sessionID the sessionID to query for. * @return Map a map of all metadata associated with the sessionID. * @throws XMPPException if an error occurs while getting information from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Map> getChatMetadata(String sessionID) throws XMPPException, NotConnectedException, InterruptedException { ChatMetadata request = new ChatMetadata(); @@ -1013,9 +1013,9 @@ public class AgentSession { * @param reason the reason of the invitation. * @throws XMPPErrorException if the sender of the invitation is not an agent or the service failed to process * the request. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendRoomInvitation(RoomInvitation.Type type, Jid invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { final RoomInvitation invitation = new RoomInvitation(type, invitee, sessionID, reason); @@ -1050,9 +1050,9 @@ public class AgentSession { * @param reason the reason of the invitation. * @throws XMPPErrorException if the sender of the invitation is not an agent or the service failed to process * the request. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendRoomTransfer(RoomTransfer.Type type, String invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { final RoomTransfer transfer = new RoomTransfer(type, invitee, sessionID, reason); @@ -1071,9 +1071,9 @@ public class AgentSession { * @param query an optional query object used to tell the server what metadata to retrieve. This can be null. * @return the settings for the workgroup. * @throws XMPPErrorException if an error occurs while sending the request to the server. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public GenericSettings getGenericSettings(XMPPConnection con, String query) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { GenericSettings setting = new GenericSettings(); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/Offer.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/Offer.java index 0c3d26f2d..ece31d9c6 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/Offer.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/Offer.java @@ -81,8 +81,8 @@ public class Offer { /** * Accepts the offer. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void accept() throws NotConnectedException, InterruptedException { Stanza acceptPacket = new AcceptPacket(this.session.getWorkgroupJID()); @@ -93,8 +93,8 @@ public class Offer { /** * Rejects the offer. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void reject() throws NotConnectedException, InterruptedException { RejectPacket rejectPacket = new RejectPacket(this.session.getWorkgroupJID()); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptManager.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptManager.java index 19bcd0d66..e9b59af28 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptManager.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptManager.java @@ -48,10 +48,10 @@ public class TranscriptManager { * @param sessionID the id of the session to get the full transcript. * @param workgroupJID the JID of the workgroup that will process the request. * @return the full conversation transcript of a given session. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Transcript getTranscript(EntityBareJid workgroupJID, String sessionID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Transcript request = new Transcript(sessionID); @@ -67,10 +67,10 @@ public class TranscriptManager { * @param userID the id of the user to get his conversations. * @param workgroupJID the JID of the workgroup that will process the request. * @return the transcripts of a given user. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Transcripts getTranscripts(EntityBareJid workgroupJID, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Transcripts request = new Transcripts(userID); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptSearchManager.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptSearchManager.java index df8392b4f..dd429c67c 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptSearchManager.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/TranscriptSearchManager.java @@ -50,10 +50,10 @@ public class TranscriptSearchManager { * * @param serviceJID the address of the workgroup service. * @return the Form to use for searching transcripts. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Form getSearchForm(DomainBareJid serviceJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { TranscriptSearch search = new TranscriptSearch(); @@ -73,10 +73,10 @@ public class TranscriptSearchManager { * @param serviceJID the address of the workgroup service. * @param completedForm the filled out search form. * @return the result of the transcript search. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public ReportedData submitSearch(DomainBareJid serviceJID, Form completedForm) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { TranscriptSearch search = new TranscriptSearch(); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/MetaDataProvider.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/MetaDataProvider.java index 924c41a0d..297ce40d9 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/MetaDataProvider.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/MetaDataProvider.java @@ -38,8 +38,8 @@ public class MetaDataProvider extends ExtensionElementProvider { /** * PacketExtensionProvider implementation. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public MetaData parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/WorkgroupInformation.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/WorkgroupInformation.java index 4fe2fe750..9880f5eac 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/WorkgroupInformation.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/WorkgroupInformation.java @@ -79,8 +79,8 @@ public class WorkgroupInformation implements ExtensionElement { /** * PacketExtensionProvider implementation. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public WorkgroupInformation parse(XmlPullParser parser, diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java index e4143370d..99907adc6 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java @@ -182,10 +182,10 @@ public class Workgroup { * available only when agents are available for this workgroup. * * @return true if the workgroup is available for receiving new requests. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isAvailable() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Presence directedPresence = new Presence(Presence.Type.available); @@ -260,8 +260,8 @@ public class Workgroup { * @throws XMPPException if an error occurred joining the queue. An error may indicate * that a connection failure occurred or that the server explicitly rejected the * request to join the queue. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public void joinQueue() throws XMPPException, SmackException, InterruptedException { joinQueue(null); @@ -299,8 +299,8 @@ public class Workgroup { * @throws XMPPException if an error occurred joining the queue. An error may indicate * that a connection failure occurred or that the server explicitly rejected the * request to join the queue. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public void joinQueue(Form answerForm) throws XMPPException, SmackException, InterruptedException { joinQueue(answerForm, null); @@ -338,9 +338,9 @@ public class Workgroup { * @throws XMPPErrorException if an error occurred joining the queue. An error may indicate * that a connection failure occurred or that the server explicitly rejected the * request to join the queue. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void joinQueue(Form answerForm, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // If already in the queue ignore the join request. @@ -387,8 +387,8 @@ public class Workgroup { * @throws XMPPException if an error occurred joining the queue. An error may indicate * that a connection failure occurred or that the server explicitly rejected the * request to join the queue. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public void joinQueue(Map metadata, Jid userID) throws XMPPException, SmackException, InterruptedException { // If already in the queue ignore the join request. @@ -421,9 +421,9 @@ public class Workgroup { * * @throws XMPPErrorException if an error occurred trying to send the depart queue * request to the server. - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void departQueue() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // If not in the queue ignore the depart request. @@ -599,8 +599,8 @@ public class Workgroup { * @param key the key to find. * @return the ChatSetting if found, otherwise false. * @throws XMPPException if an error occurs while getting information from the server. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public ChatSetting getChatSetting(String key) throws XMPPException, SmackException, InterruptedException { ChatSettings chatSettings = getChatSettings(key, -1); @@ -613,8 +613,8 @@ public class Workgroup { * @param type the type of ChatSettings to return. * @return the ChatSettings of given type, otherwise null. * @throws XMPPException if an error occurs while getting information from the server. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public ChatSettings getChatSettings(int type) throws XMPPException, SmackException, InterruptedException { return getChatSettings(null, type); @@ -625,8 +625,8 @@ public class Workgroup { * * @return all ChatSettings of a given workgroup. * @throws XMPPException if an error occurs while getting information from the server. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public ChatSettings getChatSettings() throws XMPPException, SmackException, InterruptedException { return getChatSettings(null, -1); @@ -637,10 +637,10 @@ public class Workgroup { * Asks the workgroup for it's Chat Settings. * * @return key specify a key to retrieve only that settings. Otherwise for all settings, key should be null. - * @throws NoResponseException + * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if an error occurs while getting information from the server. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ private ChatSettings getChatSettings(String key, int type) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { ChatSettings request = new ChatSettings(); @@ -663,8 +663,8 @@ public class Workgroup { * to see if the email service has been configured and is available. * * @return true if the email service is available, otherwise return false. - * @throws SmackException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws InterruptedException if the calling thread was interrupted. */ public boolean isEmailAvailable() throws SmackException, InterruptedException { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); @@ -683,10 +683,10 @@ public class Workgroup { * Asks the workgroup for it's Offline Settings. * * @return offlineSettings the offline settings for this workgroup. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public OfflineSettings getOfflineSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { OfflineSettings request = new OfflineSettings(); @@ -700,10 +700,10 @@ public class Workgroup { * Asks the workgroup for it's Sound Settings. * * @return soundSettings the sound settings for the specified workgroup. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public SoundSettings getSoundSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { SoundSettings request = new SoundSettings(); @@ -717,10 +717,10 @@ public class Workgroup { * Asks the workgroup for it's Properties. * * @return the WorkgroupProperties for the specified workgroup. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public WorkgroupProperties getWorkgroupProperties() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { WorkgroupProperties request = new WorkgroupProperties(); @@ -735,10 +735,10 @@ public class Workgroup { * * @param jid the jid of the user who's information you would like the workgroup to retreive. * @return the WorkgroupProperties for the specified workgroup. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public WorkgroupProperties getWorkgroupProperties(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { WorkgroupProperties request = new WorkgroupProperties(); @@ -757,10 +757,10 @@ public class Workgroup { * for future submissions. * * @return the Form to use for searching transcripts. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException + * @throws XMPPErrorException if there was an XMPP error returned. + * @throws NoResponseException if there was no response from the remote entity. + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public Form getWorkgroupForm() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { WorkgroupForm workgroupForm = new WorkgroupForm(); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java index 2dfc66a7a..a2ca8d17b 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventManager.java @@ -209,8 +209,8 @@ public final class MessageEventManager extends Manager { * * @param to the recipient of the notification. * @param packetID the id of the message to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendDeliveredNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException { // Create the message to send @@ -229,8 +229,8 @@ public final class MessageEventManager extends Manager { * * @param to the recipient of the notification. * @param packetID the id of the message to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendDisplayedNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException { // Create the message to send @@ -249,8 +249,8 @@ public final class MessageEventManager extends Manager { * * @param to the recipient of the notification. * @param packetID the id of the message to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendComposingNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException { // Create the message to send @@ -269,8 +269,8 @@ public final class MessageEventManager extends Manager { * * @param to the recipient of the notification. * @param packetID the id of the message to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void sendCancelledNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException { // Create the message to send diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventRequestListener.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventRequestListener.java index 7bccc92f8..321ef280d 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventRequestListener.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/MessageEventRequestListener.java @@ -49,8 +49,8 @@ public interface MessageEventRequestListener { * @param from the user that sent the notification. * @param packetID the id of the message that was sent. * @param messageEventManager the messageEventManager that fired the listener. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ void deliveredNotificationRequested(Jid from, String packetID, MessageEventManager messageEventManager) throws NotConnectedException, InterruptedException; diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/provider/MessageEventProvider.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/provider/MessageEventProvider.java index a2af202a2..da31a5f5f 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/provider/MessageEventProvider.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xevent/provider/MessageEventProvider.java @@ -39,8 +39,8 @@ public class MessageEventProvider extends ExtensionElementProvider * * @param parser the XML parser, positioned at the starting element of the extension. * @return a PacketExtension. - * @throws IOException - * @throws XmlPullParserException + * @throws IOException if an I/O error occured. + * @throws XmlPullParserException if an error in the XML parser occured. */ @Override public MessageEvent parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java index 32be5be41..1f42c6f02 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/RosterExchangeManager.java @@ -117,8 +117,8 @@ public class RosterExchangeManager { * * @param roster the roster to send * @param targetUserID the user that will receive the roster entries - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void send(Roster roster, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster @@ -137,8 +137,8 @@ public class RosterExchangeManager { * * @param rosterEntry the roster entry to send * @param targetUserID the user that will receive the roster entries - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void send(RosterEntry rosterEntry, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster @@ -159,8 +159,8 @@ public class RosterExchangeManager { * * @param rosterGroup the roster group to send * @param targetUserID the user that will receive the roster entries - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ public void send(RosterGroup rosterGroup, Jid targetUserID) throws NotConnectedException, InterruptedException { // Create a new message to send the roster diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java index 2baeb5697..3013b92a8 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/provider/RosterExchangeProvider.java @@ -44,8 +44,8 @@ public class RosterExchangeProvider extends ExtensionElementProvider getParameters() throws IOException { diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java index d83984e6c..d2fd9966b 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java @@ -37,15 +37,15 @@ import org.jxmpp.jid.BareJid; * * Alternatively this implementation can be used as an ephemeral keystore without a persisting backend. * - * @param - * @param - * @param - * @param - * @param - * @param - * @param - * @param - * @param + * @param the type of the id key pair. + * @param the type of the id key. + * @param the prekey type + * @param the signed prekey type. + * @param the session type. + * @param the address type. + * @param the EC pub type. + * @param the bundle type. + * @param the cipher type. */ public class CachingOmemoStore extends OmemoStore { @@ -437,7 +437,7 @@ public class CachingOmemoStore getCache(OmemoDevice device) { diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/FileBasedOmemoStore.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/FileBasedOmemoStore.java index 612e955ff..d8b1df42c 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/FileBasedOmemoStore.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/FileBasedOmemoStore.java @@ -514,7 +514,7 @@ public abstract class FileBasedOmemoStore managers = INSTANCES.get(connection); @@ -227,14 +227,14 @@ public final class OmemoManager extends Manager { /** * Initializes the OmemoManager. This method must be called before the manager can be used. * - * @throws CorruptedOmemoKeyException - * @throws InterruptedException - * @throws SmackException.NoResponseException - * @throws SmackException.NotConnectedException - * @throws XMPPException.XMPPErrorException - * @throws SmackException.NotLoggedInException - * @throws PubSubException.NotALeafNodeException - * @throws IOException + * @throws CorruptedOmemoKeyException if the OMEMO key is corrupted. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws PubSubException.NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. + * @throws IOException if an I/O error occured. */ public synchronized void initialize() throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, InterruptedException, @@ -278,7 +278,7 @@ public final class OmemoManager extends Manager { * @see #requestDeviceListUpdateFor(BareJid) * @param contact contact we want to get a set of device of. * @return set of known devices of that contact. - * @throws IOException + * @throws IOException if an I/O error occured. */ public Set getDevicesOf(BareJid contact) throws IOException { OmemoCachedDeviceList list = getOmemoService().getOmemoStoreBackend().loadCachedDeviceList(getOwnDevice(), contact); @@ -300,11 +300,11 @@ public final class OmemoManager extends Manager { * @return encrypted message * @throws CryptoFailedException when something crypto related fails * @throws UndecidedOmemoIdentityException When there are undecided devices - * @throws InterruptedException - * @throws SmackException.NotConnectedException - * @throws SmackException.NoResponseException - * @throws SmackException.NotLoggedInException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws IOException if an I/O error occured. */ public OmemoMessage.Sent encrypt(BareJid recipient, String message) throws CryptoFailedException, UndecidedOmemoIdentityException, @@ -323,11 +323,11 @@ public final class OmemoManager extends Manager { * @return encrypted message. * @throws CryptoFailedException When something crypto related fails * @throws UndecidedOmemoIdentityException When there are undecided devices. - * @throws InterruptedException - * @throws SmackException.NotConnectedException - * @throws SmackException.NoResponseException - * @throws SmackException.NotLoggedInException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws IOException if an I/O error occured. */ public synchronized OmemoMessage.Sent encrypt(Set recipients, String message) throws CryptoFailedException, UndecidedOmemoIdentityException, @@ -348,14 +348,14 @@ public final class OmemoManager extends Manager { * @param message message to send * @return encrypted message * @throws UndecidedOmemoIdentityException when there are undecided devices. - * @throws CryptoFailedException - * @throws XMPPException.XMPPErrorException - * @throws SmackException.NotConnectedException - * @throws InterruptedException - * @throws SmackException.NoResponseException + * @throws CryptoFailedException if the OMEMO cryptography failed. + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. * @throws NoOmemoSupportException When the muc doesn't support OMEMO. - * @throws SmackException.NotLoggedInException - * @throws IOException + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws IOException if an I/O error occured. */ public synchronized OmemoMessage.Sent encrypt(MultiUserChat muc, String message) throws UndecidedOmemoIdentityException, CryptoFailedException, @@ -387,7 +387,7 @@ public final class OmemoManager extends Manager { * @throws CorruptedOmemoKeyException if our or their key is corrupted * @throws NoRawSessionException if the message was not a preKeyMessage, but we had no session with the contact * @throws CryptoFailedException if decryption fails - * @throws IOException + * @throws IOException if an I/O error occured. */ public OmemoMessage.Received decrypt(BareJid sender, OmemoElement omemoElement) throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, NoRawSessionException, @@ -402,7 +402,7 @@ public final class OmemoManager extends Manager { * @param mamQuery The MAM query * @return list of decrypted OmemoMessages * @throws SmackException.NotLoggedInException if the Manager is not authenticated. - * @throws IOException + * @throws IOException if an I/O error occured. */ public List decryptMamQueryResult(MamManager.MamQuery mamQuery) throws SmackException.NotLoggedInException, IOException { @@ -446,7 +446,7 @@ public final class OmemoManager extends Manager { * be of length 64. * @param device device * @param fingerprint fingerprint - * @return + * @return true if this is a trusted OMEMO identity. */ public boolean isTrustedOmemoIdentity(OmemoDevice device, OmemoFingerprint fingerprint) { if (trustCallback == null) { @@ -462,7 +462,7 @@ public final class OmemoManager extends Manager { * be of length 64. * @param device device * @param fingerprint fingerprint - * @return + * @return true if the trust is decided for the identity. */ public boolean isDecidedOmemoIdentity(OmemoDevice device, OmemoFingerprint fingerprint) { if (trustCallback == null) { @@ -480,12 +480,12 @@ public final class OmemoManager extends Manager { * @throws CorruptedOmemoKeyException When the used identityKeys are corrupted * @throws CryptoFailedException When something fails with the crypto * @throws CannotEstablishOmemoSessionException When we can't establish a session with the recipient - * @throws SmackException.NotLoggedInException - * @throws InterruptedException - * @throws SmackException.NoResponseException - * @throws NoSuchAlgorithmException - * @throws SmackException.NotConnectedException - * @throws IOException + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws NoSuchAlgorithmException if no such algorithm is available. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws IOException if an I/O error occured. */ public synchronized void sendRatchetUpdateMessage(OmemoDevice recipient) throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, InterruptedException, @@ -508,12 +508,12 @@ public final class OmemoManager extends Manager { * * @param contact contact * @return true if contact has at least one OMEMO capable device. - * @throws SmackException.NotConnectedException - * @throws InterruptedException - * @throws SmackException.NoResponseException - * @throws PubSubException.NotALeafNodeException - * @throws XMPPException.XMPPErrorException - * @throws IOException + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws PubSubException.NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws IOException if an I/O error occured. */ public synchronized boolean contactSupportsOmemo(BareJid contact) throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException, @@ -547,10 +547,10 @@ public final class OmemoManager extends Manager { * @param connection XMPPConnection * @param server domainBareJid of the server to test * @return true if server supports pep - * @throws XMPPException.XMPPErrorException - * @throws SmackException.NotConnectedException - * @throws InterruptedException - * @throws SmackException.NoResponseException + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. */ public static boolean serverSupportsOmemo(XMPPConnection connection, DomainBareJid server) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, @@ -562,10 +562,10 @@ public final class OmemoManager extends Manager { /** * Return the fingerprint of our identity key. * - * @return fingerprint + * @return fingerprint TODO javadoc me please * @throws SmackException.NotLoggedInException if we don't know our bareJid yet. * @throws CorruptedOmemoKeyException if our identityKey is corrupted. - * @throws IOException + * @throws IOException if an I/O error occured. */ public synchronized OmemoFingerprint getOwnFingerprint() throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, IOException { @@ -579,14 +579,14 @@ public final class OmemoManager extends Manager { /** * Get the fingerprint of a contacts device. * @param device contacts OmemoDevice - * @return fingerprint + * @return fingerprint TODO javadoc me please * @throws CannotEstablishOmemoSessionException if we have no session yet, and are unable to create one. - * @throws SmackException.NotLoggedInException + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. * @throws CorruptedOmemoKeyException if the copy of the fingerprint we have is corrupted. - * @throws SmackException.NotConnectedException - * @throws InterruptedException - * @throws SmackException.NoResponseException - * @throws IOException + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws IOException if an I/O error occured. */ public synchronized OmemoFingerprint getFingerprint(OmemoDevice device) throws CannotEstablishOmemoSessionException, SmackException.NotLoggedInException, @@ -610,13 +610,13 @@ public final class OmemoManager extends Manager { * @param contact contact * @return Map of all active devices of the contact and their fingerprints. * - * @throws SmackException.NotLoggedInException - * @throws CorruptedOmemoKeyException - * @throws CannotEstablishOmemoSessionException - * @throws SmackException.NotConnectedException - * @throws InterruptedException - * @throws SmackException.NoResponseException - * @throws IOException + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws CorruptedOmemoKeyException if the OMEMO key is corrupted. + * @throws CannotEstablishOmemoSessionException if no OMEMO session could be established. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws IOException if an I/O error occured. */ public synchronized HashMap getActiveFingerprints(BareJid contact) throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, @@ -681,12 +681,12 @@ public final class OmemoManager extends Manager { * Request a deviceList update from contact contact. * * @param contact contact we want to obtain the deviceList from. - * @throws InterruptedException - * @throws PubSubException.NotALeafNodeException - * @throws XMPPException.XMPPErrorException - * @throws SmackException.NotConnectedException - * @throws SmackException.NoResponseException - * @throws IOException + * @throws InterruptedException if the calling thread was interrupted. + * @throws PubSubException.NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws IOException if an I/O error occured. */ public synchronized void requestDeviceListUpdateFor(BareJid contact) throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException, @@ -697,13 +697,13 @@ public final class OmemoManager extends Manager { /** * Publish a new device list with just our own deviceId in it. * - * @throws SmackException.NotLoggedInException - * @throws InterruptedException - * @throws XMPPException.XMPPErrorException - * @throws SmackException.NotConnectedException - * @throws SmackException.NoResponseException - * @throws IOException - * @throws PubSubException.NotALeafNodeException + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws InterruptedException if the calling thread was interrupted. + * @throws XMPPException.XMPPErrorException if there was an XMPP error returned. + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. + * @throws SmackException.NoResponseException if there was no response from the remote entity. + * @throws IOException if an I/O error occured. + * @throws PubSubException.NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. */ public void purgeDeviceList() throws SmackException.NotLoggedInException, InterruptedException, XMPPException.XMPPErrorException, @@ -721,9 +721,9 @@ public final class OmemoManager extends Manager { * @throws XMPPException.XMPPErrorException XMPP error * @throws SmackException.NotConnectedException XMPP error * @throws SmackException.NoResponseException XMPP error - * @throws SmackException.NotLoggedInException - * @throws IOException - * @throws PubSubException.NotALeafNodeException + * @throws SmackException.NotLoggedInException if the XMPP connection is not authenticated. + * @throws IOException if an I/O error occured. + * @throws PubSubException.NotALeafNodeException if a PubSub leaf node operation was attempted on a non-leaf node. */ public synchronized void rotateSignedPreKey() throws CorruptedOmemoKeyException, SmackException.NotLoggedInException, XMPPException.XMPPErrorException, @@ -761,7 +761,7 @@ public final class OmemoManager extends Manager { /** * Returns a pseudo random number from the interval [1, Integer.MAX_VALUE]. - * @return deviceId + * @return deviceId TODO javadoc me please */ public static int randomDeviceId() { return new Random().nextInt(Integer.MAX_VALUE - 1) + 1; @@ -770,7 +770,7 @@ public final class OmemoManager extends Manager { /** * Return the BareJid of the user. * - * @return bareJid + * @return bareJid TODO javadoc me please */ public BareJid getOwnJid() { if (ownJid == null && connection().isAuthenticated()) { @@ -783,7 +783,7 @@ public final class OmemoManager extends Manager { /** * Return the deviceId of this OmemoManager. * - * @return deviceId + * @return deviceId TODO javadoc me please */ public synchronized Integer getDeviceId() { return deviceId; @@ -792,7 +792,7 @@ public final class OmemoManager extends Manager { /** * Return the OmemoDevice of the user. * - * @return omemoDevice + * @return omemoDevice TODO javadoc me please */ public synchronized OmemoDevice getOwnDevice() { BareJid jid = getOwnJid(); @@ -895,10 +895,10 @@ public final class OmemoManager extends Manager { * * @param contactsDevice OmemoDevice of a contact. * - * @throws InterruptedException - * @throws SmackException.NoResponseException + * @throws InterruptedException if the calling thread was interrupted. + * @throws SmackException.NoResponseException if there was no response from the remote entity. * @throws CorruptedOmemoKeyException if our or their identityKey is corrupted. - * @throws SmackException.NotConnectedException + * @throws SmackException.NotConnectedException if the XMPP connection is not connected. * @throws CannotEstablishOmemoSessionException if no new session can be established. * @throws SmackException.NotLoggedInException if the connection is not authenticated. */ @@ -924,7 +924,7 @@ public final class OmemoManager extends Manager { /** * Return the OMEMO service object. * - * @return omemoService + * @return omemoService TODO javadoc me please */ OmemoService getOmemoService() { throwIfNoServiceSet(); diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoMessage.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoMessage.java index 56a703f82..0bfa1847e 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoMessage.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoMessage.java @@ -48,7 +48,7 @@ public class OmemoMessage { /** * Return the original OmemoElement (<encrypted/>). * - * @return omemoElement + * @return omemoElement TODO javadoc me please */ public OmemoElement getElement() { return element; @@ -57,7 +57,7 @@ public class OmemoMessage { /** * Return the messageKey (or transported key in case of a KeyTransportMessage). * - * @return key + * @return key TODO javadoc me please */ public byte[] getKey() { return messageKey.clone(); @@ -124,7 +124,7 @@ public class OmemoMessage { * and an EME hint about OMEMO encryption. * * @param recipient recipient for the to-field of the message. - * @return Message + * @return Message TODO javadoc me please */ public Message asMessage(Jid recipient) { @@ -187,7 +187,7 @@ public class OmemoMessage { /** * Return the OmemoDevice which sent the message. - * @return senderDevice + * @return senderDevice TODO javadoc me please */ public OmemoDevice getSenderDevice() { return senderDevice; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoRatchet.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoRatchet.java index 7ad0f6b6e..988c2b197 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoRatchet.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoRatchet.java @@ -62,11 +62,11 @@ public abstract class OmemoRatchet contactsDevices, @@ -441,7 +441,7 @@ public abstract class OmemoService contactsDevices, @@ -514,12 +514,12 @@ public abstract class OmemoService contactsDevices, @@ -546,12 +546,12 @@ public abstract class OmemoService buildMissingSessionsWithDevices(XMPPConnection connection, OmemoDevice userDevice, @@ -841,7 +841,7 @@ public abstract class OmemoService getUndecidedDevices(OmemoDevice userDevice, OmemoTrustCallback callback, Set devices) throws IOException { Set undecidedDevices = new HashSet<>(); @@ -872,7 +872,7 @@ public abstract class OmemoService decryptMamQueryResult(OmemoManager.LoggedInOmemoManager managerGuard, MamManager.MamQuery mamQuery) throws IOException { @@ -1220,7 +1220,7 @@ public abstract class OmemoService preKeyHashMap) throws IOException { for (Map.Entry entry : preKeyHashMap.entrySet()) { @@ -444,7 +444,7 @@ public abstract class OmemoStore loadOmemoPreKeys(OmemoDevice userDevice) throws IOException; @@ -453,8 +453,8 @@ public abstract class OmemoStore loadOmemoSignedPreKeys(OmemoDevice userDevice) throws IOException; @@ -476,7 +476,7 @@ public abstract class OmemoStore loadAllRawSessionsOf(OmemoDevice userDevice, BareJid contact) throws IOException; @@ -528,7 +528,7 @@ public abstract class OmemoStore getPreKeys() { if (preKeys == null) { diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/element/OmemoElement.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/element/OmemoElement.java index d84852a72..877436214 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/element/OmemoElement.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/element/OmemoElement.java @@ -55,7 +55,7 @@ public abstract class OmemoElement implements ExtensionElement { /** * Return the payload of the message. * - * @return payload + * @return payload TODO javadoc me please */ public byte[] getPayload() { if (payload == null) { diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/CannotEstablishOmemoSessionException.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/CannotEstablishOmemoSessionException.java index d8b25bbab..e20782632 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/CannotEstablishOmemoSessionException.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/CannotEstablishOmemoSessionException.java @@ -79,7 +79,7 @@ public class CannotEstablishOmemoSessionException extends Exception { /** * Return true, if there is at least one recipient, which would not be able to decipher the message on any of * their devices. - * @return boolean + * @return boolean TODO javadoc me please */ public boolean requiresThrowing() { for (Map.Entry> entry : failures.entrySet()) { diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/ReadOnlyDeviceException.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/ReadOnlyDeviceException.java index 6a0832f95..ce69d1a30 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/ReadOnlyDeviceException.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/ReadOnlyDeviceException.java @@ -44,7 +44,7 @@ public class ReadOnlyDeviceException extends Exception { /** * Return the device in question. - * @return device + * @return device TODO javadoc me please */ public OmemoDevice getDevice() { return device; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/StaleDeviceException.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/StaleDeviceException.java index be2c31e89..c3453b99e 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/StaleDeviceException.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/StaleDeviceException.java @@ -31,8 +31,8 @@ public class StaleDeviceException extends Exception { * This exception gets thrown if a message cannot be encrypted for a device due to the device being inactive for too long (stale). * * @param device OmemoDevice. - * @param lastMessageDate - * @param lastDeviceIdPublicationDate + * @param lastMessageDate TODO javadoc me please + * @param lastDeviceIdPublicationDate TODO javadoc me please */ public StaleDeviceException(OmemoDevice device, Date lastMessageDate, Date lastDeviceIdPublicationDate) { this.device = device; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/UntrustedOmemoIdentityException.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/UntrustedOmemoIdentityException.java index d594fe614..3e8b0b458 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/UntrustedOmemoIdentityException.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/exceptions/UntrustedOmemoIdentityException.java @@ -65,7 +65,8 @@ public class UntrustedOmemoIdentityException extends Exception { /** * Return the fingerprint of the key we expected. * This might return null in case this exception got thrown during encryption process. - * @return + * + * @return the trusted fingerprint. */ public OmemoFingerprint getTrustedFingerprint() { return trustedKey; @@ -73,7 +74,8 @@ public class UntrustedOmemoIdentityException extends Exception { /** * Return the fingerprint of the unexpected untrusted key. - * @return + * + * @return the OMEMO fingerprint. */ public OmemoFingerprint getUntrustedFingerprint() { return untrustedKey; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/CiphertextTuple.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/CiphertextTuple.java index c94a5bc88..60fac8469 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/CiphertextTuple.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/CiphertextTuple.java @@ -41,7 +41,7 @@ public class CiphertextTuple { /** * Return the ciphertext. * - * @return ciphertext + * @return ciphertext TODO javadoc me please */ public byte[] getCiphertext() { return ciphertext; @@ -50,7 +50,7 @@ public class CiphertextTuple { /** * Return the messageType. * - * @return messageType + * @return messageType TODO javadoc me please */ public int getMessageType() { return this.messageType; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoDevice.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoDevice.java index 05a07594a..762494281 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoDevice.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoDevice.java @@ -43,7 +43,7 @@ public class OmemoDevice { /** * Return the BareJid of the device owner. * - * @return bareJid + * @return bareJid TODO javadoc me please */ public BareJid getJid() { return this.jid; @@ -52,7 +52,7 @@ public class OmemoDevice { /** * Return the OMEMO device Id of the device. * - * @return deviceId + * @return deviceId TODO javadoc me please */ public int getDeviceId() { return this.deviceId; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoKeyUtil.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoKeyUtil.java index 8fa56f071..1954246f1 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoKeyUtil.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoKeyUtil.java @@ -55,7 +55,7 @@ public abstract class OmemoKeyUtilOMEMO security audit. * * @param message plaintext message - * @throws NoSuchPaddingException + * @throws NoSuchPaddingException if the requested padding mechanism is not availble. * @throws NoSuchProviderException - * @throws InvalidAlgorithmParameterException - * @throws InvalidKeyException - * @throws BadPaddingException - * @throws IllegalBlockSizeException + * @throws InvalidAlgorithmParameterException if the provided arguments are invalid. + * @throws InvalidKeyException if the key is invalid. + * @throws BadPaddingException if the input data is not padded properly. + * @throws IllegalBlockSizeException if the input data length is incorrect. */ private void setMessage(String message) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, @@ -220,7 +220,7 @@ public class OmemoMessageBuilder - * @param username - * @param password - * @param serviceName - * @throws XmppStringprepException + * @param username TODO javadoc me please + * @param password TODO javadoc me please + * @param serviceName TODO javadoc me please + * @throws XmppStringprepException if the provided string is invalid. */ public XMPPTCPConnection(CharSequence username, String password, String serviceName) throws XmppStringprepException { this(XMPPTCPConnectionConfiguration.builder().setUsernameAndPassword(username, password).setXmppDomain( @@ -629,8 +629,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * * @throws XMPPException if establishing a connection to the server fails. * @throws SmackException if the server fails to respond back or if there is anther error. - * @throws IOException - * @throws InterruptedException + * @throws IOException if an I/O error occured. + * @throws InterruptedException if the calling thread was interrupted. */ private void initConnection() throws IOException, InterruptedException { compressionHandler = null; @@ -673,14 +673,14 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * The server has indicated that TLS negotiation can start. We now need to secure the * existing plain connection and perform a handshake. This method won't return until the * connection has finished the handshake or an error occurred while securing the connection. - * @throws IOException + * @throws IOException if an I/O error occured. * @throws CertificateException - * @throws NoSuchAlgorithmException + * @throws NoSuchAlgorithmException if no such algorithm is available. * @throws NoSuchProviderException * @throws KeyStoreException * @throws UnrecoverableKeyException - * @throws KeyManagementException - * @throws SmackException + * @throws KeyManagementException if there was a key mangement error. + * @throws SmackException if Smack detected an exceptional situation. * @throws Exception if an exception occurs. */ @SuppressWarnings("LiteralClassName") @@ -775,10 +775,10 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * before authentication took place. *

    * - * @throws NotConnectedException - * @throws SmackException - * @throws NoResponseException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws SmackException if Smack detected an exceptional situation. + * @throws NoResponseException if there was no response from the remote entity. + * @throws InterruptedException if the calling thread was interrupted. */ private void maybeEnableCompression() throws SmackException, InterruptedException { if (!config.isCompressionEnabled()) { @@ -808,9 +808,9 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { *

    * * @throws XMPPException if an error occurs while trying to establish the connection. - * @throws SmackException - * @throws IOException - * @throws InterruptedException + * @throws SmackException if Smack detected an exceptional situation. + * @throws IOException if an I/O error occured. + * @throws InterruptedException if the calling thread was interrupted. */ @Override protected void connectInternal() throws SmackException, IOException, XMPPException, InterruptedException { @@ -832,7 +832,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { /** * For unit testing purposes * - * @param writer + * @param writer TODO javadoc me please */ protected void setWriter(Writer writer) { this.writer = writer; @@ -871,8 +871,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * to be sent by the server. * * @throws SmackException if the parser could not be reset. - * @throws InterruptedException - * @throws XmlPullParserException + * @throws InterruptedException if the calling thread was interrupted. + * @throws XmlPullParserException if an error in the XML parser occured. */ void openStream() throws SmackException, InterruptedException, XmlPullParserException { sendStreamOpen(); @@ -1237,8 +1237,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * Sends the specified element to the server. * * @param element the element to send. - * @throws NotConnectedException - * @throws InterruptedException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws InterruptedException if the calling thread was interrupted. */ protected void sendStreamElement(Element element) throws NotConnectedException, InterruptedException { throwNotConnectedExceptionIfDoneAndResumptionNotPossible(); @@ -1259,7 +1259,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { /** * Shuts down the stanza writer. Once this method has been called, no further * packets will be written to the server. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ void shutdown(boolean instant) { instantShutdown = instant; @@ -1570,7 +1570,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * * @throws StreamManagementNotEnabledException if Stream Management is not enabled. * @throws NotConnectedException if the connection is not connected. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public void requestSmAcknowledgement() throws StreamManagementNotEnabledException, NotConnectedException, InterruptedException { if (!isSmEnabled()) { @@ -1593,7 +1593,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * * @throws StreamManagementNotEnabledException if Stream Management is not enabled. * @throws NotConnectedException if the connection is not connected. - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. */ public void sendSmAcknowledgement() throws StreamManagementNotEnabledException, NotConnectedException, InterruptedException { if (!isSmEnabled()) { @@ -1870,7 +1870,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { /** * Set the default bundle and defer callback used for new connections. * - * @param defaultBundleAndDeferCallback + * @param defaultBundleAndDeferCallback TODO javadoc me please * @see BundleAndDeferCallback * @since 4.1 */ diff --git a/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java b/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java index cb84f16e8..940c8910f 100644 --- a/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java +++ b/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/PacketWriterTest.java @@ -51,14 +51,14 @@ public class PacketWriterTest { * {@link PacketWriter#sendStanza(org.jivesoftware.smack.tcp.packet.Packet)} does unblock after the * interrupt. * - * @throws InterruptedException + * @throws InterruptedException if the calling thread was interrupted. * @throws BrokenBarrierException - * @throws NotConnectedException - * @throws XmppStringprepException - * @throws SecurityException + * @throws NotConnectedException if the XMPP connection is not connected. + * @throws XmppStringprepException if the provided string is invalid. + * @throws SecurityException if there was a security violation. * @throws NoSuchFieldException * @throws IllegalAccessException - * @throws IllegalArgumentException + * @throws IllegalArgumentException if an illegal argument was given. */ @Test public void shouldBlockAndUnblockTest() throws InterruptedException, BrokenBarrierException, NotConnectedException, XmppStringprepException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
    Stream Errors