mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 15:32:06 +01:00
Merge pull request #191 from vanitasvitae/fixJavadoc
Fix javadoc issues in some packages
This commit is contained in:
commit
e5e5fca7c1
50 changed files with 255 additions and 56 deletions
|
@ -300,6 +300,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
||||||
* Send a HTTP request to the connection manager with the provided body element.
|
* Send a HTTP request to the connection manager with the provided body element.
|
||||||
*
|
*
|
||||||
* @param body the body which will be sent.
|
* @param body the body which will be sent.
|
||||||
|
* @throws BOSHException
|
||||||
*/
|
*/
|
||||||
protected void send(ComposableBody body) throws BOSHException {
|
protected void send(ComposableBody body) throws BOSHException {
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
|
|
|
@ -1017,6 +1017,11 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
|
|
||||||
private SmackConfiguration.UnknownIqRequestReplyMode unknownIqRequestReplyMode = SmackConfiguration.getUnknownIqRequestReplyMode();
|
private SmackConfiguration.UnknownIqRequestReplyMode unknownIqRequestReplyMode = SmackConfiguration.getUnknownIqRequestReplyMode();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set how Smack behaves when an unknown IQ request has been received.
|
||||||
|
*
|
||||||
|
* @param unknownIqRequestReplyMode reply mode.
|
||||||
|
*/
|
||||||
public void setUnknownIqRequestReplyMode(UnknownIqRequestReplyMode unknownIqRequestReplyMode) {
|
public void setUnknownIqRequestReplyMode(UnknownIqRequestReplyMode unknownIqRequestReplyMode) {
|
||||||
this.unknownIqRequestReplyMode = Objects.requireNonNull(unknownIqRequestReplyMode, "Mode must not be null");
|
this.unknownIqRequestReplyMode = Objects.requireNonNull(unknownIqRequestReplyMode, "Mode must not be null");
|
||||||
}
|
}
|
||||||
|
@ -1026,8 +1031,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
* {@link org.jivesoftware.smack.packet.XMPPError.Condition#feature_not_implemented} when a request IQ without a
|
* {@link org.jivesoftware.smack.packet.XMPPError.Condition#feature_not_implemented} when a request IQ without a
|
||||||
* registered {@link IQRequestHandler} is received.
|
* registered {@link IQRequestHandler} is received.
|
||||||
*
|
*
|
||||||
* @param replyToUnknownIq
|
* @param replyToUnknownIq whether Smack should reply to unknown IQs or not.
|
||||||
* @deprecated use {@link #setUnknownIqRequestReplyMode(UnknownIqRequestReplyMode)} instead.
|
* @deprecated use {@link AbstractXMPPConnection#setUnknownIqRequestReplyMode(UnknownIqRequestReplyMode)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
// TODO Remove in Smack 4.3
|
// TODO Remove in Smack 4.3
|
||||||
|
|
|
@ -881,6 +881,7 @@ public abstract class ConnectionConfiguration {
|
||||||
* argument. It also calls {@link #allowEmptyOrNullUsernames()} and {@link #setSecurityMode(ConnectionConfiguration.SecurityMode)} to
|
* argument. It also calls {@link #allowEmptyOrNullUsernames()} and {@link #setSecurityMode(ConnectionConfiguration.SecurityMode)} to
|
||||||
* {@link SecurityMode#required}.
|
* {@link SecurityMode#required}.
|
||||||
*
|
*
|
||||||
|
* @param sslContext custom SSLContext to be used.
|
||||||
* @return a reference to this builder.
|
* @return a reference to this builder.
|
||||||
*/
|
*/
|
||||||
public B performSaslExternalAuthentication(SSLContext sslContext) {
|
public B performSaslExternalAuthentication(SSLContext sslContext) {
|
||||||
|
|
|
@ -260,6 +260,7 @@ public final class SASLAuthentication {
|
||||||
/**
|
/**
|
||||||
* Notification message saying that SASL authentication was successful. The next step
|
* Notification message saying that SASL authentication was successful. The next step
|
||||||
* would be to bind the resource.
|
* would be to bind the resource.
|
||||||
|
* @param success result of the authentication.
|
||||||
* @throws SmackException
|
* @throws SmackException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -305,6 +305,8 @@ public final class SmackConfiguration {
|
||||||
* of a TLS certificate. XMPP connections are able to overwrite this settings by supplying a
|
* of a TLS certificate. XMPP connections are able to overwrite this settings by supplying a
|
||||||
* HostnameVerifier in their ConnectionConfiguration with
|
* HostnameVerifier in their ConnectionConfiguration with
|
||||||
* {@link ConnectionConfiguration.Builder#setHostnameVerifier(HostnameVerifier)}.
|
* {@link ConnectionConfiguration.Builder#setHostnameVerifier(HostnameVerifier)}.
|
||||||
|
*
|
||||||
|
* @param verifier HostnameVerifier
|
||||||
*/
|
*/
|
||||||
public static void setDefaultHostnameVerifier(HostnameVerifier verifier) {
|
public static void setDefaultHostnameVerifier(HostnameVerifier verifier) {
|
||||||
defaultHostnameVerififer = verifier;
|
defaultHostnameVerififer = verifier;
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class StanzaCollector {
|
||||||
* immediately returns <tt>null</tt> if no packets are currently in the
|
* immediately returns <tt>null</tt> if no packets are currently in the
|
||||||
* result queue.
|
* result queue.
|
||||||
*
|
*
|
||||||
|
* @param <P> type of the result stanza.
|
||||||
* @return the next stanza(/packet) result, or <tt>null</tt> if there are no more
|
* @return the next stanza(/packet) result, or <tt>null</tt> if there are no more
|
||||||
* results.
|
* results.
|
||||||
*/
|
*/
|
||||||
|
@ -125,6 +126,7 @@ public class StanzaCollector {
|
||||||
* Throws an XMPPErrorException in case the polled stanzas did contain an XMPPError.
|
* Throws an XMPPErrorException in case the polled stanzas did contain an XMPPError.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
* @param <P> type of the result stanza.
|
||||||
* @return the next available packet.
|
* @return the next available packet.
|
||||||
* @throws XMPPErrorException in case an error response.
|
* @throws XMPPErrorException in case an error response.
|
||||||
*/
|
*/
|
||||||
|
@ -140,6 +142,7 @@ public class StanzaCollector {
|
||||||
* Returns the next available packet. The method call will block (not return) until a stanza(/packet) is
|
* Returns the next available packet. The method call will block (not return) until a stanza(/packet) is
|
||||||
* available.
|
* available.
|
||||||
*
|
*
|
||||||
|
* @param <P> type of the result stanza.
|
||||||
* @return the next available packet.
|
* @return the next available packet.
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
|
@ -157,6 +160,7 @@ public class StanzaCollector {
|
||||||
* Returns the next available packet. The method call will block until the connection's default
|
* Returns the next available packet. The method call will block until the connection's default
|
||||||
* timeout has elapsed.
|
* timeout has elapsed.
|
||||||
*
|
*
|
||||||
|
* @param <P> type of the result stanza.
|
||||||
* @return the next available packet.
|
* @return the next available packet.
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
|
@ -171,6 +175,7 @@ public class StanzaCollector {
|
||||||
* until a stanza(/packet) is available or the <tt>timeout</tt> has elapsed. If the
|
* until a stanza(/packet) is available or the <tt>timeout</tt> has elapsed. If the
|
||||||
* timeout elapses without a result, <tt>null</tt> will be returned.
|
* timeout elapses without a result, <tt>null</tt> will be returned.
|
||||||
*
|
*
|
||||||
|
* @param <P> type of the result stanza.
|
||||||
* @param timeout the timeout in milliseconds.
|
* @param timeout the timeout in milliseconds.
|
||||||
* @return the next available packet.
|
* @return the next available packet.
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
|
@ -196,6 +201,7 @@ public class StanzaCollector {
|
||||||
* {@link #nextResultOrThrow(long)} where the timeout argument is the default reply timeout of
|
* {@link #nextResultOrThrow(long)} where the timeout argument is the default reply timeout of
|
||||||
* the connection associated with this collector.
|
* the connection associated with this collector.
|
||||||
*
|
*
|
||||||
|
* @param <P> type of the result stanza.
|
||||||
* @return the next available stanza.
|
* @return the next available stanza.
|
||||||
* @throws XMPPErrorException in case an error response was received.
|
* @throws XMPPErrorException in case an error response was received.
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
|
@ -236,6 +242,7 @@ public class StanzaCollector {
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param timeout the amount of time to wait for the next stanza in milliseconds.
|
* @param timeout the amount of time to wait for the next stanza in milliseconds.
|
||||||
|
* @param <P> type of the result stanza.
|
||||||
* @return the next available stanza.
|
* @return the next available stanza.
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
* @throws XMPPErrorException in case an error response was received.
|
* @throws XMPPErrorException in case an error response was received.
|
||||||
|
|
|
@ -68,6 +68,7 @@ public class SynchronizationPoint<E extends Exception> {
|
||||||
* @param request the plain stream element to send.
|
* @param request the plain stream element to send.
|
||||||
* @throws NoResponseException if no response was received.
|
* @throws NoResponseException if no response was received.
|
||||||
* @throws NotConnectedException if the connection is not connected.
|
* @throws NotConnectedException if the connection is not connected.
|
||||||
|
* @throws InterruptedException if the connection is interrupted.
|
||||||
* @return <code>null</code> if synchronization point was successful, or the failure Exception.
|
* @return <code>null</code> if synchronization point was successful, or the failure Exception.
|
||||||
*/
|
*/
|
||||||
public E sendAndWaitForResponse(TopLevelStreamElement request) throws NoResponseException,
|
public E sendAndWaitForResponse(TopLevelStreamElement request) throws NoResponseException,
|
||||||
|
@ -101,6 +102,7 @@ public class SynchronizationPoint<E extends Exception> {
|
||||||
* @throws E if an failure was reported.
|
* @throws E if an failure was reported.
|
||||||
* @throws NoResponseException if no response was received.
|
* @throws NoResponseException if no response was received.
|
||||||
* @throws NotConnectedException if the connection is not connected.
|
* @throws NotConnectedException if the connection is not connected.
|
||||||
|
* @throws InterruptedException if the connection is interrupted.
|
||||||
*/
|
*/
|
||||||
public void sendAndWaitForResponseOrThrow(Nonza request) throws E, NoResponseException,
|
public void sendAndWaitForResponseOrThrow(Nonza request) throws E, NoResponseException,
|
||||||
NotConnectedException, InterruptedException {
|
NotConnectedException, InterruptedException {
|
||||||
|
@ -120,7 +122,7 @@ public class SynchronizationPoint<E extends Exception> {
|
||||||
* Check if this synchronization point is successful or wait the connections reply timeout.
|
* 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 NoResponseException if there was no response marking the synchronization point as success or failed.
|
||||||
* @throws E if there was a failure
|
* @throws E if there was a failure
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException if the connection is interrupted.
|
||||||
*/
|
*/
|
||||||
public void checkIfSuccessOrWaitOrThrow() throws NoResponseException, E, InterruptedException {
|
public void checkIfSuccessOrWaitOrThrow() throws NoResponseException, E, InterruptedException {
|
||||||
checkIfSuccessOrWait();
|
checkIfSuccessOrWait();
|
||||||
|
|
|
@ -44,13 +44,13 @@ import org.jxmpp.jid.EntityFullJid;
|
||||||
* // Most servers require you to login before performing other tasks.
|
* // Most servers require you to login before performing other tasks.
|
||||||
* con.login("jsmith", "mypass");
|
* con.login("jsmith", "mypass");
|
||||||
* // Start a new conversation with John Doe and send him a message.
|
* // Start a new conversation with John Doe and send him a message.
|
||||||
* Chat chat = ChatManager.getInstanceFor(con).createChat(<font color="green">"jdoe@igniterealtime.org"</font>, new MessageListener() {
|
* Chat chat = ChatManager.getInstanceFor(con).createChat("jdoe@igniterealtime.org", new MessageListener() {
|
||||||
* public void processMessage(Chat chat, Message message) {
|
* public void processMessage(Chat chat, Message message) {
|
||||||
* // Print out any messages we get back to standard out.
|
* // Print out any messages we get back to standard out.
|
||||||
* System.out.println(<font color="green">"Received message: "</font> + message);
|
* System.out.println("Received message: " + message);
|
||||||
* }
|
* }
|
||||||
* });
|
* });
|
||||||
* chat.sendMessage(<font color="green">"Howdy!"</font>);
|
* chat.sendMessage("Howdy!");
|
||||||
* // Disconnect from the server
|
* // Disconnect from the server
|
||||||
* con.disconnect();
|
* con.disconnect();
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -485,6 +485,7 @@ public interface XMPPConnection {
|
||||||
* Get the feature stanza(/packet) extensions for a given stream feature of the
|
* Get the feature stanza(/packet) extensions for a given stream feature of the
|
||||||
* server, or <code>null</code> if the server doesn't support that feature.
|
* server, or <code>null</code> if the server doesn't support that feature.
|
||||||
*
|
*
|
||||||
|
* @param <F> {@link ExtensionElement} type of the feature.
|
||||||
* @param element
|
* @param element
|
||||||
* @param namespace
|
* @param namespace
|
||||||
* @return a stanza(/packet) extensions of the feature or <code>null</code>
|
* @return a stanza(/packet) extensions of the feature or <code>null</code>
|
||||||
|
|
|
@ -91,6 +91,7 @@ public abstract class XMPPException extends Exception {
|
||||||
/**
|
/**
|
||||||
* Creates a new XMPPErrorException with the XMPPError that was the root case of the exception.
|
* Creates a new XMPPErrorException with the XMPPError that was the root case of the exception.
|
||||||
*
|
*
|
||||||
|
* @param stanza stanza that contained the exception.
|
||||||
* @param error the root cause of the exception.
|
* @param error the root cause of the exception.
|
||||||
*/
|
*/
|
||||||
public XMPPErrorException(Stanza stanza, XMPPError error) {
|
public XMPPErrorException(Stanza stanza, XMPPError error) {
|
||||||
|
|
|
@ -64,6 +64,7 @@ public interface SmackDebugger {
|
||||||
* needs to wrap the new reader and writer to keep being notified of the connection
|
* needs to wrap the new reader and writer to keep being notified of the connection
|
||||||
* traffic.
|
* traffic.
|
||||||
*
|
*
|
||||||
|
* @param reader connection reader.
|
||||||
* @return a new special Reader that wraps the new connection Reader.
|
* @return a new special Reader that wraps the new connection Reader.
|
||||||
*/
|
*/
|
||||||
public abstract Reader newConnectionReader(Reader reader);
|
public abstract Reader newConnectionReader(Reader reader);
|
||||||
|
@ -74,6 +75,7 @@ public interface SmackDebugger {
|
||||||
* needs to wrap the new reader and writer to keep being notified of the connection
|
* needs to wrap the new reader and writer to keep being notified of the connection
|
||||||
* traffic.
|
* traffic.
|
||||||
*
|
*
|
||||||
|
* @param writer connection writer.
|
||||||
* @return a new special Writer that wraps the new connection Writer.
|
* @return a new special Writer that wraps the new connection Writer.
|
||||||
*/
|
*/
|
||||||
public abstract Writer newConnectionWriter(Writer writer);
|
public abstract Writer newConnectionWriter(Writer writer);
|
||||||
|
|
|
@ -27,6 +27,11 @@ public interface SmackDebuggerFactory {
|
||||||
/**
|
/**
|
||||||
* Initialize the new SmackDebugger instance.
|
* Initialize the new SmackDebugger instance.
|
||||||
*
|
*
|
||||||
|
* @param connection connection.
|
||||||
|
* @param writer connection writer.
|
||||||
|
* @param reader connection reader.
|
||||||
|
*
|
||||||
|
* @return SmackDebugger.
|
||||||
* @throws IllegalArgumentException if the SmackDebugger can't be loaded.
|
* @throws IllegalArgumentException if the SmackDebugger can't be loaded.
|
||||||
*/
|
*/
|
||||||
SmackDebugger create(XMPPConnection connection, Writer writer, Reader reader) throws IllegalArgumentException;
|
SmackDebugger create(XMPPConnection connection, Writer writer, Reader reader) throws IllegalArgumentException;
|
||||||
|
|
|
@ -52,6 +52,7 @@ public final class FromMatchesFilter extends AbstractFromToMatchesFilter {
|
||||||
*
|
*
|
||||||
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
||||||
* have a from address.
|
* have a from address.
|
||||||
|
* @return filter for the "from" address.
|
||||||
*/
|
*/
|
||||||
public static FromMatchesFilter create(Jid address) {
|
public static FromMatchesFilter create(Jid address) {
|
||||||
return new FromMatchesFilter(address, address != null ? address.hasNoResource() : false) ;
|
return new FromMatchesFilter(address, address != null ? address.hasNoResource() : false) ;
|
||||||
|
@ -63,6 +64,7 @@ public final class FromMatchesFilter extends AbstractFromToMatchesFilter {
|
||||||
*
|
*
|
||||||
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
||||||
* have a from address.
|
* have a from address.
|
||||||
|
* @return filter matching the "from" address.
|
||||||
*/
|
*/
|
||||||
public static FromMatchesFilter createBare(Jid address) {
|
public static FromMatchesFilter createBare(Jid address) {
|
||||||
return new FromMatchesFilter(address, true);
|
return new FromMatchesFilter(address, true);
|
||||||
|
@ -74,6 +76,7 @@ public final class FromMatchesFilter extends AbstractFromToMatchesFilter {
|
||||||
*
|
*
|
||||||
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
||||||
* have a from address.
|
* have a from address.
|
||||||
|
* @return filter matching the "from" address.
|
||||||
*/
|
*/
|
||||||
public static FromMatchesFilter createFull(Jid address) {
|
public static FromMatchesFilter createFull(Jid address) {
|
||||||
return new FromMatchesFilter(address, false);
|
return new FromMatchesFilter(address, false);
|
||||||
|
|
|
@ -81,6 +81,7 @@ public class IQReplyFilter implements StanzaFilter {
|
||||||
* and following discussion in February and March.
|
* and following discussion in February and March.
|
||||||
*
|
*
|
||||||
* @param iqPacket An IQ request. Filter for replies to this packet.
|
* @param iqPacket An IQ request. Filter for replies to this packet.
|
||||||
|
* @param conn connection.
|
||||||
*/
|
*/
|
||||||
public IQReplyFilter(IQ iqPacket, XMPPConnection conn) {
|
public IQReplyFilter(IQ iqPacket, XMPPConnection conn) {
|
||||||
if (!iqPacket.isRequestIQ()) {
|
if (!iqPacket.isRequestIQ()) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ public final class ToMatchesFilter extends AbstractFromToMatchesFilter {
|
||||||
*
|
*
|
||||||
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
||||||
* have a from address.
|
* have a from address.
|
||||||
|
* @return filter matching the "to" address.
|
||||||
*/
|
*/
|
||||||
public static ToMatchesFilter create(Jid address) {
|
public static ToMatchesFilter create(Jid address) {
|
||||||
return new ToMatchesFilter(address, address != null ? address.hasNoResource() : false) ;
|
return new ToMatchesFilter(address, address != null ? address.hasNoResource() : false) ;
|
||||||
|
@ -46,6 +47,7 @@ public final class ToMatchesFilter extends AbstractFromToMatchesFilter {
|
||||||
*
|
*
|
||||||
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
||||||
* have a from address.
|
* have a from address.
|
||||||
|
* @return filter matching the "to" address.
|
||||||
*/
|
*/
|
||||||
public static ToMatchesFilter createBare(Jid address) {
|
public static ToMatchesFilter createBare(Jid address) {
|
||||||
return new ToMatchesFilter(address, true);
|
return new ToMatchesFilter(address, true);
|
||||||
|
@ -57,6 +59,7 @@ public final class ToMatchesFilter extends AbstractFromToMatchesFilter {
|
||||||
*
|
*
|
||||||
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
||||||
* have a from address.
|
* have a from address.
|
||||||
|
* @return filter matching the "to" address.
|
||||||
*/
|
*/
|
||||||
public static ToMatchesFilter createFull(Jid address) {
|
public static ToMatchesFilter createFull(Jid address) {
|
||||||
return new ToMatchesFilter(address, false);
|
return new ToMatchesFilter(address, false);
|
||||||
|
|
|
@ -96,6 +96,7 @@ public class AbstractError {
|
||||||
*
|
*
|
||||||
* @param elementName the XML element name of the stanza(/packet) extension.
|
* @param elementName the XML element name of the stanza(/packet) extension.
|
||||||
* @param namespace the XML element namespace of the stanza(/packet) extension.
|
* @param namespace the XML element namespace of the stanza(/packet) extension.
|
||||||
|
* @param <PE> type of the ExtensionElement.
|
||||||
* @return the extension, or <tt>null</tt> if it doesn't exist.
|
* @return the extension, or <tt>null</tt> if it doesn't exist.
|
||||||
*/
|
*/
|
||||||
public <PE extends ExtensionElement> PE getExtension(String elementName, String namespace) {
|
public <PE extends ExtensionElement> PE getExtension(String elementName, String namespace) {
|
||||||
|
|
|
@ -171,6 +171,7 @@ public interface Packet extends TopLevelStreamElement {
|
||||||
*
|
*
|
||||||
* @param elementName the XML element name of the stanza(/packet) extension. (May be null)
|
* @param elementName the XML element name of the stanza(/packet) extension. (May be null)
|
||||||
* @param namespace the XML element namespace of the stanza(/packet) extension.
|
* @param namespace the XML element namespace of the stanza(/packet) extension.
|
||||||
|
* @param <PE> type of the ExtensionElement.
|
||||||
* @return the extension, or <tt>null</tt> if it doesn't exist.
|
* @return the extension, or <tt>null</tt> if it doesn't exist.
|
||||||
*/
|
*/
|
||||||
<PE extends ExtensionElement> PE getExtension(String elementName, String namespace);
|
<PE extends ExtensionElement> PE getExtension(String elementName, String namespace);
|
||||||
|
|
|
@ -351,6 +351,7 @@ public abstract class Stanza implements TopLevelStreamElement {
|
||||||
*
|
*
|
||||||
* @param elementName the XML element name of the extension. (May be null)
|
* @param elementName the XML element name of the extension. (May be null)
|
||||||
* @param namespace the XML element namespace of the extension.
|
* @param namespace the XML element namespace of the extension.
|
||||||
|
* @param <PE> type of the ExtensionElement.
|
||||||
* @return the extension, or <tt>null</tt> if it doesn't exist.
|
* @return the extension, or <tt>null</tt> if it doesn't exist.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class XMPPError extends AbstractError {
|
||||||
/**
|
/**
|
||||||
* Create a new XMPPError.
|
* Create a new XMPPError.
|
||||||
*
|
*
|
||||||
* @param condition
|
* @param condition error condition.
|
||||||
* @deprecated use {@link Builder} instead.
|
* @deprecated use {@link Builder} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -120,8 +120,8 @@ public class XMPPError extends AbstractError {
|
||||||
/**
|
/**
|
||||||
* Create a new XMPPError.
|
* Create a new XMPPError.
|
||||||
*
|
*
|
||||||
* @param condition
|
* @param condition error condition.
|
||||||
* @param applicationSpecificCondition
|
* @param applicationSpecificCondition application specific condition.
|
||||||
* @deprecated use {@link Builder} instead.
|
* @deprecated use {@link Builder} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -137,6 +137,8 @@ public class XMPPError extends AbstractError {
|
||||||
*
|
*
|
||||||
* @param type the error type.
|
* @param type the error type.
|
||||||
* @param condition the error condition.
|
* @param condition the error condition.
|
||||||
|
* @param conditionText
|
||||||
|
* @param errorGenerator
|
||||||
* @param descriptiveTexts
|
* @param descriptiveTexts
|
||||||
* @param extensions list of stanza(/packet) extensions
|
* @param extensions list of stanza(/packet) extensions
|
||||||
* @deprecated use {@link Builder} instead.
|
* @deprecated use {@link Builder} instead.
|
||||||
|
@ -155,6 +157,8 @@ public class XMPPError extends AbstractError {
|
||||||
*
|
*
|
||||||
* @param type the error type.
|
* @param type the error type.
|
||||||
* @param condition the error condition.
|
* @param condition the error condition.
|
||||||
|
* @param conditionText
|
||||||
|
* @param errorGenerator
|
||||||
* @param descriptiveTexts
|
* @param descriptiveTexts
|
||||||
* @param extensions list of stanza(/packet) extensions
|
* @param extensions list of stanza(/packet) extensions
|
||||||
* @param stanza the stanza carrying this XMPP error.
|
* @param stanza the stanza carrying this XMPP error.
|
||||||
|
|
|
@ -236,11 +236,10 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
||||||
*
|
*
|
||||||
* @param challengeString a base64 encoded string representing the challenge.
|
* @param challengeString a base64 encoded string representing the challenge.
|
||||||
* @param finalChallenge true if this is the last challenge send by the server within the success stanza
|
* @param finalChallenge true if this is the last challenge send by the server within the success stanza
|
||||||
* @throws NotConnectedException
|
* @throws SmackException exception
|
||||||
* @throws SmackException
|
* @throws InterruptedException if the connection is interrupted
|
||||||
* @throws InterruptedException
|
|
||||||
*/
|
*/
|
||||||
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackException, NotConnectedException, InterruptedException {
|
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackException, InterruptedException {
|
||||||
byte[] challenge = Base64.decode((challengeString != null && challengeString.equals("=")) ? "" : challengeString);
|
byte[] challenge = Base64.decode((challengeString != null && challengeString.equals("=")) ? "" : challengeString);
|
||||||
byte[] response = evaluateChallenge(challenge);
|
byte[] response = evaluateChallenge(challenge);
|
||||||
if (finalChallenge) {
|
if (finalChallenge) {
|
||||||
|
@ -260,7 +259,12 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws SmackException
|
* Evaluate the SASL challenge.
|
||||||
|
*
|
||||||
|
* @param challenge challenge to evaluate.
|
||||||
|
*
|
||||||
|
* @return null.
|
||||||
|
* @throws SmackException in case of an error.
|
||||||
*/
|
*/
|
||||||
protected byte[] evaluateChallenge(byte[] challenge) throws SmackException {
|
protected byte[] evaluateChallenge(byte[] challenge) throws SmackException {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -127,6 +127,7 @@ public class DNSUtil {
|
||||||
*
|
*
|
||||||
* @param domain the domain.
|
* @param domain the domain.
|
||||||
* @param failedAddresses on optional list that will be populated with host addresses that failed to resolve.
|
* @param failedAddresses on optional list that will be populated with host addresses that failed to resolve.
|
||||||
|
* @param dnssecMode DNSSec mode.
|
||||||
* @return List of HostAddress, which encompasses the hostname and port that the
|
* @return List of HostAddress, which encompasses the hostname and port that the
|
||||||
* XMPP server can be reached at for the specified domain.
|
* XMPP server can be reached at for the specified domain.
|
||||||
*/
|
*/
|
||||||
|
@ -147,6 +148,7 @@ public class DNSUtil {
|
||||||
*
|
*
|
||||||
* @param domain the domain.
|
* @param domain the domain.
|
||||||
* @param failedAddresses on optional list that will be populated with host addresses that failed to resolve.
|
* @param failedAddresses on optional list that will be populated with host addresses that failed to resolve.
|
||||||
|
* @param dnssecMode DNSSec mode.
|
||||||
* @return List of HostAddress, which encompasses the hostname and port that the
|
* @return List of HostAddress, which encompasses the hostname and port that the
|
||||||
* XMPP server can be reached at for the specified domain.
|
* XMPP server can be reached at for the specified domain.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -104,7 +104,7 @@ public final class FileUtils {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("DefaultCharset")
|
@SuppressWarnings("DefaultCharset")
|
||||||
public static String readFileOrThrow(File file) throws FileNotFoundException, IOException {
|
public static String readFileOrThrow(File file) throws IOException {
|
||||||
Reader reader = null;
|
Reader reader = null;
|
||||||
try {
|
try {
|
||||||
reader = new FileReader(file);
|
reader = new FileReader(file);
|
||||||
|
|
|
@ -709,6 +709,7 @@ public class PacketParserUtils {
|
||||||
*
|
*
|
||||||
* @param parser the XML parser, positioned at the start of the compression stanza.
|
* @param parser the XML parser, positioned at the start of the compression stanza.
|
||||||
* @return The CompressionFeature stream element
|
* @return The CompressionFeature stream element
|
||||||
|
* @throws IOException
|
||||||
* @throws XmlPullParserException if an exception occurs while parsing the stanza.
|
* @throws XmlPullParserException if an exception occurs while parsing the stanza.
|
||||||
*/
|
*/
|
||||||
public static Compress.Feature parseCompressionFeature(XmlPullParser parser)
|
public static Compress.Feature parseCompressionFeature(XmlPullParser parser)
|
||||||
|
@ -716,7 +717,7 @@ public class PacketParserUtils {
|
||||||
assert (parser.getEventType() == XmlPullParser.START_TAG);
|
assert (parser.getEventType() == XmlPullParser.START_TAG);
|
||||||
String name;
|
String name;
|
||||||
final int initialDepth = parser.getDepth();
|
final int initialDepth = parser.getDepth();
|
||||||
List<String> methods = new LinkedList<String>();
|
List<String> methods = new LinkedList<>();
|
||||||
outerloop: while (true) {
|
outerloop: while (true) {
|
||||||
int eventType = parser.next();
|
int eventType = parser.next();
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
|
@ -899,7 +900,14 @@ public class PacketParserUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse an extension element.
|
* Parses an extension element.
|
||||||
|
*
|
||||||
|
* @param elementName the XML element name of the extension element.
|
||||||
|
* @param namespace the XML namespace of the stanza(/packet) extension.
|
||||||
|
* @param parser the XML parser, positioned at the starting element of the extension.
|
||||||
|
*
|
||||||
|
* @return an extension element.
|
||||||
|
* @throws Exception when an error occurs during parsing.
|
||||||
* @deprecated use {@link #parseExtensionElement(String, String, XmlPullParser)} instead.
|
* @deprecated use {@link #parseExtensionElement(String, String, XmlPullParser)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -914,7 +922,9 @@ public class PacketParserUtils {
|
||||||
* @param elementName the XML element name of the extension element.
|
* @param elementName the XML element name of the extension element.
|
||||||
* @param namespace the XML namespace of the stanza(/packet) extension.
|
* @param namespace the XML namespace of the stanza(/packet) extension.
|
||||||
* @param parser the XML parser, positioned at the starting element of the extension.
|
* @param parser the XML parser, positioned at the starting element of the extension.
|
||||||
|
*
|
||||||
* @return an extension element.
|
* @return an extension element.
|
||||||
|
* @throws Exception when an error occurs during parsing.
|
||||||
*/
|
*/
|
||||||
public static ExtensionElement parseExtensionElement(String elementName, String namespace,
|
public static ExtensionElement parseExtensionElement(String elementName, String namespace,
|
||||||
XmlPullParser parser) throws Exception {
|
XmlPullParser parser) throws Exception {
|
||||||
|
|
|
@ -41,9 +41,11 @@ public class PacketUtil {
|
||||||
/**
|
/**
|
||||||
* Get a extension element from a collection.
|
* Get a extension element from a collection.
|
||||||
*
|
*
|
||||||
* @param collection
|
* @param collection Collection of ExtensionElements.
|
||||||
* @param element
|
* @param element name of the targeted ExtensionElement.
|
||||||
* @param namespace
|
* @param namespace namespace of the targeted ExtensionElement.
|
||||||
|
* @param <PE> Type of the ExtensionElement
|
||||||
|
*
|
||||||
* @return the extension element
|
* @return the extension element
|
||||||
* @deprecated use {@link #extensionElementFrom(Collection, String, String)} instead
|
* @deprecated use {@link #extensionElementFrom(Collection, String, String)} instead
|
||||||
*/
|
*/
|
||||||
|
@ -57,9 +59,11 @@ public class PacketUtil {
|
||||||
/**
|
/**
|
||||||
* Get a extension element from a collection.
|
* Get a extension element from a collection.
|
||||||
*
|
*
|
||||||
* @param collection
|
* @param collection Collection of ExtensionElements.
|
||||||
* @param element
|
* @param element name of the targeted ExtensionElement.
|
||||||
* @param namespace
|
* @param namespace namespace of the targeted ExtensionElement.
|
||||||
|
* @param <PE> Type of the ExtensionElement
|
||||||
|
*
|
||||||
* @return the extension element
|
* @return the extension element
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|
|
@ -60,6 +60,9 @@ public class TLSUtils {
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param builder the configuration builder to apply this setting to
|
* @param builder the configuration builder to apply this setting to
|
||||||
|
* @param <B> Type of the ConnectionConfiguration builder.
|
||||||
|
*
|
||||||
|
* @return the given builder
|
||||||
*/
|
*/
|
||||||
public static <B extends ConnectionConfiguration.Builder<B,?>> B setTLSOnly(B builder) {
|
public static <B extends ConnectionConfiguration.Builder<B,?>> B setTLSOnly(B builder) {
|
||||||
builder.setEnabledSSLProtocols(new String[] { PROTO_TLSV1_2, PROTO_TLSV1_1, PROTO_TLSV1 });
|
builder.setEnabledSSLProtocols(new String[] { PROTO_TLSV1_2, PROTO_TLSV1_1, PROTO_TLSV1 });
|
||||||
|
@ -77,6 +80,9 @@ public class TLSUtils {
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param builder the configuration builder to apply this setting to
|
* @param builder the configuration builder to apply this setting to
|
||||||
|
* @param <B> Type of the ConnectionConfiguration builder.
|
||||||
|
*
|
||||||
|
* @return the given builder
|
||||||
*/
|
*/
|
||||||
public static <B extends ConnectionConfiguration.Builder<B,?>> B setSSLv3AndTLSOnly(B builder) {
|
public static <B extends ConnectionConfiguration.Builder<B,?>> B setSSLv3AndTLSOnly(B builder) {
|
||||||
builder.setEnabledSSLProtocols(new String[] { PROTO_TLSV1_2, PROTO_TLSV1_1, PROTO_TLSV1, PROTO_SSL3 });
|
builder.setEnabledSSLProtocols(new String[] { PROTO_TLSV1_2, PROTO_TLSV1_1, PROTO_TLSV1, PROTO_SSL3 });
|
||||||
|
@ -92,6 +98,7 @@ public class TLSUtils {
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param builder a connection configuration builder.
|
* @param builder a connection configuration builder.
|
||||||
|
* @param <B> Type of the ConnectionConfiguration builder.
|
||||||
* @throws NoSuchAlgorithmException
|
* @throws NoSuchAlgorithmException
|
||||||
* @throws KeyManagementException
|
* @throws KeyManagementException
|
||||||
* @return the given builder.
|
* @return the given builder.
|
||||||
|
@ -120,6 +127,7 @@ public class TLSUtils {
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param builder a connection configuration builder.
|
* @param builder a connection configuration builder.
|
||||||
|
* @param <B> Type of the ConnectionConfiguration builder.
|
||||||
* @return the given builder.
|
* @return the given builder.
|
||||||
*/
|
*/
|
||||||
public static <B extends ConnectionConfiguration.Builder<B,?>> B disableHostnameVerificationForTlsCertificates(B builder) {
|
public static <B extends ConnectionConfiguration.Builder<B,?>> B disableHostnameVerificationForTlsCertificates(B builder) {
|
||||||
|
|
|
@ -42,6 +42,8 @@ public abstract class DNSResolver {
|
||||||
/**
|
/**
|
||||||
* Gets a list of service records for the specified service.
|
* Gets a list of service records for the specified service.
|
||||||
* @param name The symbolic name of the service.
|
* @param name The symbolic name of the service.
|
||||||
|
* @param failedAddresses list of failed addresses.
|
||||||
|
* @param dnssecMode security mode.
|
||||||
* @return The list of SRV records mapped to the service name.
|
* @return The list of SRV records mapped to the service name.
|
||||||
*/
|
*/
|
||||||
public final List<SRVRecord> lookupSRVRecords(String name, List<HostAddress> failedAddresses, DnssecMode dnssecMode) {
|
public final List<SRVRecord> lookupSRVRecords(String name, List<HostAddress> failedAddresses, DnssecMode dnssecMode) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ public class HostAddress {
|
||||||
*
|
*
|
||||||
* @param fqdn the optional fully qualified domain name (FQDN).
|
* @param fqdn the optional fully qualified domain name (FQDN).
|
||||||
* @param port The port to connect on.
|
* @param port The port to connect on.
|
||||||
|
* @param inetAddresses list of addresses.
|
||||||
* @throws IllegalArgumentException If the port is out of valid range (0 - 65535).
|
* @throws IllegalArgumentException If the port is out of valid range (0 - 65535).
|
||||||
*/
|
*/
|
||||||
public HostAddress(String fqdn, int port, List<InetAddress> inetAddresses) {
|
public HostAddress(String fqdn, int port, List<InetAddress> inetAddresses) {
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class SRVRecord extends HostAddress implements Comparable<SRVRecord> {
|
||||||
* @param port The connection port
|
* @param port The connection port
|
||||||
* @param priority Priority of the target host
|
* @param priority Priority of the target host
|
||||||
* @param weight Relative weight for records with same priority
|
* @param weight Relative weight for records with same priority
|
||||||
|
* @param inetAddresses list of addresses.
|
||||||
* @throws IllegalArgumentException fqdn is null or any other field is not in valid range (0-65535).
|
* @throws IllegalArgumentException fqdn is null or any other field is not in valid range (0-65535).
|
||||||
*/
|
*/
|
||||||
public SRVRecord(String fqdn, int port, int priority, int weight, List<InetAddress> inetAddresses) {
|
public SRVRecord(String fqdn, int port, int priority, int weight, List<InetAddress> inetAddresses) {
|
||||||
|
|
|
@ -336,6 +336,8 @@ public final class CarbonManager extends Manager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if carbons are enabled on this connection.
|
* Check if carbons are enabled on this connection.
|
||||||
|
*
|
||||||
|
* @return true if carbons are enabled, else false.
|
||||||
*/
|
*/
|
||||||
public boolean getCarbonsEnabled() {
|
public boolean getCarbonsEnabled() {
|
||||||
return this.enabled_state;
|
return this.enabled_state;
|
||||||
|
|
|
@ -56,6 +56,7 @@ public abstract class AbstractHttpOverXmpp extends IQ {
|
||||||
/**
|
/**
|
||||||
* Returns start tag.
|
* Returns start tag.
|
||||||
*
|
*
|
||||||
|
* @param xml builder.
|
||||||
* @return start tag
|
* @return start tag
|
||||||
*/
|
*/
|
||||||
protected abstract IQChildElementXmlStringBuilder getIQHoxtChildElementBuilder(IQChildElementXmlStringBuilder xml);
|
protected abstract IQChildElementXmlStringBuilder getIQHoxtChildElementBuilder(IQChildElementXmlStringBuilder xml);
|
||||||
|
|
|
@ -96,6 +96,7 @@ public interface BytestreamManager {
|
||||||
* @throws IOException if an IO error occurred while establishing the session
|
* @throws IOException if an IO error occurred while establishing the session
|
||||||
* @throws InterruptedException if the thread was interrupted while waiting in a blocking
|
* @throws InterruptedException if the thread was interrupted while waiting in a blocking
|
||||||
* operation
|
* operation
|
||||||
|
* @throws SmackException if an error occurs in Smack.
|
||||||
*/
|
*/
|
||||||
public BytestreamSession establishSession(Jid targetJID) throws XMPPException, IOException,
|
public BytestreamSession establishSession(Jid targetJID) throws XMPPException, IOException,
|
||||||
InterruptedException, SmackException;
|
InterruptedException, SmackException;
|
||||||
|
@ -114,6 +115,7 @@ public interface BytestreamManager {
|
||||||
* @throws IOException if an IO error occurred while establishing the session
|
* @throws IOException if an IO error occurred while establishing the session
|
||||||
* @throws InterruptedException if the thread was interrupted while waiting in a blocking
|
* @throws InterruptedException if the thread was interrupted while waiting in a blocking
|
||||||
* operation
|
* operation
|
||||||
|
* @throws SmackException if an error occurs in Smack.
|
||||||
*/
|
*/
|
||||||
public BytestreamSession establishSession(Jid targetJID, String sessionID)
|
public BytestreamSession establishSession(Jid targetJID, String sessionID)
|
||||||
throws XMPPException, IOException, InterruptedException, SmackException;
|
throws XMPPException, IOException, InterruptedException, SmackException;
|
||||||
|
|
|
@ -191,6 +191,7 @@ public class InBandBytestreamSession implements BytestreamSession {
|
||||||
* This method is invoked if one of the streams has been closed locally, if an error occurred
|
* This method is invoked if one of the streams has been closed locally, if an error occurred
|
||||||
* locally or if the whole session should be closed.
|
* locally or if the whole session should be closed.
|
||||||
*
|
*
|
||||||
|
* @param in do we want to close the Input- or OutputStream?
|
||||||
* @throws IOException if an error occurs while sending the close request
|
* @throws IOException if an error occurs while sending the close request
|
||||||
*/
|
*/
|
||||||
protected synchronized void closeByLocal(boolean in) throws IOException {
|
protected synchronized void closeByLocal(boolean in) throws IOException {
|
||||||
|
|
|
@ -284,6 +284,7 @@ public class Bytestream extends IQ {
|
||||||
*
|
*
|
||||||
* @param JID The JID of the stream host.
|
* @param JID The JID of the stream host.
|
||||||
* @param address The internet address of the stream host.
|
* @param address The internet address of the stream host.
|
||||||
|
* @param port port of the stream host.
|
||||||
*/
|
*/
|
||||||
public StreamHost(final Jid JID, final String address, int port) {
|
public StreamHost(final Jid JID, final String address, int port) {
|
||||||
this.JID = Objects.requireNonNull(JID, "StreamHost JID must not be null");
|
this.JID = Objects.requireNonNull(JID, "StreamHost JID must not be null");
|
||||||
|
|
|
@ -29,6 +29,9 @@ public interface EntityCapsPersistentCache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lookup DiscoverInfo by a Node string.
|
* Lookup DiscoverInfo by a Node string.
|
||||||
|
* @param nodeVer
|
||||||
|
*
|
||||||
|
* @return DiscoverInfo.
|
||||||
*/
|
*/
|
||||||
DiscoverInfo lookup(String nodeVer);
|
DiscoverInfo lookup(String nodeVer);
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,7 @@ public abstract class AdHocCommand {
|
||||||
* command. It is invoked on every command. If there is a problem executing
|
* command. It is invoked on every command. If there is a problem executing
|
||||||
* the command it throws an XMPPException.
|
* the command it throws an XMPPException.
|
||||||
*
|
*
|
||||||
|
* @throws NoResponseException
|
||||||
* @throws XMPPErrorException if there is an error executing the command.
|
* @throws XMPPErrorException if there is an error executing the command.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
|
@ -226,6 +227,7 @@ public abstract class AdHocCommand {
|
||||||
* XMPPException.
|
* XMPPException.
|
||||||
*
|
*
|
||||||
* @param response the form answer of the previous stage.
|
* @param response the form answer of the previous stage.
|
||||||
|
* @throws NoResponseException
|
||||||
* @throws XMPPErrorException if there is a problem executing the command.
|
* @throws XMPPErrorException if there is a problem executing the command.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
|
@ -240,6 +242,8 @@ public abstract class AdHocCommand {
|
||||||
* XMPPException.
|
* XMPPException.
|
||||||
*
|
*
|
||||||
* @param response the form answer of the previous stage.
|
* @param response the form answer of the previous stage.
|
||||||
|
*
|
||||||
|
* @throws NoResponseException
|
||||||
* @throws XMPPErrorException if there is a problem executing the command.
|
* @throws XMPPErrorException if there is a problem executing the command.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
|
@ -252,6 +256,7 @@ public abstract class AdHocCommand {
|
||||||
* the previous one. If there is a problem executing the command it throws
|
* the previous one. If there is a problem executing the command it throws
|
||||||
* an XMPPException.
|
* an XMPPException.
|
||||||
*
|
*
|
||||||
|
* @throws NoResponseException
|
||||||
* @throws XMPPErrorException if there is a problem executing the command.
|
* @throws XMPPErrorException if there is a problem executing the command.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
|
@ -263,6 +268,7 @@ public abstract class AdHocCommand {
|
||||||
* the execution. If there is a problem executing the command it throws an
|
* the execution. If there is a problem executing the command it throws an
|
||||||
* XMPPException.
|
* XMPPException.
|
||||||
*
|
*
|
||||||
|
* @throws NoResponseException
|
||||||
* @throws XMPPErrorException if there is a problem executing the command.
|
* @throws XMPPErrorException if there is a problem executing the command.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
|
|
|
@ -47,6 +47,8 @@ public class DelayInformation implements ExtensionElement {
|
||||||
/**
|
/**
|
||||||
* Creates a new instance with the specified timestamp.
|
* Creates a new instance with the specified timestamp.
|
||||||
* @param stamp the timestamp
|
* @param stamp the timestamp
|
||||||
|
* @param from sender
|
||||||
|
* @param reason reason of delay.
|
||||||
*/
|
*/
|
||||||
public DelayInformation(Date stamp, String from, String reason) {
|
public DelayInformation(Date stamp, String from, String reason) {
|
||||||
this.stamp = stamp;
|
this.stamp = stamp;
|
||||||
|
|
|
@ -43,6 +43,9 @@ public interface PrivateDataProvider {
|
||||||
*
|
*
|
||||||
* @param parser an XML parser.
|
* @param parser an XML parser.
|
||||||
* @return a new PrivateData instance.
|
* @return a new PrivateData instance.
|
||||||
|
* @throws XmlPullParserException
|
||||||
|
* @throws IOException
|
||||||
|
* @throws SmackException
|
||||||
*/
|
*/
|
||||||
PrivateData parsePrivateData(XmlPullParser parser) throws XmlPullParserException, IOException, SmackException;
|
PrivateData parsePrivateData(XmlPullParser parser) throws XmlPullParserException, IOException, SmackException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,6 +293,8 @@ public final class AccountManager extends Manager {
|
||||||
* be performed after a successful login operation has been completed. Not all servers
|
* be performed after a successful login operation has been completed. Not all servers
|
||||||
* support changing passwords; an XMPPException will be thrown when that is the case.
|
* support changing passwords; an XMPPException will be thrown when that is the case.
|
||||||
*
|
*
|
||||||
|
* @param newPassword new password.
|
||||||
|
*
|
||||||
* @throws IllegalStateException if not currently logged-in to the server.
|
* @throws IllegalStateException if not currently logged-in to the server.
|
||||||
* @throws XMPPErrorException if an error occurs when changing the password.
|
* @throws XMPPErrorException if an error occurs when changing the password.
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
|
|
|
@ -240,6 +240,7 @@ public final class MultiUserChatManager extends Manager {
|
||||||
*
|
*
|
||||||
* @param jid the name of the room in the form "roomName@service", where "service" is the hostname at which the
|
* @param jid the name of the room in the form "roomName@service", where "service" is the hostname at which the
|
||||||
* multi-user chat service is running. Make sure to provide a valid JID.
|
* multi-user chat service is running. Make sure to provide a valid JID.
|
||||||
|
* @return MultiUserChat instance of the room with the given jid.
|
||||||
*/
|
*/
|
||||||
public synchronized MultiUserChat getMultiUserChat(EntityBareJid jid) {
|
public synchronized MultiUserChat getMultiUserChat(EntityBareJid jid) {
|
||||||
WeakReference<MultiUserChat> weakRefMultiUserChat = multiUserChats.get(jid);
|
WeakReference<MultiUserChat> weakRefMultiUserChat = multiUserChats.get(jid);
|
||||||
|
|
|
@ -115,6 +115,7 @@ public final class PEPManager extends Manager {
|
||||||
* are received from remote XMPP clients.
|
* are received from remote XMPP clients.
|
||||||
*
|
*
|
||||||
* @param pepListener a roster exchange listener.
|
* @param pepListener a roster exchange listener.
|
||||||
|
* @return true if pepListener was added.
|
||||||
*/
|
*/
|
||||||
public boolean addPEPListener(PEPListener pepListener) {
|
public boolean addPEPListener(PEPListener pepListener) {
|
||||||
return pepListeners.add(pepListener);
|
return pepListeners.add(pepListener);
|
||||||
|
@ -124,6 +125,7 @@ public final class PEPManager extends Manager {
|
||||||
* Removes a listener from PEP events.
|
* Removes a listener from PEP events.
|
||||||
*
|
*
|
||||||
* @param pepListener a roster exchange listener.
|
* @param pepListener a roster exchange listener.
|
||||||
|
* @return true, if pepListener was removed.
|
||||||
*/
|
*/
|
||||||
public boolean removePEPListener(PEPListener pepListener) {
|
public boolean removePEPListener(PEPListener pepListener) {
|
||||||
return pepListeners.remove(pepListener);
|
return pepListeners.remove(pepListener);
|
||||||
|
|
|
@ -69,6 +69,7 @@ public class ItemPublishEvent<T extends Item> extends SubscriptionEvent
|
||||||
* @param nodeId The id of the node the event came from
|
* @param nodeId The id of the node the event came from
|
||||||
* @param eventItems The list of {@link Item} that were published
|
* @param eventItems The list of {@link Item} that were published
|
||||||
* @param subscriptionIds The list of subscriptionIds
|
* @param subscriptionIds The list of subscriptionIds
|
||||||
|
* @param publishedDate date of publication.
|
||||||
*/
|
*/
|
||||||
public ItemPublishEvent(String nodeId, List<T> eventItems, List<String> subscriptionIds, Date publishedDate)
|
public ItemPublishEvent(String nodeId, List<T> eventItems, List<String> subscriptionIds, Date publishedDate)
|
||||||
{
|
{
|
||||||
|
@ -108,6 +109,7 @@ public class ItemPublishEvent<T extends Item> extends SubscriptionEvent
|
||||||
* Gets the original date the items were published. This is only
|
* Gets the original date the items were published. This is only
|
||||||
* valid if {@link #isDelayed()} is true.
|
* valid if {@link #isDelayed()} is true.
|
||||||
*
|
*
|
||||||
|
* @return date of publication.
|
||||||
*/
|
*/
|
||||||
public Date getPublishedDate()
|
public Date getPublishedDate()
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,6 +111,7 @@ public class ItemsExtension extends NodeExtension implements EmbeddedPacketExten
|
||||||
*
|
*
|
||||||
* @param nodeId The node to which the items are being sent or deleted
|
* @param nodeId The node to which the items are being sent or deleted
|
||||||
* @param items The list of {@link Item} or {@link RetractItem}
|
* @param items The list of {@link Item} or {@link RetractItem}
|
||||||
|
* @param notify
|
||||||
*/
|
*/
|
||||||
public ItemsExtension(String nodeId, List<? extends ExtensionElement> items, boolean notify)
|
public ItemsExtension(String nodeId, List<? extends ExtensionElement> items, boolean notify)
|
||||||
{
|
{
|
||||||
|
@ -140,7 +141,7 @@ public class ItemsExtension extends NodeExtension implements EmbeddedPacketExten
|
||||||
/**
|
/**
|
||||||
* Gets the items related to the type of request or event.
|
* Gets the items related to the type of request or event.
|
||||||
*
|
*
|
||||||
* return List of {@link Item}, {@link RetractItem}, or null
|
* @return List of {@link Item}, {@link RetractItem}, or null
|
||||||
*/
|
*/
|
||||||
public List<? extends ExtensionElement> getItems()
|
public List<? extends ExtensionElement> getItems()
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class LeafNode extends Node
|
||||||
/**
|
/**
|
||||||
* Get the current items stored in the node.
|
* Get the current items stored in the node.
|
||||||
*
|
*
|
||||||
|
* @param <T> type of the items.
|
||||||
* @return List of {@link Item} in the node
|
* @return List of {@link Item} in the node
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
|
@ -83,6 +84,8 @@ public class LeafNode extends Node
|
||||||
*
|
*
|
||||||
* @param subscriptionId - The subscription id for the
|
* @param subscriptionId - The subscription id for the
|
||||||
* associated subscription.
|
* associated subscription.
|
||||||
|
* @param <T> type of the items.
|
||||||
|
*
|
||||||
* @return List of {@link Item} in the node
|
* @return List of {@link Item} in the node
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
|
@ -103,6 +106,7 @@ public class LeafNode extends Node
|
||||||
* event, that did not include the payload.
|
* event, that did not include the payload.
|
||||||
*
|
*
|
||||||
* @param ids Item ids of the items to retrieve
|
* @param ids Item ids of the items to retrieve
|
||||||
|
* @param <T> type of the items.
|
||||||
*
|
*
|
||||||
* @return The list of {@link Item} with payload
|
* @return The list of {@link Item} with payload
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
|
@ -126,6 +130,7 @@ public class LeafNode extends Node
|
||||||
* Get items persisted on the node, limited to the specified number.
|
* Get items persisted on the node, limited to the specified number.
|
||||||
*
|
*
|
||||||
* @param maxItems Maximum number of items to return
|
* @param maxItems Maximum number of items to return
|
||||||
|
* @param <T> type of the items.
|
||||||
*
|
*
|
||||||
* @return List of {@link Item}
|
* @return List of {@link Item}
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
|
@ -148,6 +153,8 @@ public class LeafNode extends Node
|
||||||
* on.
|
* on.
|
||||||
*
|
*
|
||||||
* @return List of {@link Item}
|
* @return List of {@link Item}
|
||||||
|
* @param <T> type of the items.
|
||||||
|
*
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
@ -170,6 +177,8 @@ public class LeafNode extends Node
|
||||||
* This is an optional argument, if provided as null no extensions will be added.
|
* This is an optional argument, if provided as null no extensions will be added.
|
||||||
* @param returnedExtensions a collection that will be filled with the returned packet
|
* @param returnedExtensions a collection that will be filled with the returned packet
|
||||||
* extensions. This is an optional argument, if provided as null it won't be populated.
|
* extensions. This is an optional argument, if provided as null it won't be populated.
|
||||||
|
* @param <T> type of the items.
|
||||||
|
*
|
||||||
* @return List of {@link Item}
|
* @return List of {@link Item}
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
|
@ -236,6 +245,8 @@ public class LeafNode extends Node
|
||||||
* For synchronous calls use {@link #send(Item) send(Item))}.
|
* For synchronous calls use {@link #send(Item) send(Item))}.
|
||||||
*
|
*
|
||||||
* @param item - The item being sent
|
* @param item - The item being sent
|
||||||
|
* @param <T> type of the items.
|
||||||
|
*
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
|
@ -259,6 +270,8 @@ public class LeafNode extends Node
|
||||||
* For synchronous calls use {@link #send(Collection) send(Collection))}.
|
* For synchronous calls use {@link #send(Collection) send(Collection))}.
|
||||||
*
|
*
|
||||||
* @param items - The collection of items being sent
|
* @param items - The collection of items being sent
|
||||||
|
* @param <T> type of the items.
|
||||||
|
*
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
|
@ -311,6 +324,8 @@ public class LeafNode extends Node
|
||||||
* For asynchronous calls, use {@link #publish(Item) publish(Item)}.
|
* For asynchronous calls, use {@link #publish(Item) publish(Item)}.
|
||||||
*
|
*
|
||||||
* @param item - The item being sent
|
* @param item - The item being sent
|
||||||
|
* @param <T> type of the items.
|
||||||
|
*
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
@ -337,6 +352,8 @@ public class LeafNode extends Node
|
||||||
* For asynchronous calls, use {@link #publish(Collection) publish(Collection))}.
|
* For asynchronous calls, use {@link #publish(Collection) publish(Collection))}.
|
||||||
*
|
*
|
||||||
* @param items - The collection of {@link Item} objects being sent
|
* @param items - The collection of {@link Item} objects being sent
|
||||||
|
* @param <T> type of the items.
|
||||||
|
*
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
|
|
@ -384,7 +384,10 @@ abstract public class Node
|
||||||
* {@link Subscription.State#unconfigured} - If the {@link Subscription#isConfigRequired()} is true,
|
* {@link Subscription.State#unconfigured} - If the {@link Subscription#isConfigRequired()} is true,
|
||||||
* the caller must configure the subscription before messages will be received. If it is false
|
* the caller must configure the subscription before messages will be received. If it is false
|
||||||
* the caller can configure it but is not required to do so.
|
* the caller can configure it but is not required to do so.
|
||||||
|
*
|
||||||
* @param jid The jid to subscribe as.
|
* @param jid The jid to subscribe as.
|
||||||
|
* @param subForm
|
||||||
|
*
|
||||||
* @return The subscription
|
* @return The subscription
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
|
@ -435,6 +438,8 @@ abstract public class Node
|
||||||
* Returns a SubscribeForm for subscriptions, from which you can create an answer form to be submitted
|
* Returns a SubscribeForm for subscriptions, from which you can create an answer form to be submitted
|
||||||
* via the {@link #sendConfigurationForm(Form)}.
|
* via the {@link #sendConfigurationForm(Form)}.
|
||||||
*
|
*
|
||||||
|
* @param jid
|
||||||
|
*
|
||||||
* @return A subscription options form
|
* @return A subscription options form
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
|
|
|
@ -225,6 +225,8 @@ public final class PubSubManager extends Manager {
|
||||||
* exception if it does not.
|
* exception if it does not.
|
||||||
*
|
*
|
||||||
* @param id - The unique id of the node
|
* @param id - The unique id of the node
|
||||||
|
* @param <T> type of the node.
|
||||||
|
*
|
||||||
* @return the node
|
* @return the node
|
||||||
* @throws XMPPErrorException The node does not exist
|
* @throws XMPPErrorException The node does not exist
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
|
@ -390,6 +392,8 @@ public final class PubSubManager extends Manager {
|
||||||
*
|
*
|
||||||
* @param id The unique id of the node.
|
* @param id The unique id of the node.
|
||||||
* @param item The item to publish.
|
* @param item The item to publish.
|
||||||
|
* @param <I> type of the item.
|
||||||
|
*
|
||||||
* @return the LeafNode on which the item was published.
|
* @return the LeafNode on which the item was published.
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class ReportedData {
|
||||||
* extension that matches the elementName and namespace "x","jabber:x:data".
|
* extension that matches the elementName and namespace "x","jabber:x:data".
|
||||||
*
|
*
|
||||||
* @param packet the stanza(/packet) used for reporting data.
|
* @param packet the stanza(/packet) used for reporting data.
|
||||||
|
* @return ReportedData from the packet if present, otherwise null.
|
||||||
*/
|
*/
|
||||||
public static ReportedData getReportedDataFrom(Stanza packet) {
|
public static ReportedData getReportedDataFrom(Stanza packet) {
|
||||||
// Check if the packet includes the DataForm extension
|
// Check if the packet includes the DataForm extension
|
||||||
|
|
|
@ -92,6 +92,8 @@ public final class VCardManager extends Manager {
|
||||||
* Save this vCard for the user connected by 'connection'. XMPPConnection should be authenticated
|
* Save this vCard for the user connected by 'connection'. XMPPConnection should be authenticated
|
||||||
* and not anonymous.
|
* and not anonymous.
|
||||||
*
|
*
|
||||||
|
* @param vcard VCard.
|
||||||
|
*
|
||||||
* @throws XMPPErrorException thrown if there was an issue setting the VCard in the server.
|
* @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 NoResponseException if there was no response from the server.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
@ -110,6 +112,7 @@ public final class VCardManager extends Manager {
|
||||||
/**
|
/**
|
||||||
* Load the VCard of the current user.
|
* Load the VCard of the current user.
|
||||||
*
|
*
|
||||||
|
* @return VCard.
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
@ -122,6 +125,9 @@ public final class VCardManager extends Manager {
|
||||||
/**
|
/**
|
||||||
* Load VCard information for a given user.
|
* Load VCard information for a given user.
|
||||||
*
|
*
|
||||||
|
* @param bareJid bareJid of the user.
|
||||||
|
*
|
||||||
|
* @return VCard.
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
|
|
@ -135,10 +135,11 @@ public class VCard extends IQ {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set generic VCard field.
|
* Get the content of a generic VCard field.
|
||||||
*
|
*
|
||||||
* @param field value of field. Possible values: NICKNAME, PHOTO, BDAY, JABBERID, MAILER, TZ,
|
* @param field value of field. Possible values: NICKNAME, PHOTO, BDAY, JABBERID, MAILER, TZ,
|
||||||
* GEO, TITLE, ROLE, LOGO, NOTE, PRODID, REV, SORT-STRING, SOUND, UID, URL, DESC.
|
* GEO, TITLE, ROLE, LOGO, NOTE, PRODID, REV, SORT-STRING, SOUND, UID, URL, DESC.
|
||||||
|
* @return content of field.
|
||||||
*/
|
*/
|
||||||
public String getField(String field) {
|
public String getField(String field) {
|
||||||
return otherSimpleFields.get(field);
|
return otherSimpleFields.get(field);
|
||||||
|
@ -273,6 +274,7 @@ public class VCard extends IQ {
|
||||||
*
|
*
|
||||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||||
* LOCALITY, REGION, PCODE, CTRY
|
* LOCALITY, REGION, PCODE, CTRY
|
||||||
|
* @return content of home address field.
|
||||||
*/
|
*/
|
||||||
public String getAddressFieldHome(String addrField) {
|
public String getAddressFieldHome(String addrField) {
|
||||||
return homeAddr.get(addrField);
|
return homeAddr.get(addrField);
|
||||||
|
@ -283,6 +285,7 @@ public class VCard extends IQ {
|
||||||
*
|
*
|
||||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||||
* LOCALITY, REGION, PCODE, CTRY
|
* LOCALITY, REGION, PCODE, CTRY
|
||||||
|
* @param value new value for the field.
|
||||||
*/
|
*/
|
||||||
public void setAddressFieldHome(String addrField, String value) {
|
public void setAddressFieldHome(String addrField, String value) {
|
||||||
homeAddr.put(addrField, value);
|
homeAddr.put(addrField, value);
|
||||||
|
@ -293,6 +296,7 @@ public class VCard extends IQ {
|
||||||
*
|
*
|
||||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||||
* LOCALITY, REGION, PCODE, CTRY
|
* LOCALITY, REGION, PCODE, CTRY
|
||||||
|
* @return content of work address field.
|
||||||
*/
|
*/
|
||||||
public String getAddressFieldWork(String addrField) {
|
public String getAddressFieldWork(String addrField) {
|
||||||
return workAddr.get(addrField);
|
return workAddr.get(addrField);
|
||||||
|
@ -303,6 +307,7 @@ public class VCard extends IQ {
|
||||||
*
|
*
|
||||||
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
* @param addrField one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
|
||||||
* LOCALITY, REGION, PCODE, CTRY
|
* LOCALITY, REGION, PCODE, CTRY
|
||||||
|
* @param value new value for the field.
|
||||||
*/
|
*/
|
||||||
public void setAddressFieldWork(String addrField, String value) {
|
public void setAddressFieldWork(String addrField, String value) {
|
||||||
workAddr.put(addrField, value);
|
workAddr.put(addrField, value);
|
||||||
|
@ -323,6 +328,7 @@ public class VCard extends IQ {
|
||||||
* Get home phone number.
|
* Get home phone number.
|
||||||
*
|
*
|
||||||
* @param phoneType one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF
|
* @param phoneType one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF
|
||||||
|
* @return content of home phone number.
|
||||||
*/
|
*/
|
||||||
public String getPhoneHome(String phoneType) {
|
public String getPhoneHome(String phoneType) {
|
||||||
return homePhones.get(phoneType);
|
return homePhones.get(phoneType);
|
||||||
|
@ -342,6 +348,7 @@ public class VCard extends IQ {
|
||||||
* Get work phone number.
|
* Get work phone number.
|
||||||
*
|
*
|
||||||
* @param phoneType one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF
|
* @param phoneType one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF
|
||||||
|
* @return content of work phone number.
|
||||||
*/
|
*/
|
||||||
public String getPhoneWork(String phoneType) {
|
public String getPhoneWork(String phoneType) {
|
||||||
return workPhones.get(phoneType);
|
return workPhones.get(phoneType);
|
||||||
|
@ -470,6 +477,8 @@ public class VCard extends IQ {
|
||||||
* Common code for getting the bytes of a url.
|
* Common code for getting the bytes of a url.
|
||||||
*
|
*
|
||||||
* @param url the url to read.
|
* @param url the url to read.
|
||||||
|
* @return bytes of the file pointed to by URL.
|
||||||
|
* @throws IOException if an IOException occurs while reading the file.
|
||||||
*/
|
*/
|
||||||
public static byte[] getBytes(URL url) throws IOException {
|
public static byte[] getBytes(URL url) throws IOException {
|
||||||
final String path = url.getPath();
|
final String path = url.getPath();
|
||||||
|
@ -557,6 +566,8 @@ public class VCard extends IQ {
|
||||||
/**
|
/**
|
||||||
* Load VCard information for a connected user. XMPPConnection should be authenticated
|
* Load VCard information for a connected user. XMPPConnection should be authenticated
|
||||||
* and not anonymous.
|
* and not anonymous.
|
||||||
|
*
|
||||||
|
* @param connection connection.
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException
|
* @throws NoResponseException
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
@ -570,6 +581,10 @@ public class VCard extends IQ {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load VCard information for a given user. XMPPConnection should be authenticated and not anonymous.
|
* Load VCard information for a given user. XMPPConnection should be authenticated and not anonymous.
|
||||||
|
*
|
||||||
|
* @param connection connection.
|
||||||
|
* @param user user whos information we want to load.
|
||||||
|
*
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
* @throws NoResponseException if there was no response from the server.
|
* @throws NoResponseException if there was no response from the server.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
|
|
@ -52,6 +52,8 @@ public class DataLayout implements ExtensionElement {
|
||||||
* <p>
|
* <p>
|
||||||
* Objects of the following type(s) are allowed in the list: {@link String },
|
* Objects of the following type(s) are allowed in the list: {@link String },
|
||||||
* {@link Section }, {@link Fieldref } and {@link Reportedref }
|
* {@link Section }, {@link Fieldref } and {@link Reportedref }
|
||||||
|
*
|
||||||
|
* @return list of DataFormLayoutElements.
|
||||||
*/
|
*/
|
||||||
public List<DataFormLayoutElement> getPageLayout() {
|
public List<DataFormLayoutElement> getPageLayout() {
|
||||||
return this.pageLayout;
|
return this.pageLayout;
|
||||||
|
@ -177,6 +179,8 @@ public class DataLayout implements ExtensionElement {
|
||||||
* <p>
|
* <p>
|
||||||
* Objects of the following type(s) are allowed in the list: {@link String },
|
* Objects of the following type(s) are allowed in the list: {@link String },
|
||||||
* {@link Section }, {@link Fieldref } and {@link Reportedref }
|
* {@link Section }, {@link Fieldref } and {@link Reportedref }
|
||||||
|
*
|
||||||
|
* @return list of DataFormLayoutElements.
|
||||||
*/
|
*/
|
||||||
public List<DataFormLayoutElement> getSectionLayout() {
|
public List<DataFormLayoutElement> getSectionLayout() {
|
||||||
return this.sectionLayout;
|
return this.sectionLayout;
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class XHTMLText {
|
||||||
*
|
*
|
||||||
* @param href indicates the URL being linked to
|
* @param href indicates the URL being linked to
|
||||||
* @param style the XHTML style of the anchor
|
* @param style the XHTML style of the anchor
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenAnchorTag(String href, String style) {
|
public XHTMLText appendOpenAnchorTag(String href, String style) {
|
||||||
text.halfOpenElement(A);
|
text.halfOpenElement(A);
|
||||||
|
@ -63,6 +64,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that an anchor section ends.
|
* Appends a tag that indicates that an anchor section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseAnchorTag() {
|
public XHTMLText appendCloseAnchorTag() {
|
||||||
text.closeElement(A);
|
text.closeElement(A);
|
||||||
|
@ -74,6 +76,7 @@ public class XHTMLText {
|
||||||
* Appends a tag that indicates that a blockquote section begins.
|
* Appends a tag that indicates that a blockquote section begins.
|
||||||
*
|
*
|
||||||
* @param style the XHTML style of the blockquote
|
* @param style the XHTML style of the blockquote
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenBlockQuoteTag(String style) {
|
public XHTMLText appendOpenBlockQuoteTag(String style) {
|
||||||
text.halfOpenElement(BLOCKQUOTE);
|
text.halfOpenElement(BLOCKQUOTE);
|
||||||
|
@ -85,6 +88,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that a blockquote section ends.
|
* Appends a tag that indicates that a blockquote section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseBlockQuoteTag() {
|
public XHTMLText appendCloseBlockQuoteTag() {
|
||||||
text.closeElement(BLOCKQUOTE);
|
text.closeElement(BLOCKQUOTE);
|
||||||
|
@ -96,6 +100,7 @@ public class XHTMLText {
|
||||||
*
|
*
|
||||||
* @param style the XHTML style of the body
|
* @param style the XHTML style of the body
|
||||||
* @param lang the language of the body
|
* @param lang the language of the body
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
private XHTMLText appendOpenBodyTag(String style, String lang) {
|
private XHTMLText appendOpenBodyTag(String style, String lang) {
|
||||||
text.halfOpenElement(Message.BODY);
|
text.halfOpenElement(Message.BODY);
|
||||||
|
@ -106,6 +111,11 @@ public class XHTMLText {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends a tag that indicates that the body section ends.
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
|
*/
|
||||||
public XHTMLText appendCloseBodyTag() {
|
public XHTMLText appendCloseBodyTag() {
|
||||||
text.closeElement(Message.BODY);
|
text.closeElement(Message.BODY);
|
||||||
return this;
|
return this;
|
||||||
|
@ -118,6 +128,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that inserts a single carriage return.
|
* Appends a tag that inserts a single carriage return.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendBrTag() {
|
public XHTMLText appendBrTag() {
|
||||||
text.emptyElement(BR);
|
text.emptyElement(BR);
|
||||||
|
@ -127,6 +138,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates a reference to work, such as a book, report or web site.
|
* Appends a tag that indicates a reference to work, such as a book, report or web site.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenCiteTag() {
|
public XHTMLText appendOpenCiteTag() {
|
||||||
text.openElement(CITE);
|
text.openElement(CITE);
|
||||||
|
@ -136,6 +148,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates text that is the code for a program.
|
* Appends a tag that indicates text that is the code for a program.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenCodeTag() {
|
public XHTMLText appendOpenCodeTag() {
|
||||||
text.openElement(CODE);
|
text.openElement(CODE);
|
||||||
|
@ -145,6 +158,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates end of text that is the code for a program.
|
* Appends a tag that indicates end of text that is the code for a program.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseCodeTag() {
|
public XHTMLText appendCloseCodeTag() {
|
||||||
text.closeElement(CODE);
|
text.closeElement(CODE);
|
||||||
|
@ -156,6 +170,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates emphasis.
|
* Appends a tag that indicates emphasis.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenEmTag() {
|
public XHTMLText appendOpenEmTag() {
|
||||||
text.openElement(EM);
|
text.openElement(EM);
|
||||||
|
@ -165,6 +180,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates end of emphasis.
|
* Appends a tag that indicates end of emphasis.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseEmTag() {
|
public XHTMLText appendCloseEmTag() {
|
||||||
text.closeElement(EM);
|
text.closeElement(EM);
|
||||||
|
@ -178,6 +194,8 @@ public class XHTMLText {
|
||||||
*
|
*
|
||||||
* @param level the level of the Header. It must be a value between 1 and 3
|
* @param level the level of the Header. It must be a value between 1 and 3
|
||||||
* @param style the XHTML style of the blockquote
|
* @param style the XHTML style of the blockquote
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenHeaderTag(int level, String style) {
|
public XHTMLText appendOpenHeaderTag(int level, String style) {
|
||||||
if (level > 3 || level < 1) {
|
if (level > 3 || level < 1) {
|
||||||
|
@ -193,6 +211,7 @@ public class XHTMLText {
|
||||||
* Appends a tag that indicates that a header section ends.
|
* Appends a tag that indicates that a header section ends.
|
||||||
*
|
*
|
||||||
* @param level the level of the Header. It must be a value between 1 and 3
|
* @param level the level of the Header. It must be a value between 1 and 3
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseHeaderTag(int level) {
|
public XHTMLText appendCloseHeaderTag(int level) {
|
||||||
if (level > 3 || level < 1) {
|
if (level > 3 || level < 1) {
|
||||||
|
@ -212,6 +231,8 @@ public class XHTMLText {
|
||||||
* @param height how tall is the picture
|
* @param height how tall is the picture
|
||||||
* @param src where to get the picture
|
* @param src where to get the picture
|
||||||
* @param width how wide is the picture
|
* @param width how wide is the picture
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendImageTag(String align, String alt, String height, String src, String width) {
|
public XHTMLText appendImageTag(String align, String alt, String height, String src, String width) {
|
||||||
text.halfOpenElement(IMG);
|
text.halfOpenElement(IMG);
|
||||||
|
@ -231,6 +252,8 @@ public class XHTMLText {
|
||||||
* Appends a tag that indicates the start of a new line item within a list.
|
* Appends a tag that indicates the start of a new line item within a list.
|
||||||
*
|
*
|
||||||
* @param style the style of the line item
|
* @param style the style of the line item
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendLineItemTag(String style) {
|
public XHTMLText appendLineItemTag(String style) {
|
||||||
text.halfOpenElement(LI);
|
text.halfOpenElement(LI);
|
||||||
|
@ -242,6 +265,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that a line item section ends.
|
* Appends a tag that indicates that a line item section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseLineItemTag() {
|
public XHTMLText appendCloseLineItemTag() {
|
||||||
text.closeElement(LI);
|
text.closeElement(LI);
|
||||||
|
@ -253,6 +277,8 @@ public class XHTMLText {
|
||||||
* in the list is important. To show this, browsers automatically number the list.
|
* in the list is important. To show this, browsers automatically number the list.
|
||||||
*
|
*
|
||||||
* @param style the style of the ordered list
|
* @param style the style of the ordered list
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenOrderedListTag(String style) {
|
public XHTMLText appendOpenOrderedListTag(String style) {
|
||||||
text.halfOpenElement(OL);
|
text.halfOpenElement(OL);
|
||||||
|
@ -264,6 +290,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that an ordered list section ends.
|
* Appends a tag that indicates that an ordered list section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseOrderedListTag() {
|
public XHTMLText appendCloseOrderedListTag() {
|
||||||
text.closeElement(OL);
|
text.closeElement(OL);
|
||||||
|
@ -277,6 +304,8 @@ public class XHTMLText {
|
||||||
* in the list are not in any particular order.
|
* in the list are not in any particular order.
|
||||||
*
|
*
|
||||||
* @param style the style of the unordered list
|
* @param style the style of the unordered list
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenUnorderedListTag(String style) {
|
public XHTMLText appendOpenUnorderedListTag(String style) {
|
||||||
text.halfOpenElement(UL);
|
text.halfOpenElement(UL);
|
||||||
|
@ -288,6 +317,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that an unordered list section ends.
|
* Appends a tag that indicates that an unordered list section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseUnorderedListTag() {
|
public XHTMLText appendCloseUnorderedListTag() {
|
||||||
text.closeElement(UL);
|
text.closeElement(UL);
|
||||||
|
@ -301,6 +331,8 @@ public class XHTMLText {
|
||||||
* with two carriage returns, producing a single blank line in between the two paragraphs.
|
* with two carriage returns, producing a single blank line in between the two paragraphs.
|
||||||
*
|
*
|
||||||
* @param style the style of the paragraph
|
* @param style the style of the paragraph
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenParagraphTag(String style) {
|
public XHTMLText appendOpenParagraphTag(String style) {
|
||||||
text.halfOpenElement(P);
|
text.halfOpenElement(P);
|
||||||
|
@ -313,6 +345,7 @@ public class XHTMLText {
|
||||||
* Appends a tag that indicates the end of a new paragraph. This is usually rendered
|
* Appends a tag that indicates the end of a new paragraph. This is usually rendered
|
||||||
* with two carriage returns, producing a single blank line in between the two paragraphs.
|
* with two carriage returns, producing a single blank line in between the two paragraphs.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseParagraphTag() {
|
public XHTMLText appendCloseParagraphTag() {
|
||||||
text.closeElement(P);
|
text.closeElement(P);
|
||||||
|
@ -325,6 +358,8 @@ public class XHTMLText {
|
||||||
* Appends a tag that indicates that an inlined quote section begins.
|
* Appends a tag that indicates that an inlined quote section begins.
|
||||||
*
|
*
|
||||||
* @param style the style of the inlined quote
|
* @param style the style of the inlined quote
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenInlinedQuoteTag(String style) {
|
public XHTMLText appendOpenInlinedQuoteTag(String style) {
|
||||||
text.halfOpenElement(Q);
|
text.halfOpenElement(Q);
|
||||||
|
@ -336,6 +371,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that an inlined quote section ends.
|
* Appends a tag that indicates that an inlined quote section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseInlinedQuoteTag() {
|
public XHTMLText appendCloseInlinedQuoteTag() {
|
||||||
text.closeElement(Q);
|
text.closeElement(Q);
|
||||||
|
@ -348,6 +384,8 @@ public class XHTMLText {
|
||||||
* Appends a tag that allows to set the fonts for a span of text.
|
* Appends a tag that allows to set the fonts for a span of text.
|
||||||
*
|
*
|
||||||
* @param style the style for a span of text
|
* @param style the style for a span of text
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenSpanTag(String style) {
|
public XHTMLText appendOpenSpanTag(String style) {
|
||||||
text.halfOpenElement(SPAN);
|
text.halfOpenElement(SPAN);
|
||||||
|
@ -359,6 +397,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that a span section ends.
|
* Appends a tag that indicates that a span section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseSpanTag() {
|
public XHTMLText appendCloseSpanTag() {
|
||||||
text.closeElement(SPAN);
|
text.closeElement(SPAN);
|
||||||
|
@ -370,6 +409,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates text which should be more forceful than surrounding text.
|
* Appends a tag that indicates text which should be more forceful than surrounding text.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendOpenStrongTag() {
|
public XHTMLText appendOpenStrongTag() {
|
||||||
text.openElement(STRONG);
|
text.openElement(STRONG);
|
||||||
|
@ -379,6 +419,7 @@ public class XHTMLText {
|
||||||
/**
|
/**
|
||||||
* Appends a tag that indicates that a strong section ends.
|
* Appends a tag that indicates that a strong section ends.
|
||||||
*
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText appendCloseStrongTag() {
|
public XHTMLText appendCloseStrongTag() {
|
||||||
text.closeElement(STRONG);
|
text.closeElement(STRONG);
|
||||||
|
@ -389,6 +430,8 @@ public class XHTMLText {
|
||||||
* Appends a given text to the XHTMLText.
|
* Appends a given text to the XHTMLText.
|
||||||
*
|
*
|
||||||
* @param textToAppend the text to append
|
* @param textToAppend the text to append
|
||||||
|
*
|
||||||
|
* @return this.
|
||||||
*/
|
*/
|
||||||
public XHTMLText append(String textToAppend) {
|
public XHTMLText append(String textToAppend) {
|
||||||
text.escape(textToAppend);
|
text.escape(textToAppend);
|
||||||
|
|
|
@ -885,6 +885,7 @@ public class AgentSession {
|
||||||
*
|
*
|
||||||
* @param jid the jid of the agent.
|
* @param jid the jid of the agent.
|
||||||
* @param maxSessions the max number of sessions to retrieve.
|
* @param maxSessions the max number of sessions to retrieve.
|
||||||
|
* @param startDate point in time from which on history should get retrieved.
|
||||||
* @return the chat history associated with a given jid.
|
* @return the chat history associated with a given jid.
|
||||||
* @throws XMPPException if an error occurs while retrieving the AgentChatHistory.
|
* @throws XMPPException if an error occurs while retrieving the AgentChatHistory.
|
||||||
* @throws NotConnectedException
|
* @throws NotConnectedException
|
||||||
|
|
Loading…
Reference in a new issue