mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
Fix all javadoc warnings
This commit is contained in:
parent
0058631ed6
commit
b8a5437b28
42 changed files with 137 additions and 205 deletions
|
@ -493,16 +493,6 @@ public class SASLAuthentication {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Notification message saying that SASL authentication has failed. The server may have
|
|
||||||
* closed the connection depending on the number of possible retries.
|
|
||||||
*
|
|
||||||
* @deprecated replaced by {@see #authenticationFailed(String)}.
|
|
||||||
*/
|
|
||||||
void authenticationFailed() {
|
|
||||||
authenticationFailed(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notification message saying that SASL authentication has failed. The server may have
|
* Notification message saying that SASL authentication has failed. The server may have
|
||||||
* closed the connection depending on the number of possible retries.
|
* closed the connection depending on the number of possible retries.
|
||||||
|
|
|
@ -176,7 +176,7 @@ public final class SmackConfiguration {
|
||||||
* Sets the default max size of a packet collector before it will delete
|
* Sets the default max size of a packet collector before it will delete
|
||||||
* the older packets.
|
* the older packets.
|
||||||
*
|
*
|
||||||
* @param The number of packets to queue before deleting older packets.
|
* @param collectorSize the number of packets to queue before deleting older packets.
|
||||||
*/
|
*/
|
||||||
public static void setPacketCollectorSize(int collectorSize) {
|
public static void setPacketCollectorSize(int collectorSize) {
|
||||||
packetCollectorSize = collectorSize;
|
packetCollectorSize = collectorSize;
|
||||||
|
|
|
@ -844,7 +844,7 @@ public abstract class XMPPConnection {
|
||||||
* XMPPConnection holds this information in order to avoid a dependency to
|
* XMPPConnection holds this information in order to avoid a dependency to
|
||||||
* smackx where EntityCapsManager lives from smack.
|
* smackx where EntityCapsManager lives from smack.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the servers entity caps node
|
||||||
*/
|
*/
|
||||||
public String getServiceCapsNode() {
|
public String getServiceCapsNode() {
|
||||||
return serviceCapsNode;
|
return serviceCapsNode;
|
||||||
|
|
|
@ -124,7 +124,7 @@ public abstract class IQ extends Packet {
|
||||||
* <li>No child element of the IQ element.
|
* <li>No child element of the IQ element.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param iq the {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET} IQ packet.
|
* @param request the {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET} IQ packet.
|
||||||
* @throws IllegalArgumentException if the IQ packet does not have a type of
|
* @throws IllegalArgumentException if the IQ packet does not have a type of
|
||||||
* {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET}.
|
* {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET}.
|
||||||
* @return a new {@link Type#RESULT IQ.Type.RESULT} IQ based on the originating IQ.
|
* @return a new {@link Type#RESULT IQ.Type.RESULT} IQ based on the originating IQ.
|
||||||
|
@ -158,7 +158,7 @@ public abstract class IQ extends Packet {
|
||||||
* <li>The provided {@link XMPPError XMPPError}.
|
* <li>The provided {@link XMPPError XMPPError}.
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param iq the {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET} IQ packet.
|
* @param request the {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET} IQ packet.
|
||||||
* @param error the error to associate with the created IQ packet.
|
* @param error the error to associate with the created IQ packet.
|
||||||
* @throws IllegalArgumentException if the IQ packet does not have a type of
|
* @throws IllegalArgumentException if the IQ packet does not have a type of
|
||||||
* {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET}.
|
* {@link Type#GET IQ.Type.GET} or {@link Type#SET IQ.Type.SET}.
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jivesoftware.smack.parsing;
|
package org.jivesoftware.smack.parsing;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +24,7 @@ package org.jivesoftware.smack.parsing;
|
||||||
*
|
*
|
||||||
* Subclasses may or may not override certain methods of this class. Each of these methods will receive the exception
|
* Subclasses may or may not override certain methods of this class. Each of these methods will receive the exception
|
||||||
* that caused the parsing error and an instance of an Unparsed Packet type. The latter can be used to inspect the
|
* that caused the parsing error and an instance of an Unparsed Packet type. The latter can be used to inspect the
|
||||||
* stanza that caused the parsing error by using the getContent() (for example {@link UnparsedIQ#getContent()})
|
* stanza that caused the parsing error by using the getContent() (for example {@link UnparsablePacket#getContent()})
|
||||||
* method.
|
* method.
|
||||||
*
|
*
|
||||||
* Smack provides 2 predefined ParsingExceptionCallback's: {@link ExceptionLoggingCallback} and {@link ExceptionThrowingCallback}.
|
* Smack provides 2 predefined ParsingExceptionCallback's: {@link ExceptionLoggingCallback} and {@link ExceptionThrowingCallback}.
|
||||||
|
|
|
@ -56,8 +56,8 @@ import org.xmlpull.v1.XmlPullParser;
|
||||||
* </message>
|
* </message>
|
||||||
*
|
*
|
||||||
* I would have a classes
|
* I would have a classes
|
||||||
* {@link ItemsProvider} extends {@link EmbeddedExtensionProvider}
|
* <tt>ItemsProvider</tt> extends {@link EmbeddedExtensionProvider}
|
||||||
* {@link ItemProvider} extends {@link EmbeddedExtensionProvider}
|
* <tt>ItemProvider</tt> extends {@link EmbeddedExtensionProvider}
|
||||||
* and
|
* and
|
||||||
* AtomProvider extends {@link PacketExtensionProvider}
|
* AtomProvider extends {@link PacketExtensionProvider}
|
||||||
*
|
*
|
||||||
|
|
|
@ -41,9 +41,9 @@ import javax.security.sasl.SaslException;
|
||||||
* <li>{@link #getName()} -- returns the common name of the SASL mechanism.</li>
|
* <li>{@link #getName()} -- returns the common name of the SASL mechanism.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* Subclasses will likely want to implement their own versions of these methods:
|
* Subclasses will likely want to implement their own versions of these methods:
|
||||||
* <li>{@link #authenticate(String, String, String)} -- Initiate authentication stanza using the
|
* <li>{@link #authenticate(String, String, String, String)} -- Initiate authentication stanza using the
|
||||||
* deprecated method.</li>
|
* deprecated method.</li>
|
||||||
* <li>{@link #authenticate(String, String, CallbackHandler)} -- Initiate authentication stanza
|
* <li>{@link #authenticate(String, CallbackHandler)} -- Initiate authentication stanza
|
||||||
* using the CallbackHandler method.</li>
|
* using the CallbackHandler method.</li>
|
||||||
* <li>{@link #challengeReceived(String)} -- Handle a challenge from the server.</li>
|
* <li>{@link #challengeReceived(String)} -- Handle a challenge from the server.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
@ -87,7 +87,7 @@ public abstract class SASLMechanism implements CallbackHandler {
|
||||||
/**
|
/**
|
||||||
* Builds and sends the <tt>auth</tt> stanza to the server. Note that this method of
|
* Builds and sends the <tt>auth</tt> stanza to the server. Note that this method of
|
||||||
* authentication is not recommended, since it is very inflexable. Use
|
* authentication is not recommended, since it is very inflexable. Use
|
||||||
* {@link #authenticate(String, String, CallbackHandler)} whenever possible.
|
* {@link #authenticate(String, CallbackHandler)} whenever possible.
|
||||||
*
|
*
|
||||||
* Explanation of auth stanza:
|
* Explanation of auth stanza:
|
||||||
*
|
*
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class DNSUtil {
|
||||||
/**
|
/**
|
||||||
* Returns the current DNS resolved used to perform DNS lookups.
|
* Returns the current DNS resolved used to perform DNS lookups.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the active DNSResolver
|
||||||
*/
|
*/
|
||||||
public static DNSResolver getDNSResolver() {
|
public static DNSResolver getDNSResolver() {
|
||||||
return dnsResolver;
|
return dnsResolver;
|
||||||
|
@ -155,7 +155,7 @@ public class DNSUtil {
|
||||||
* is calculated by random. The others are ore simply ordered by their priority.
|
* is calculated by random. The others are ore simply ordered by their priority.
|
||||||
*
|
*
|
||||||
* @param records
|
* @param records
|
||||||
* @return
|
* @return the list of resolved HostAddresses
|
||||||
*/
|
*/
|
||||||
protected static List<HostAddress> sortSRVRecords(List<SRVRecord> records) {
|
protected static List<HostAddress> sortSRVRecords(List<SRVRecord> records) {
|
||||||
// RFC 2782, Usage rules: "If there is precisely one SRV RR, and its Target is "."
|
// RFC 2782, Usage rules: "If there is precisely one SRV RR, and its Target is "."
|
||||||
|
|
|
@ -24,7 +24,7 @@ public interface StringEncoder {
|
||||||
* Encodes an string to another representation
|
* Encodes an string to another representation
|
||||||
*
|
*
|
||||||
* @param string
|
* @param string
|
||||||
* @return
|
* @return the encoded String
|
||||||
*/
|
*/
|
||||||
String encode(String string);
|
String encode(String string);
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public interface StringEncoder {
|
||||||
* Decodes an string back to it's initial representation
|
* Decodes an string back to it's initial representation
|
||||||
*
|
*
|
||||||
* @param string
|
* @param string
|
||||||
* @return
|
* @return the decoded String
|
||||||
*/
|
*/
|
||||||
String decode(String string);
|
String decode(String string);
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,7 @@ public class XmppDateTime {
|
||||||
* does not.
|
* does not.
|
||||||
*
|
*
|
||||||
* @param dateString
|
* @param dateString
|
||||||
* @return
|
* @return the String with converted timezone
|
||||||
*/
|
*/
|
||||||
public static String convertXep82TimezoneToRfc822(String dateString) {
|
public static String convertXep82TimezoneToRfc822(String dateString) {
|
||||||
if (dateString.charAt(dateString.length() - 1) == 'Z') {
|
if (dateString.charAt(dateString.length() - 1) == 'Z') {
|
||||||
|
@ -235,7 +235,7 @@ public class XmppDateTime {
|
||||||
* Converts a time zone to the String format as specified in XEP-0082
|
* Converts a time zone to the String format as specified in XEP-0082
|
||||||
*
|
*
|
||||||
* @param timeZone
|
* @param timeZone
|
||||||
* @return
|
* @return the String representation of the TimeZone
|
||||||
*/
|
*/
|
||||||
public static String asString(TimeZone timeZone) {
|
public static String asString(TimeZone timeZone) {
|
||||||
int rawOffset = timeZone.getRawOffset();
|
int rawOffset = timeZone.getRawOffset();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2013 Florian Schmaus
|
* Copyright 2013-2014 Florian Schmaus
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -17,8 +17,8 @@
|
||||||
package org.jivesoftware.smack.util.dns;
|
package org.jivesoftware.smack.util.dns;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see <a href="http://tools.ietf.org/html/rfc2782>RFC 2782: A DNS RR for specifying the location of services (DNS
|
* @see <a href="http://tools.ietf.org/html/rfc2782">RFC 2782: A DNS RR for specifying the location of services (DNS
|
||||||
* SRV)<a>
|
* SRV)</a>
|
||||||
* @author Florian Schmaus
|
* @author Florian Schmaus
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -139,7 +139,6 @@ public class CarbonManager extends Manager {
|
||||||
*
|
*
|
||||||
* @param new_state whether carbons should be enabled or disabled
|
* @param new_state whether carbons should be enabled or disabled
|
||||||
*
|
*
|
||||||
* @return true if the operation was successful
|
|
||||||
* @throws XMPPException
|
* @throws XMPPException
|
||||||
*/
|
*/
|
||||||
public void setCarbonsEnabled(final boolean new_state) throws XMPPException {
|
public void setCarbonsEnabled(final boolean new_state) throws XMPPException {
|
||||||
|
@ -154,7 +153,6 @@ public class CarbonManager extends Manager {
|
||||||
/**
|
/**
|
||||||
* Helper method to enable carbons.
|
* Helper method to enable carbons.
|
||||||
*
|
*
|
||||||
* @return true if the operation was successful
|
|
||||||
* @throws XMPPException
|
* @throws XMPPException
|
||||||
*/
|
*/
|
||||||
public void enableCarbons() throws XMPPException {
|
public void enableCarbons() throws XMPPException {
|
||||||
|
@ -164,7 +162,6 @@ public class CarbonManager extends Manager {
|
||||||
/**
|
/**
|
||||||
* Helper method to disable carbons.
|
* Helper method to disable carbons.
|
||||||
*
|
*
|
||||||
* @return true if the operation was successful
|
|
||||||
* @throws XMPPException
|
* @throws XMPPException
|
||||||
*/
|
*/
|
||||||
public void disableCarbons() throws XMPPException {
|
public void disableCarbons() throws XMPPException {
|
||||||
|
|
|
@ -35,20 +35,15 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.jivesoftware.smack.SmackConfiguration;
|
|
||||||
import org.jivesoftware.smack.XMPPException;
|
import org.jivesoftware.smack.XMPPException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Socks5Proxy class represents a local SOCKS5 proxy server. It can be enabled/disabled by
|
* The Socks5Proxy class represents a local SOCKS5 proxy server. It can be enabled/disabled by
|
||||||
* setting the <code>localSocks5ProxyEnabled</code> flag in the <code>smack-config.xml</code> or by
|
* invoking {@link #setLocalSocks5ProxyEnabled(boolean)}. The proxy is enabled by default.
|
||||||
* invoking {@link SmackConfiguration#setLocalSocks5ProxyEnabled(boolean)}. The proxy is enabled by
|
|
||||||
* default.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The port of the local SOCKS5 proxy can be configured by setting <code>localSocks5ProxyPort</code>
|
* The port of the local SOCKS5 proxy can be configured by invoking
|
||||||
* in the <code>smack-config.xml</code> or by invoking
|
* {@link #setLocalSocks5ProxyPort(int)}. Default port is 7777. If you set the port to a negative
|
||||||
* {@link SmackConfiguration#setLocalSocks5ProxyPort(int)}. Default port is 7777. If you set the
|
* value Smack tries to the absolute value and all following until it finds an open port.
|
||||||
* port to a negative value Smack tries to the absolute value and all following until it finds an
|
|
||||||
* open port.
|
|
||||||
* <p>
|
* <p>
|
||||||
* If your application is running on a machine with multiple network interfaces or if you want to
|
* If your application is running on a machine with multiple network interfaces or if you want to
|
||||||
* provide your public address in case you are behind a NAT router, invoke
|
* provide your public address in case you are behind a NAT router, invoke
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class EntityCapsManager extends Manager {
|
||||||
* Get the Node version (node#ver) of a JID. Returns a String or null if
|
* Get the Node version (node#ver) of a JID. Returns a String or null if
|
||||||
* EntiyCapsManager does not have any information.
|
* EntiyCapsManager does not have any information.
|
||||||
*
|
*
|
||||||
* @param user
|
* @param jid
|
||||||
* the user (Full JID)
|
* the user (Full JID)
|
||||||
* @return the node version (node#ver) or null
|
* @return the node version (node#ver) or null
|
||||||
*/
|
*/
|
||||||
|
@ -371,7 +371,7 @@ public class EntityCapsManager extends Manager {
|
||||||
* "http://www.igniterealtime.org/projects/smack/#66/0NaeaBKkwk85efJTGmU47vXI=
|
* "http://www.igniterealtime.org/projects/smack/#66/0NaeaBKkwk85efJTGmU47vXI=
|
||||||
* )
|
* )
|
||||||
*
|
*
|
||||||
* @return
|
* @return the local NodeVer
|
||||||
*/
|
*/
|
||||||
public String getLocalNodeVer() {
|
public String getLocalNodeVer() {
|
||||||
return ENTITY_NODE + '#' + getCapsVersion();
|
return ENTITY_NODE + '#' + getCapsVersion();
|
||||||
|
@ -381,7 +381,7 @@ public class EntityCapsManager extends Manager {
|
||||||
* Returns true if Entity Caps are supported by a given JID
|
* Returns true if Entity Caps are supported by a given JID
|
||||||
*
|
*
|
||||||
* @param jid
|
* @param jid
|
||||||
* @return
|
* @return true if the entity supports Entity Capabilities.
|
||||||
*/
|
*/
|
||||||
public boolean areEntityCapsSupported(String jid) throws XMPPException {
|
public boolean areEntityCapsSupported(String jid) throws XMPPException {
|
||||||
return sdm.supportsFeature(jid, NAMESPACE);
|
return sdm.supportsFeature(jid, NAMESPACE);
|
||||||
|
@ -390,7 +390,7 @@ public class EntityCapsManager extends Manager {
|
||||||
/**
|
/**
|
||||||
* Returns true if Entity Caps are supported by the local service/server
|
* Returns true if Entity Caps are supported by the local service/server
|
||||||
*
|
*
|
||||||
* @return
|
* @return true if the user's server supports Entity Capabilities.
|
||||||
*/
|
*/
|
||||||
public boolean areEntityCapsSupportedByServer() throws XMPPException {
|
public boolean areEntityCapsSupportedByServer() throws XMPPException {
|
||||||
return areEntityCapsSupported(connection().getServiceName());
|
return areEntityCapsSupported(connection().getServiceName());
|
||||||
|
@ -402,15 +402,6 @@ public class EntityCapsManager extends Manager {
|
||||||
* If we are connected and there was already a presence send, another
|
* If we are connected and there was already a presence send, another
|
||||||
* presence is send to inform others about your new Entity Caps node string.
|
* presence is send to inform others about your new Entity Caps node string.
|
||||||
*
|
*
|
||||||
* @param discoverInfo
|
|
||||||
* the local users discover info (mostly the service discovery
|
|
||||||
* features)
|
|
||||||
* @param identityType
|
|
||||||
* the local users identity type
|
|
||||||
* @param identityName
|
|
||||||
* the local users identity name
|
|
||||||
* @param extendedInfo
|
|
||||||
* the local users extended info
|
|
||||||
*/
|
*/
|
||||||
public void updateLocalEntityCaps() {
|
public void updateLocalEntityCaps() {
|
||||||
XMPPConnection connection = connection();
|
XMPPConnection connection = connection();
|
||||||
|
@ -478,8 +469,8 @@ public class EntityCapsManager extends Manager {
|
||||||
* @see <a href="http://xmpp.org/extensions/xep-0115.html#ver-proc">XEP-0115
|
* @see <a href="http://xmpp.org/extensions/xep-0115.html#ver-proc">XEP-0115
|
||||||
* 5.4 Processing Method</a>
|
* 5.4 Processing Method</a>
|
||||||
*
|
*
|
||||||
* @param capsNode
|
* @param ver
|
||||||
* the caps node (i.e. node#ver)
|
* @param hash
|
||||||
* @param info
|
* @param info
|
||||||
* @return true if it's valid and should be cache, false if not
|
* @return true if it's valid and should be cache, false if not
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class SimpleDirectoryPersistentCache implements EntityCapsPersistentCache
|
||||||
* Tries to restore an DiscoverInfo packet from a file.
|
* Tries to restore an DiscoverInfo packet from a file.
|
||||||
*
|
*
|
||||||
* @param file
|
* @param file
|
||||||
* @return
|
* @return the restored DiscoverInfo
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private static DiscoverInfo restoreInfoFromFile(File file) throws IOException {
|
private static DiscoverInfo restoreInfoFromFile(File file) throws IOException {
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jivesoftware.smackx.commands;
|
package org.jivesoftware.smackx.commands;
|
||||||
|
|
||||||
import org.jivesoftware.smack.SmackConfiguration;
|
import org.jivesoftware.smack.SmackConfiguration;
|
||||||
|
@ -156,26 +155,4 @@ public class RemoteCommand extends AdHocCommand {
|
||||||
public String getOwnerJID() {
|
public String getOwnerJID() {
|
||||||
return jid;
|
return jid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of milliseconds to wait for a respone. The
|
|
||||||
* {@link SmackConfiguration#getPacketReplyTimeout default} value
|
|
||||||
* should be adjusted for commands that can take a long time to execute.
|
|
||||||
*
|
|
||||||
* @return the number of milliseconds to wait for responses.
|
|
||||||
*/
|
|
||||||
public long getPacketReplyTimeout() {
|
|
||||||
return packetReplyTimeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of milliseconds to wait for a respone. The
|
|
||||||
* {@link SmackConfiguration#getPacketReplyTimeout default} value
|
|
||||||
* should be adjusted for commands that can take a long time to execute.
|
|
||||||
*
|
|
||||||
* @param packetReplyTimeout the number of milliseconds to wait for responses.
|
|
||||||
*/
|
|
||||||
public void setPacketReplyTimeout(long packetReplyTimeout) {
|
|
||||||
this.packetReplyTimeout = packetReplyTimeout;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,7 +271,7 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
/**
|
/**
|
||||||
* Returns all identities of this client as unmodifiable Collection
|
* Returns all identities of this client as unmodifiable Collection
|
||||||
*
|
*
|
||||||
* @return
|
* @return all identies as set
|
||||||
*/
|
*/
|
||||||
public Set<DiscoverInfo.Identity> getIdentities() {
|
public Set<DiscoverInfo.Identity> getIdentities() {
|
||||||
Set<Identity> res = new HashSet<Identity>(identities);
|
Set<Identity> res = new HashSet<Identity>(identities);
|
||||||
|
@ -454,7 +454,7 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
* Returns the data form that is set as extended information for this Service Discovery instance (XEP-0128)
|
* Returns the data form that is set as extended information for this Service Discovery instance (XEP-0128)
|
||||||
*
|
*
|
||||||
* @see <a href="http://xmpp.org/extensions/xep-0128.html">XEP-128: Service Discovery Extensions</a>
|
* @see <a href="http://xmpp.org/extensions/xep-0128.html">XEP-128: Service Discovery Extensions</a>
|
||||||
* @return
|
* @return the data form
|
||||||
*/
|
*/
|
||||||
public DataForm getExtendedInfo() {
|
public DataForm getExtendedInfo() {
|
||||||
return extendedInfo;
|
return extendedInfo;
|
||||||
|
@ -464,7 +464,7 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
* Returns the data form as List of PacketExtensions, or null if no data form is set.
|
* Returns the data form as List of PacketExtensions, or null if no data form is set.
|
||||||
* This representation is needed by some classes (e.g. EntityCapsManager, NodeInformationProvider)
|
* This representation is needed by some classes (e.g. EntityCapsManager, NodeInformationProvider)
|
||||||
*
|
*
|
||||||
* @return
|
* @return the data form as List of PacketExtensions
|
||||||
*/
|
*/
|
||||||
public List<PacketExtension> getExtendedInfoAsList() {
|
public List<PacketExtension> getExtendedInfoAsList() {
|
||||||
List<PacketExtension> res = null;
|
List<PacketExtension> res = null;
|
||||||
|
@ -603,7 +603,7 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
* be returned by the server whenever the server receives a disco request targeted to the bare
|
* be returned by the server whenever the server receives a disco request targeted to the bare
|
||||||
* address of the client (i.e. user@host.com).
|
* address of the client (i.e. user@host.com).
|
||||||
*
|
*
|
||||||
* @param DiscoverInfo the discover info packet to check.
|
* @param info the discover info packet to check.
|
||||||
* @return true if the server supports publishing of items.
|
* @return true if the server supports publishing of items.
|
||||||
*/
|
*/
|
||||||
public static boolean canPublishItems(DiscoverInfo info) {
|
public static boolean canPublishItems(DiscoverInfo info) {
|
||||||
|
@ -646,11 +646,11 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queries the remote jid for it's features and returns true if the given feature is found.
|
* Queries the remote entity for it's features and returns true if the given feature is found.
|
||||||
*
|
*
|
||||||
* @param jid
|
* @param jid the JID of the remote entity
|
||||||
* @param feature
|
* @param feature
|
||||||
* @return
|
* @return true if the entity supports the feature, false otherwise
|
||||||
* @throws XMPPException
|
* @throws XMPPException
|
||||||
*/
|
*/
|
||||||
public boolean supportsFeature(String jid, String feature) throws XMPPException {
|
public boolean supportsFeature(String jid, String feature) throws XMPPException {
|
||||||
|
@ -663,8 +663,8 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the ServiceDiscoveryManager with an EntityCapsManger
|
* Loads the ServiceDiscoveryManager with an EntityCapsManger that speeds up certain lookups.
|
||||||
* that speeds up certain lookups
|
*
|
||||||
* @param manager
|
* @param manager
|
||||||
*/
|
*/
|
||||||
public void setEntityCapsManager(EntityCapsManager manager) {
|
public void setEntityCapsManager(EntityCapsManager manager) {
|
||||||
|
@ -672,8 +672,7 @@ public class ServiceDiscoveryManager extends Manager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the Entity Capabilities Verification String
|
* Updates the Entity Capabilities Verification String if EntityCaps is enabled.
|
||||||
* if EntityCaps is enabled
|
|
||||||
*/
|
*/
|
||||||
private void renewEntityCapsVersion() {
|
private void renewEntityCapsVersion() {
|
||||||
if (capsManager != null && capsManager.entityCapsEnabled())
|
if (capsManager != null && capsManager.entityCapsEnabled())
|
||||||
|
|
|
@ -424,12 +424,13 @@ public class DiscoverInfo extends IQ {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this identity with another one. The comparison order is:
|
* Compares this identity with another one. The comparison order is: Category, Type, Lang.
|
||||||
* Category, Type, Lang. If all three are identical the other Identity is considered equal.
|
* If all three are identical the other Identity is considered equal. Name is not used for
|
||||||
* Name is not used for comparision, as defined by XEP-0115
|
* comparison, as defined by XEP-0115
|
||||||
*
|
*
|
||||||
* @param obj
|
* @param other
|
||||||
* @return
|
* @return a negative integer, zero, or a positive integer as this object is less than,
|
||||||
|
* equal to, or greater than the specified object.
|
||||||
*/
|
*/
|
||||||
public int compareTo(DiscoverInfo.Identity other) {
|
public int compareTo(DiscoverInfo.Identity other) {
|
||||||
String otherLang = other.lang == null ? "" : other.lang;
|
String otherLang = other.lang == null ? "" : other.lang;
|
||||||
|
|
|
@ -46,7 +46,6 @@ public class Forwarded implements PacketExtension {
|
||||||
/**
|
/**
|
||||||
* Creates a new Forwarded packet extension.
|
* Creates a new Forwarded packet extension.
|
||||||
*
|
*
|
||||||
* @param delay an optional {@link DelayInfo} timestamp of the packet.
|
|
||||||
* @param fwdPacket the packet that is forwarded (required).
|
* @param fwdPacket the packet that is forwarded (required).
|
||||||
*/
|
*/
|
||||||
public Forwarded(Packet fwdPacket) {
|
public Forwarded(Packet fwdPacket) {
|
||||||
|
|
|
@ -218,7 +218,7 @@ public class PingManager extends Manager {
|
||||||
* {@link #isPingSupported(String)} is false.
|
* {@link #isPingSupported(String)} is false.
|
||||||
*
|
*
|
||||||
* @param notifyListeners Notify the PingFailedListener in case of error if true
|
* @param notifyListeners Notify the PingFailedListener in case of error if true
|
||||||
* @return
|
* @return true if the user's server could be pinged.
|
||||||
*/
|
*/
|
||||||
public boolean pingMyServer(boolean notifyListeners) {
|
public boolean pingMyServer(boolean notifyListeners) {
|
||||||
boolean res = ping(connection().getServiceName());
|
boolean res = ping(connection().getServiceName());
|
||||||
|
@ -273,7 +273,7 @@ public class PingManager extends Manager {
|
||||||
* users server. If there was no successful Ping (e.g. because this
|
* users server. If there was no successful Ping (e.g. because this
|
||||||
* feature is disabled) -1 will be returned.
|
* feature is disabled) -1 will be returned.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the timestamp of the last successful ping.
|
||||||
*/
|
*/
|
||||||
public long getLastSuccessfulPing() {
|
public long getLastSuccessfulPing() {
|
||||||
return Math.max(lastSuccessfulAutomaticPing, lastSuccessfulManualPing);
|
return Math.max(lastSuccessfulAutomaticPing, lastSuccessfulManualPing);
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class PrivacyList {
|
||||||
private final boolean isDefaultList;
|
private final boolean isDefaultList;
|
||||||
/** Holds the list name used to print **/
|
/** Holds the list name used to print **/
|
||||||
private final String listName;
|
private final String listName;
|
||||||
/** Holds the list of {@see PrivacyItem} **/
|
/** Holds the list of {@link PrivacyItem} */
|
||||||
private final List<PrivacyItem> items;
|
private final List<PrivacyItem> items;
|
||||||
|
|
||||||
protected PrivacyList(boolean isActiveList, boolean isDefaultList,
|
protected PrivacyList(boolean isActiveList, boolean isDefaultList,
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.jivesoftware.smackx.pubsub.provider.ItemProvider;
|
||||||
* <li>Will require payload if the node configuration has {@link ConfigureForm#isDeliverPayloads()} set
|
* <li>Will require payload if the node configuration has {@link ConfigureForm#isDeliverPayloads()} set
|
||||||
* to true.
|
* to true.
|
||||||
*
|
*
|
||||||
* <p>To customise the payload object being returned from the {@link #getPayload()} method, you can
|
* <p>To customise the payload object being returned from the {@link PayloadItem#getPayload()} method, you can
|
||||||
* add a custom parser as explained in {@link ItemProvider}.
|
* add a custom parser as explained in {@link ItemProvider}.
|
||||||
*
|
*
|
||||||
* @author Robin Collier
|
* @author Robin Collier
|
||||||
|
|
|
@ -82,7 +82,6 @@ public class ItemsExtension extends NodeExtension implements EmbeddedPacketExten
|
||||||
* @param itemsType Type of representation
|
* @param itemsType Type of representation
|
||||||
* @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 attributeValue The value of the <b>max_items</b>
|
|
||||||
*/
|
*/
|
||||||
public ItemsExtension(ItemsElementType itemsType, String nodeId, List<? extends PacketExtension> items)
|
public ItemsExtension(ItemsElementType itemsType, String nodeId, List<? extends PacketExtension> items)
|
||||||
{
|
{
|
||||||
|
@ -104,10 +103,8 @@ public class ItemsExtension extends NodeExtension implements EmbeddedPacketExten
|
||||||
* <li>Items deleted event - itemsType = {@link ItemsElementType#items}, items = list of {@link RetractItem} and
|
* <li>Items deleted event - itemsType = {@link ItemsElementType#items}, items = list of {@link RetractItem} and
|
||||||
* attributeValue = <code>null</code>
|
* attributeValue = <code>null</code>
|
||||||
*
|
*
|
||||||
* @param itemsType Type of representation
|
|
||||||
* @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 attributeValue The value of the <b>max_items</b>
|
|
||||||
*/
|
*/
|
||||||
public ItemsExtension(String nodeId, List<? extends PacketExtension> items, boolean notify)
|
public ItemsExtension(String nodeId, List<? extends PacketExtension> items, boolean notify)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.pubsub;
|
||||||
import org.jivesoftware.smack.packet.PacketExtension;
|
import org.jivesoftware.smack.packet.PacketExtension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default payload representation for {@link Item#getPayload()}. It simply
|
* The default payload representation for {@link PayloadItem#getPayload()}. It simply
|
||||||
* stores the XML payload as a string.
|
* stores the XML payload as a string.
|
||||||
*
|
*
|
||||||
* @author Robin Collier
|
* @author Robin Collier
|
||||||
|
|
|
@ -27,10 +27,10 @@ import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Time IQ packet, which is used by XMPP clients to exchange their respective local
|
* A Time IQ packet, which is used by XMPP clients to exchange their respective local
|
||||||
* times. Clients that wish to fully support the entitity time protocol should register
|
* times. Clients that wish to fully support the entity time protocol should register
|
||||||
* a PacketListener for incoming time requests that then respond with the local time.
|
* a PacketListener for incoming time requests that then respond with the local time.
|
||||||
*
|
*
|
||||||
* @see http://www.xmpp.org/extensions/xep-0202.html
|
* @see <a href="http://www.xmpp.org/extensions/xep-0202.html">XEP-202</a>
|
||||||
* @author Florian Schmaus
|
* @author Florian Schmaus
|
||||||
*/
|
*/
|
||||||
public class Time extends IQ {
|
public class Time extends IQ {
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class DataForm implements PacketExtension {
|
||||||
* Returns true if this DataForm has at least one FORM_TYPE field which is
|
* Returns true if this DataForm has at least one FORM_TYPE field which is
|
||||||
* hidden. This method is used for sanity checks.
|
* hidden. This method is used for sanity checks.
|
||||||
*
|
*
|
||||||
* @return
|
* @return true if there is at least one field which is hidden.
|
||||||
*/
|
*/
|
||||||
public boolean hasHiddenFormTypeField() {
|
public boolean hasHiddenFormTypeField() {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return
|
* @return the JingleTransportManager
|
||||||
*/
|
*/
|
||||||
public JingleTransportManager getTransportManager() {
|
public JingleTransportManager getTransportManager() {
|
||||||
return jingleTransportManager;
|
return jingleTransportManager;
|
||||||
|
@ -134,7 +134,7 @@ public class ContentNegotiator extends JingleNegotiator {
|
||||||
* Called from above when starting a new session.
|
* Called from above when starting a new session.
|
||||||
*/
|
*/
|
||||||
protected void doStart() {
|
protected void doStart() {
|
||||||
JingleContent result = new JingleContent(creator, name);
|
// JingleContent result = new JingleContent(creator, name);
|
||||||
|
|
||||||
// result.setDescription(mediaNeg.start());
|
// result.setDescription(mediaNeg.start());
|
||||||
// result.addJingleTransport(transNeg.start());
|
// result.addJingleTransport(transNeg.start());
|
||||||
|
|
|
@ -204,7 +204,7 @@ public class JingleManager implements JingleSessionListener {
|
||||||
* If a fully implemented JingleMediaSession is entered, JingleManager manage Jingle signalling and jmf
|
* If a fully implemented JingleMediaSession is entered, JingleManager manage Jingle signalling and jmf
|
||||||
*
|
*
|
||||||
* @param connection XMPP XMPPConnection to be used
|
* @param connection XMPP XMPPConnection to be used
|
||||||
* @param jingleMediaManager an implemeted JingleMediaManager to be used.
|
* @param jingleMediaManagers an implemeted JingleMediaManager to be used.
|
||||||
*/
|
*/
|
||||||
public JingleManager(XMPPConnection connection, List<JingleMediaManager> jingleMediaManagers) {
|
public JingleManager(XMPPConnection connection, List<JingleMediaManager> jingleMediaManagers) {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
|
@ -321,7 +321,7 @@ public class JingleManager implements JingleSessionListener {
|
||||||
/**
|
/**
|
||||||
* Get the Media Managers of this Jingle Manager
|
* Get the Media Managers of this Jingle Manager
|
||||||
*
|
*
|
||||||
* @return
|
* @return the list of JingleMediaManagers
|
||||||
*/
|
*/
|
||||||
public List<JingleMediaManager> getMediaManagers() {
|
public List<JingleMediaManager> getMediaManagers() {
|
||||||
return jingleMediaManagers;
|
return jingleMediaManagers;
|
||||||
|
@ -330,7 +330,7 @@ public class JingleManager implements JingleSessionListener {
|
||||||
/**
|
/**
|
||||||
* Set the Media Managers of this Jingle Manager
|
* Set the Media Managers of this Jingle Manager
|
||||||
*
|
*
|
||||||
* @param jingleMediaManager JingleMediaManager to be used for open, close, start and stop jmf streamings
|
* @param jingleMediaManagers JingleMediaManager to be used for open, close, start and stop jmf streamings
|
||||||
*/
|
*/
|
||||||
public void setMediaManagers(List<JingleMediaManager> jingleMediaManagers) {
|
public void setMediaManagers(List<JingleMediaManager> jingleMediaManagers) {
|
||||||
this.jingleMediaManagers = jingleMediaManagers;
|
this.jingleMediaManagers = jingleMediaManagers;
|
||||||
|
@ -516,7 +516,6 @@ public class JingleManager implements JingleSessionListener {
|
||||||
*
|
*
|
||||||
* @param responder the fully qualified jabber ID with resource of the other
|
* @param responder the fully qualified jabber ID with resource of the other
|
||||||
* user.
|
* user.
|
||||||
* @param payloadTypes list of supported payload types
|
|
||||||
* @return The session on which the negotiation can be run.
|
* @return The session on which the negotiation can be run.
|
||||||
*/
|
*/
|
||||||
public JingleSession createOutgoingJingleSession(String responder) throws XMPPException {
|
public JingleSession createOutgoingJingleSession(String responder) throws XMPPException {
|
||||||
|
@ -549,7 +548,6 @@ public class JingleManager implements JingleSessionListener {
|
||||||
* will create an JingleSession which allows the negotiation to procede.
|
* will create an JingleSession which allows the negotiation to procede.
|
||||||
*
|
*
|
||||||
* @param request the remote request that is being accepted.
|
* @param request the remote request that is being accepted.
|
||||||
* @param payloadTypes the list of supported Payload types that can be accepted
|
|
||||||
* @return the session which manages the rest of the negotiation.
|
* @return the session which manages the rest of the negotiation.
|
||||||
*/
|
*/
|
||||||
public JingleSession createIncomingJingleSession(JingleSessionRequest request) throws XMPPException {
|
public JingleSession createIncomingJingleSession(JingleSessionRequest request) throws XMPPException {
|
||||||
|
@ -585,7 +583,7 @@ public class JingleManager implements JingleSessionListener {
|
||||||
* Get a session with the informed JID. If no session is found, return null.
|
* Get a session with the informed JID. If no session is found, return null.
|
||||||
*
|
*
|
||||||
* @param jid
|
* @param jid
|
||||||
* @return
|
* @return the JingleSession
|
||||||
*/
|
*/
|
||||||
public JingleSession getSession(String jid) {
|
public JingleSession getSession(String jid) {
|
||||||
for (JingleSession jingleSession : jingleSessions) {
|
for (JingleSession jingleSession : jingleSessions) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ public abstract class JingleNegotiator {
|
||||||
/**
|
/**
|
||||||
* Default constructor with a Connection
|
* Default constructor with a Connection
|
||||||
*
|
*
|
||||||
* @param connection the connection associated
|
* @param session the jingle session
|
||||||
*/
|
*/
|
||||||
public JingleNegotiator(JingleSession session) {
|
public JingleNegotiator(JingleSession session) {
|
||||||
this.session = session;
|
this.session = session;
|
||||||
|
@ -119,7 +119,7 @@ public abstract class JingleNegotiator {
|
||||||
/**
|
/**
|
||||||
* Set the XMPP connection associated.
|
* Set the XMPP connection associated.
|
||||||
*
|
*
|
||||||
* @param connection the connection to set
|
* @param session the jingle session
|
||||||
*/
|
*/
|
||||||
public void setSession(JingleSession session) {
|
public void setSession(JingleSession session) {
|
||||||
this.session = session;
|
this.session = session;
|
||||||
|
@ -140,7 +140,7 @@ public abstract class JingleNegotiator {
|
||||||
* Check if the passed ID is the expected ID
|
* Check if the passed ID is the expected ID
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return true if is expected id
|
||||||
*/
|
*/
|
||||||
public boolean isExpectedId(String id) {
|
public boolean isExpectedId(String id) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
||||||
* the responder JID
|
* the responder JID
|
||||||
* @param sessionid
|
* @param sessionid
|
||||||
* the session ID
|
* the session ID
|
||||||
* @param jingleMediaManager
|
* @param jingleMediaManagers
|
||||||
* the jingleMediaManager
|
* the jingleMediaManager
|
||||||
*/
|
*/
|
||||||
public JingleSession(XMPPConnection conn, String initiator, String responder, String sessionid,
|
public JingleSession(XMPPConnection conn, String initiator, String responder, String sessionid,
|
||||||
|
@ -136,7 +136,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
||||||
* the initiator JID
|
* the initiator JID
|
||||||
* @param responder
|
* @param responder
|
||||||
* the responder JID
|
* the responder JID
|
||||||
* @param jingleMediaManager
|
* @param jingleMediaManagers
|
||||||
* the jingleMediaManager
|
* the jingleMediaManager
|
||||||
*/
|
*/
|
||||||
public JingleSession(XMPPConnection conn, JingleSessionRequest request, String initiator, String responder,
|
public JingleSession(XMPPConnection conn, JingleSessionRequest request, String initiator, String responder,
|
||||||
|
@ -171,7 +171,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
||||||
/**
|
/**
|
||||||
* Get the Media Manager of this Jingle Session
|
* Get the Media Manager of this Jingle Session
|
||||||
*
|
*
|
||||||
* @return
|
* @return the JingleMediaManagers
|
||||||
*/
|
*/
|
||||||
public List<JingleMediaManager> getMediaManagers() {
|
public List<JingleMediaManager> getMediaManagers() {
|
||||||
return jingleMediaManagers;
|
return jingleMediaManagers;
|
||||||
|
@ -180,7 +180,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
||||||
/**
|
/**
|
||||||
* Set the Media Manager of this Jingle Session
|
* Set the Media Manager of this Jingle Session
|
||||||
*
|
*
|
||||||
* @param jingleMediaManager
|
* @param jingleMediaManagers
|
||||||
*/
|
*/
|
||||||
public void setMediaManagers(List<JingleMediaManager> jingleMediaManagers) {
|
public void setMediaManagers(List<JingleMediaManager> jingleMediaManagers) {
|
||||||
this.jingleMediaManagers = jingleMediaManagers;
|
this.jingleMediaManagers = jingleMediaManagers;
|
||||||
|
@ -272,7 +272,6 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
||||||
*
|
*
|
||||||
* @param iq
|
* @param iq
|
||||||
* the packet received
|
* the packet received
|
||||||
* @return the new Jingle packet to send.
|
|
||||||
* @throws XMPPException
|
* @throws XMPPException
|
||||||
*/
|
*/
|
||||||
public synchronized void receivePacketAndRespond(IQ iq) throws XMPPException {
|
public synchronized void receivePacketAndRespond(IQ iq) throws XMPPException {
|
||||||
|
@ -1055,8 +1054,8 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
||||||
* From whom the packet is sent.
|
* From whom the packet is sent.
|
||||||
* @param errCode
|
* @param errCode
|
||||||
* The error code.
|
* The error code.
|
||||||
* @param errStr
|
* @param error
|
||||||
* The error string.
|
* The XMPPError string.
|
||||||
* @return The created IQ packet.
|
* @return The created IQ packet.
|
||||||
*/
|
*/
|
||||||
public static IQ createError(String ID, String to, String from, int errCode, XMPPError error) {
|
public static IQ createError(String ID, String to, String from, int errCode, XMPPError error) {
|
||||||
|
@ -1076,7 +1075,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
||||||
*
|
*
|
||||||
* @param iq
|
* @param iq
|
||||||
* The Jingle packet we are responing to
|
* The Jingle packet we are responing to
|
||||||
* @param error
|
* @param jingleError
|
||||||
* the IQ packet we want to complete and send
|
* the IQ packet we want to complete and send
|
||||||
*/
|
*/
|
||||||
public IQ createJingleError(IQ iq, JingleError jingleError) {
|
public IQ createJingleError(IQ iq, JingleError jingleError) {
|
||||||
|
|
|
@ -72,7 +72,7 @@ public abstract class JingleMediaManager {
|
||||||
* @param payloadType
|
* @param payloadType
|
||||||
* @param remote
|
* @param remote
|
||||||
* @param local
|
* @param local
|
||||||
* @return
|
* @return the media session
|
||||||
*/
|
*/
|
||||||
public abstract JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote,
|
public abstract JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote,
|
||||||
final TransportCandidate local, JingleSession jingleSession);
|
final TransportCandidate local, JingleSession jingleSession);
|
||||||
|
|
|
@ -69,7 +69,7 @@ public abstract class JingleMediaSession {
|
||||||
/**
|
/**
|
||||||
* Returns the PayloadType of the Media Session
|
* Returns the PayloadType of the Media Session
|
||||||
*
|
*
|
||||||
* @return
|
* @return the PayloadType
|
||||||
*/
|
*/
|
||||||
public PayloadType getPayloadType() {
|
public PayloadType getPayloadType() {
|
||||||
return payloadType;
|
return payloadType;
|
||||||
|
@ -78,7 +78,7 @@ public abstract class JingleMediaSession {
|
||||||
/**
|
/**
|
||||||
* Returns the Media Session local Candidate
|
* Returns the Media Session local Candidate
|
||||||
*
|
*
|
||||||
* @return
|
* @return the TransportCandidate
|
||||||
*/
|
*/
|
||||||
public TransportCandidate getLocal() {
|
public TransportCandidate getLocal() {
|
||||||
return local;
|
return local;
|
||||||
|
@ -87,7 +87,7 @@ public abstract class JingleMediaSession {
|
||||||
/**
|
/**
|
||||||
* Returns the Media Session remote Candidate
|
* Returns the Media Session remote Candidate
|
||||||
*
|
*
|
||||||
* @return
|
* @return the TransportCandidate
|
||||||
*/
|
*/
|
||||||
public TransportCandidate getRemote() {
|
public TransportCandidate getRemote() {
|
||||||
return remote;
|
return remote;
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
||||||
* but it does not start the negotiation. For starting the negotiation, call
|
* but it does not start the negotiation. For starting the negotiation, call
|
||||||
* startNegotiation.
|
* startNegotiation.
|
||||||
*
|
*
|
||||||
* @param js
|
* @param session
|
||||||
* The jingle session.
|
* The jingle session.
|
||||||
*/
|
*/
|
||||||
public MediaNegotiator(JingleSession session, JingleMediaManager mediaManager, List<PayloadType> pts,
|
public MediaNegotiator(JingleSession session, JingleMediaManager mediaManager, List<PayloadType> pts,
|
||||||
|
@ -198,7 +198,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
||||||
* will be the best payload type to use.
|
* will be the best payload type to use.
|
||||||
*
|
*
|
||||||
* @param jingle
|
* @param jingle
|
||||||
* @return
|
* @return the iq
|
||||||
*/
|
*/
|
||||||
private IQ receiveContentAcceptAction(Jingle jingle, JingleDescription description) throws XMPPException {
|
private IQ receiveContentAcceptAction(Jingle jingle, JingleDescription description) throws XMPPException {
|
||||||
IQ response = null;
|
IQ response = null;
|
||||||
|
@ -228,7 +228,7 @@ public class MediaNegotiator extends JingleNegotiator {
|
||||||
* Receive a session-initiate packet.
|
* Receive a session-initiate packet.
|
||||||
* @param jingle
|
* @param jingle
|
||||||
* @param description
|
* @param description
|
||||||
* @return
|
* @return the iq
|
||||||
*/
|
*/
|
||||||
private IQ receiveSessionInitiateAction(Jingle jingle, JingleDescription description) {
|
private IQ receiveSessionInitiateAction(Jingle jingle, JingleDescription description) {
|
||||||
IQ response = null;
|
IQ response = null;
|
||||||
|
@ -416,27 +416,27 @@ public class MediaNegotiator extends JingleNegotiator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Create an offer for the list of audio payload types.
|
// * Create an offer for the list of audio payload types.
|
||||||
*
|
// *
|
||||||
* @return a new Jingle packet with the list of audio Payload Types
|
// * @return a new Jingle packet with the list of audio Payload Types
|
||||||
*/
|
// */
|
||||||
private Jingle createAudioPayloadTypesOffer() {
|
// private Jingle createAudioPayloadTypesOffer() {
|
||||||
|
//
|
||||||
JingleContent jingleContent = new JingleContent(parentNegotiator.getCreator(), parentNegotiator.getName());
|
// JingleContent jingleContent = new JingleContent(parentNegotiator.getCreator(), parentNegotiator.getName());
|
||||||
JingleDescription audioDescr = new JingleDescription.Audio();
|
// JingleDescription audioDescr = new JingleDescription.Audio();
|
||||||
|
//
|
||||||
// Add the list of payloads for audio and create a
|
// // Add the list of payloads for audio and create a
|
||||||
// JingleDescription
|
// // JingleDescription
|
||||||
// where we announce our payloads...
|
// // where we announce our payloads...
|
||||||
audioDescr.addAudioPayloadTypes(localAudioPts);
|
// audioDescr.addAudioPayloadTypes(localAudioPts);
|
||||||
jingleContent.setDescription(audioDescr);
|
// jingleContent.setDescription(audioDescr);
|
||||||
|
//
|
||||||
Jingle jingle = new Jingle(JingleActionEnum.CONTENT_ACCEPT);
|
// Jingle jingle = new Jingle(JingleActionEnum.CONTENT_ACCEPT);
|
||||||
jingle.addContent(jingleContent);
|
// jingle.addContent(jingleContent);
|
||||||
|
//
|
||||||
return jingle;
|
// return jingle;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Predefined messages and Errors
|
// Predefined messages and Errors
|
||||||
|
|
||||||
|
@ -502,7 +502,6 @@ public class MediaNegotiator extends JingleNegotiator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called from above when starting a new session.
|
* Called from above when starting a new session.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected void doStart() {
|
protected void doStart() {
|
||||||
|
|
||||||
|
|
|
@ -311,7 +311,7 @@ public class AudioChannel {
|
||||||
*
|
*
|
||||||
* @param codecFormat
|
* @param codecFormat
|
||||||
* @param milliseconds
|
* @param milliseconds
|
||||||
* @return
|
* @return the best packet size
|
||||||
* @throws IllegalArgumentException
|
* @throws IllegalArgumentException
|
||||||
*/
|
*/
|
||||||
private int getPacketSize(Format codecFormat, int milliseconds) throws IllegalArgumentException {
|
private int getPacketSize(Format codecFormat, int milliseconds) throws IllegalArgumentException {
|
||||||
|
|
|
@ -49,7 +49,7 @@ public abstract class JingleTransportManager {
|
||||||
/**
|
/**
|
||||||
* Get a new Transport Resolver to be used in a Jingle Session
|
* Get a new Transport Resolver to be used in a Jingle Session
|
||||||
*
|
*
|
||||||
* @return
|
* @return the TransportResolver to be used
|
||||||
*/
|
*/
|
||||||
public TransportResolver getResolver(JingleSession session) throws XMPPException {
|
public TransportResolver getResolver(JingleSession session) throws XMPPException {
|
||||||
TransportResolver resolver = createResolver(session);
|
TransportResolver resolver = createResolver(session);
|
||||||
|
@ -64,7 +64,7 @@ public abstract class JingleTransportManager {
|
||||||
/**
|
/**
|
||||||
* Create a Transport Resolver instance according to the implementation.
|
* Create a Transport Resolver instance according to the implementation.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the TransportResolver
|
||||||
*/
|
*/
|
||||||
protected abstract TransportResolver createResolver(JingleSession session);
|
protected abstract TransportResolver createResolver(JingleSession session);
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the Session ID of the Packet (usually same as Jingle Session ID)
|
* Get the Session ID of the Packet (usually same as Jingle Session ID)
|
||||||
*
|
*
|
||||||
* @return
|
* @return the session ID
|
||||||
*/
|
*/
|
||||||
public String getSid() {
|
public String getSid() {
|
||||||
return sid;
|
return sid;
|
||||||
|
@ -166,7 +166,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the Host A IP Address
|
* Get the Host A IP Address
|
||||||
*
|
*
|
||||||
* @return
|
* @return the Host A IP Address
|
||||||
*/
|
*/
|
||||||
public String getHostA() {
|
public String getHostA() {
|
||||||
return hostA;
|
return hostA;
|
||||||
|
@ -184,7 +184,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the Host B IP Address
|
* Get the Host B IP Address
|
||||||
*
|
*
|
||||||
* @return
|
* @return the Host B IP Address
|
||||||
*/
|
*/
|
||||||
public String getHostB() {
|
public String getHostB() {
|
||||||
return hostB;
|
return hostB;
|
||||||
|
@ -202,7 +202,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get Side A receive port
|
* Get Side A receive port
|
||||||
*
|
*
|
||||||
* @return
|
* @return the side A receive prot
|
||||||
*/
|
*/
|
||||||
public int getPortA() {
|
public int getPortA() {
|
||||||
return portA;
|
return portA;
|
||||||
|
@ -220,7 +220,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get Side B receive port
|
* Get Side B receive port
|
||||||
*
|
*
|
||||||
* @return
|
* @return the side B receive port
|
||||||
*/
|
*/
|
||||||
public int getPortB() {
|
public int getPortB() {
|
||||||
return portB;
|
return portB;
|
||||||
|
@ -238,7 +238,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the RTP Bridge IP
|
* Get the RTP Bridge IP
|
||||||
*
|
*
|
||||||
* @return
|
* @return the RTP Bridge IP
|
||||||
*/
|
*/
|
||||||
public String getIp() {
|
public String getIp() {
|
||||||
return ip;
|
return ip;
|
||||||
|
@ -256,7 +256,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the RTP Agent Pass
|
* Get the RTP Agent Pass
|
||||||
*
|
*
|
||||||
* @return
|
* @return the RTP Agent Pass
|
||||||
*/
|
*/
|
||||||
public String getPass() {
|
public String getPass() {
|
||||||
return pass;
|
return pass;
|
||||||
|
@ -274,7 +274,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the name of the Candidate
|
* Get the name of the Candidate
|
||||||
*
|
*
|
||||||
* @return
|
* @return the name of the Candidate
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
|
@ -292,7 +292,7 @@ public class RTPBridge extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the Child Element XML of the Packet
|
* Get the Child Element XML of the Packet
|
||||||
*
|
*
|
||||||
* @return
|
* @return the Child Element XML of the Packet
|
||||||
*/
|
*/
|
||||||
public String getChildElementXML() {
|
public String getChildElementXML() {
|
||||||
StringBuilder str = new StringBuilder();
|
StringBuilder str = new StringBuilder();
|
||||||
|
@ -327,7 +327,6 @@ public class RTPBridge extends IQ {
|
||||||
|
|
||||||
int eventType;
|
int eventType;
|
||||||
String elementName;
|
String elementName;
|
||||||
String namespace;
|
|
||||||
|
|
||||||
if (!parser.getNamespace().equals(RTPBridge.NAMESPACE))
|
if (!parser.getNamespace().equals(RTPBridge.NAMESPACE))
|
||||||
throw new Exception("Not a RTP Bridge packet");
|
throw new Exception("Not a RTP Bridge packet");
|
||||||
|
@ -343,7 +342,6 @@ public class RTPBridge extends IQ {
|
||||||
while (!done) {
|
while (!done) {
|
||||||
eventType = parser.next();
|
eventType = parser.next();
|
||||||
elementName = parser.getName();
|
elementName = parser.getName();
|
||||||
namespace = parser.getNamespace();
|
|
||||||
|
|
||||||
if (eventType == XmlPullParser.START_TAG) {
|
if (eventType == XmlPullParser.START_TAG) {
|
||||||
if (elementName.equals("candidate")) {
|
if (elementName.equals("candidate")) {
|
||||||
|
@ -361,8 +359,6 @@ public class RTPBridge extends IQ {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (elementName.equals("publicip")) {
|
else if (elementName.equals("publicip")) {
|
||||||
//String p = parser.getAttributeName(0);
|
|
||||||
int x = parser.getAttributeCount();
|
|
||||||
for (int i = 0; i < parser.getAttributeCount(); i++) {
|
for (int i = 0; i < parser.getAttributeCount(); i++) {
|
||||||
if (parser.getAttributeName(i).equals("ip"))
|
if (parser.getAttributeName(i).equals("ip"))
|
||||||
iq.setIp(parser.getAttributeValue(i));
|
iq.setIp(parser.getAttributeValue(i));
|
||||||
|
@ -385,7 +381,7 @@ public class RTPBridge extends IQ {
|
||||||
*
|
*
|
||||||
* @param connection
|
* @param connection
|
||||||
* @param sessionID
|
* @param sessionID
|
||||||
* @return
|
* @return the new RTPBridge
|
||||||
*/
|
*/
|
||||||
public static RTPBridge getRTPBridge(XMPPConnection connection, String sessionID) {
|
public static RTPBridge getRTPBridge(XMPPConnection connection, String sessionID) {
|
||||||
|
|
||||||
|
@ -410,7 +406,7 @@ public class RTPBridge extends IQ {
|
||||||
* Check if the server support RTPBridge Service.
|
* Check if the server support RTPBridge Service.
|
||||||
*
|
*
|
||||||
* @param connection
|
* @param connection
|
||||||
* @return
|
* @return true if the server supports the RTPBridge service
|
||||||
*/
|
*/
|
||||||
public static boolean serviceAvailable(XMPPConnection connection) {
|
public static boolean serviceAvailable(XMPPConnection connection) {
|
||||||
|
|
||||||
|
@ -452,7 +448,7 @@ public class RTPBridge extends IQ {
|
||||||
* Check if the server support RTPBridge Service.
|
* Check if the server support RTPBridge Service.
|
||||||
*
|
*
|
||||||
* @param connection
|
* @param connection
|
||||||
* @return
|
* @return the RTPBridge
|
||||||
*/
|
*/
|
||||||
public static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) {
|
public static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) {
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.jivesoftware.smackx.jingle.nat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.jivesoftware.smack.XMPPConnection;
|
import org.jivesoftware.smack.XMPPConnection;
|
||||||
|
@ -77,7 +78,7 @@ public class STUN extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get a list of STUN Servers recommended by the Server
|
* Get a list of STUN Servers recommended by the Server
|
||||||
*
|
*
|
||||||
* @return
|
* @return the list of STUN servers
|
||||||
*/
|
*/
|
||||||
public List<StunServerAddress> getServers() {
|
public List<StunServerAddress> getServers() {
|
||||||
return servers;
|
return servers;
|
||||||
|
@ -86,7 +87,7 @@ public class STUN extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get Public Ip returned from the XMPP server
|
* Get Public Ip returned from the XMPP server
|
||||||
*
|
*
|
||||||
* @return
|
* @return the public IP
|
||||||
*/
|
*/
|
||||||
public String getPublicIp() {
|
public String getPublicIp() {
|
||||||
return publicIp;
|
return publicIp;
|
||||||
|
@ -104,7 +105,7 @@ public class STUN extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the Child Element XML of the Packet
|
* Get the Child Element XML of the Packet
|
||||||
*
|
*
|
||||||
* @return
|
* @return the child element XML
|
||||||
*/
|
*/
|
||||||
public String getChildElementXML() {
|
public String getChildElementXML() {
|
||||||
StringBuilder str = new StringBuilder();
|
StringBuilder str = new StringBuilder();
|
||||||
|
@ -130,7 +131,6 @@ public class STUN extends IQ {
|
||||||
|
|
||||||
int eventType;
|
int eventType;
|
||||||
String elementName;
|
String elementName;
|
||||||
String namespace;
|
|
||||||
|
|
||||||
if (!parser.getNamespace().equals(NAMESPACE))
|
if (!parser.getNamespace().equals(NAMESPACE))
|
||||||
throw new Exception("Not a STUN packet");
|
throw new Exception("Not a STUN packet");
|
||||||
|
@ -141,7 +141,6 @@ public class STUN extends IQ {
|
||||||
while (!done) {
|
while (!done) {
|
||||||
eventType = parser.next();
|
eventType = parser.next();
|
||||||
elementName = parser.getName();
|
elementName = parser.getName();
|
||||||
namespace = parser.getNamespace();
|
|
||||||
|
|
||||||
if (eventType == XmlPullParser.START_TAG) {
|
if (eventType == XmlPullParser.START_TAG) {
|
||||||
if (elementName.equals("server")) {
|
if (elementName.equals("server")) {
|
||||||
|
@ -181,7 +180,7 @@ public class STUN extends IQ {
|
||||||
* If a error occurs or the server don't support STUN Service, null is returned.
|
* If a error occurs or the server don't support STUN Service, null is returned.
|
||||||
*
|
*
|
||||||
* @param connection
|
* @param connection
|
||||||
* @return
|
* @return the STUN server address
|
||||||
*/
|
*/
|
||||||
public static STUN getSTUNServer(XMPPConnection connection) {
|
public static STUN getSTUNServer(XMPPConnection connection) {
|
||||||
|
|
||||||
|
@ -205,8 +204,8 @@ public class STUN extends IQ {
|
||||||
/**
|
/**
|
||||||
* Check if the server support STUN Service.
|
* Check if the server support STUN Service.
|
||||||
*
|
*
|
||||||
* @param xmppConnection
|
* @param connection the connection
|
||||||
* @return
|
* @return true if the server support STUN
|
||||||
*/
|
*/
|
||||||
public static boolean serviceAvailable(XMPPConnection connection) {
|
public static boolean serviceAvailable(XMPPConnection connection) {
|
||||||
|
|
||||||
|
@ -239,7 +238,7 @@ public class STUN extends IQ {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (XMPPException e) {
|
catch (XMPPException e) {
|
||||||
e.printStackTrace();
|
LOGGER.log(Level.SEVERE, "serviceAvailable", e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -260,7 +259,7 @@ public class STUN extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the Host Address
|
* Get the Host Address
|
||||||
*
|
*
|
||||||
* @return
|
* @return the host address
|
||||||
*/
|
*/
|
||||||
public String getServer() {
|
public String getServer() {
|
||||||
return server;
|
return server;
|
||||||
|
@ -269,7 +268,7 @@ public class STUN extends IQ {
|
||||||
/**
|
/**
|
||||||
* Get the Server Port
|
* Get the Server Port
|
||||||
*
|
*
|
||||||
* @return
|
* @return the server port
|
||||||
*/
|
*/
|
||||||
public String getPort() {
|
public String getPort() {
|
||||||
return port;
|
return port;
|
||||||
|
|
|
@ -103,7 +103,7 @@ public abstract class TransportCandidate {
|
||||||
/**
|
/**
|
||||||
* Get local IP to bind to this candidate
|
* Get local IP to bind to this candidate
|
||||||
*
|
*
|
||||||
* @return
|
* @return the local IP
|
||||||
*/
|
*/
|
||||||
public String getLocalIp() {
|
public String getLocalIp() {
|
||||||
return localIp == null ? ip : localIp;
|
return localIp == null ? ip : localIp;
|
||||||
|
@ -119,9 +119,9 @@ public abstract class TransportCandidate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the symetric candidate for this candidate if it exists.
|
* Get the symmetric candidate for this candidate if it exists.
|
||||||
*
|
*
|
||||||
* @return
|
* @return the symmetric candidate
|
||||||
*/
|
*/
|
||||||
public TransportCandidate getSymmetric() {
|
public TransportCandidate getSymmetric() {
|
||||||
return symmetric;
|
return symmetric;
|
||||||
|
@ -157,7 +157,7 @@ public abstract class TransportCandidate {
|
||||||
/**
|
/**
|
||||||
* Get the XMPPConnection use to send or receive this candidate
|
* Get the XMPPConnection use to send or receive this candidate
|
||||||
*
|
*
|
||||||
* @return
|
* @return the connection
|
||||||
*/
|
*/
|
||||||
public XMPPConnection getConnection() {
|
public XMPPConnection getConnection() {
|
||||||
return connection;
|
return connection;
|
||||||
|
@ -175,7 +175,7 @@ public abstract class TransportCandidate {
|
||||||
/**
|
/**
|
||||||
* Get the jingle's sessionId that is using this candidate
|
* Get the jingle's sessionId that is using this candidate
|
||||||
*
|
*
|
||||||
* @return
|
* @return the session ID
|
||||||
*/
|
*/
|
||||||
public String getSessionId() {
|
public String getSessionId() {
|
||||||
return sessionId;
|
return sessionId;
|
||||||
|
|
|
@ -87,7 +87,7 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
/**
|
/**
|
||||||
* Default constructor.
|
* Default constructor.
|
||||||
*
|
*
|
||||||
* @param js The Jingle session
|
* @param session The Jingle session
|
||||||
* @param transResolver The JingleTransportManager to use
|
* @param transResolver The JingleTransportManager to use
|
||||||
*/
|
*/
|
||||||
public TransportNegotiator(JingleSession session, TransportResolver transResolver, ContentNegotiator parentNegotiator) {
|
public TransportNegotiator(JingleSession session, TransportResolver transResolver, ContentNegotiator parentNegotiator) {
|
||||||
|
@ -503,10 +503,6 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOfferStarted() {
|
|
||||||
return resolver.isResolving() || resolver.isResolved();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send an offer for a transport candidate
|
* Send an offer for a transport candidate
|
||||||
*
|
*
|
||||||
|
@ -658,7 +654,7 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
/**
|
/**
|
||||||
* @param jingle
|
* @param jingle
|
||||||
* @param jingleTransport
|
* @param jingleTransport
|
||||||
* @return
|
* @return the iq
|
||||||
*/
|
*/
|
||||||
private IQ receiveSessionInitiateAction(Jingle jingle) throws XMPPException {
|
private IQ receiveSessionInitiateAction(Jingle jingle) throws XMPPException {
|
||||||
IQ response = null;
|
IQ response = null;
|
||||||
|
@ -682,7 +678,7 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
/**
|
/**
|
||||||
* @param jingle
|
* @param jingle
|
||||||
* @param jingleTransport
|
* @param jingleTransport
|
||||||
* @return
|
* @return the iq
|
||||||
*/
|
*/
|
||||||
private IQ receiveTransportInfoAction(Jingle jingle) throws XMPPException {
|
private IQ receiveTransportInfoAction(Jingle jingle) throws XMPPException {
|
||||||
IQ response = null;
|
IQ response = null;
|
||||||
|
@ -744,7 +740,7 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param jingle
|
* @param jingle
|
||||||
* @return
|
* @return the iq
|
||||||
*/
|
*/
|
||||||
private IQ receiveSessionAcceptAction(Jingle jingle) {
|
private IQ receiveSessionAcceptAction(Jingle jingle) {
|
||||||
IQ response = null;
|
IQ response = null;
|
||||||
|
|
|
@ -140,7 +140,7 @@ public abstract class TransportResolver {
|
||||||
/**
|
/**
|
||||||
* Chack if the Transport Resolver is initialized
|
* Chack if the Transport Resolver is initialized
|
||||||
*
|
*
|
||||||
* @return
|
* @return true if initialized
|
||||||
*/
|
*/
|
||||||
public synchronized boolean isInitialized() {
|
public synchronized boolean isInitialized() {
|
||||||
return initialized;
|
return initialized;
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class RosterExchangeManager {
|
||||||
/**
|
/**
|
||||||
* Creates a new roster exchange manager.
|
* Creates a new roster exchange manager.
|
||||||
*
|
*
|
||||||
* @param con a XMPPConnection which is used to send and receive messages.
|
* @param connection a XMPPConnection which is used to send and receive messages.
|
||||||
*/
|
*/
|
||||||
public RosterExchangeManager(XMPPConnection connection) {
|
public RosterExchangeManager(XMPPConnection connection) {
|
||||||
weakRefConnection = new WeakReference<XMPPConnection>(connection);
|
weakRefConnection = new WeakReference<XMPPConnection>(connection);
|
||||||
|
|
|
@ -56,7 +56,7 @@ import java.util.List;
|
||||||
* Creates a socket connection to a XMPP server. This is the default connection
|
* Creates a socket connection to a XMPP server. This is the default connection
|
||||||
* to a Jabber server and is specified in the XMPP Core (RFC 3920).
|
* to a Jabber server and is specified in the XMPP Core (RFC 3920).
|
||||||
*
|
*
|
||||||
* @see Connection
|
* @see XMPPConnection
|
||||||
* @author Matt Tucker
|
* @author Matt Tucker
|
||||||
*/
|
*/
|
||||||
public class TCPConnection extends XMPPConnection {
|
public class TCPConnection extends XMPPConnection {
|
||||||
|
|
Loading…
Reference in a new issue