mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Merge branch '4.1'
Conflicts: smack-core/src/main/java/org/jivesoftware/smack/StanzaListener.java smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java version.gradle
This commit is contained in:
commit
83b84c5bd3
168 changed files with 780 additions and 687 deletions
|
@ -440,7 +440,7 @@ public class JingleManager implements JingleSessionListener {
|
|||
}
|
||||
|
||||
/**
|
||||
* Register the listenerJingles, waiting for a Jingle packet that tries to
|
||||
* Register the listenerJingles, waiting for a Jingle stanza(/packet) that tries to
|
||||
* establish a new session.
|
||||
*/
|
||||
private void initJingleSessionRequestListeners() {
|
||||
|
@ -492,7 +492,7 @@ public class JingleManager implements JingleSessionListener {
|
|||
/**
|
||||
* Activates the listenerJingles on a Jingle session request.
|
||||
*
|
||||
* @param initJin the packet that must be passed to the jingleSessionRequestListener.
|
||||
* @param initJin the stanza(/packet) that must be passed to the jingleSessionRequestListener.
|
||||
*/
|
||||
void triggerSessionRequested(Jingle initJin) {
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ public abstract class JingleNegotiator {
|
|||
/**
|
||||
* Dispatch an incoming packet.
|
||||
*
|
||||
* The negotiators form a tree relationship that roughly matches the Jingle packet format:
|
||||
* The negotiators form a tree relationship that roughly matches the Jingle stanza(/packet) format:
|
||||
*
|
||||
* JingleSession
|
||||
* Content Negotiator
|
||||
|
@ -222,15 +222,15 @@ public abstract class JingleNegotiator {
|
|||
* <description>
|
||||
* <transport>
|
||||
*
|
||||
* This way, each segment of a Jingle packet has a corresponding negotiator that know how to deal with that
|
||||
* This way, each segment of a Jingle stanza(/packet) has a corresponding negotiator that know how to deal with that
|
||||
* part of the Jingle packet. It also allows us to support Jingle packets of arbitraty complexity.
|
||||
*
|
||||
* Each parent calls dispatchIncomingPacket for each of its children. The children then pass back a List<> of
|
||||
* results that will get sent when we reach the top level negotiator (JingleSession).
|
||||
*
|
||||
* @param iq the packet received
|
||||
* @param iq the stanza(/packet) received
|
||||
* @param id the ID of the response that will be sent
|
||||
* @return the new packet to send (either a Jingle or an IQ error).
|
||||
* @return the new stanza(/packet) to send (either a Jingle or an IQ error).
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
|
|
|
@ -268,14 +268,14 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Process and respond to an incoming packet. <p/> This method is called
|
||||
* from the packet listener dispatcher when a new packet has arrived. The
|
||||
* method is responsible for recognizing the packet type and, depending on
|
||||
* from the stanza(/packet) listener dispatcher when a new stanza(/packet) has arrived. The
|
||||
* method is responsible for recognizing the stanza(/packet) type and, depending on
|
||||
* the current state, delivering it to the right event handler and wait for
|
||||
* a response. The response will be another Jingle packet that will be sent
|
||||
* a response. The response will be another Jingle stanza(/packet) that will be sent
|
||||
* to the other end point.
|
||||
*
|
||||
* @param iq
|
||||
* the packet received
|
||||
* the stanza(/packet) received
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
|
@ -340,12 +340,12 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* Dispatch an incoming packet. The method is responsible for recognizing
|
||||
* the packet type and, depending on the current state, delivering the
|
||||
* packet to the right event handler and wait for a response.
|
||||
* the stanza(/packet) type and, depending on the current state, delivering the
|
||||
* stanza(/packet) to the right event handler and wait for a response.
|
||||
*
|
||||
* @param iq
|
||||
* the packet received
|
||||
* @return the new Jingle packet to send.
|
||||
* the stanza(/packet) received
|
||||
* @return the new Jingle stanza(/packet) to send.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
|
@ -419,7 +419,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
* reponse, using the session information we have.
|
||||
*
|
||||
* @param jout
|
||||
* the Jingle packet we want to complete and send
|
||||
* the Jingle stanza(/packet) we want to complete and send
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
|
@ -433,9 +433,9 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
* incoming packet.
|
||||
*
|
||||
* @param iq
|
||||
* The Jingle packet we are responing to
|
||||
* The Jingle stanza(/packet) we are responing to
|
||||
* @param jout
|
||||
* the Jingle packet we want to complete and send
|
||||
* the Jingle stanza(/packet) we want to complete and send
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
|
@ -658,7 +658,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove the packet listener used for processing packet.
|
||||
* Remove the stanza(/packet) listener used for processing packet.
|
||||
*/
|
||||
protected void removeAsyncPacketListener() {
|
||||
if (packetListener != null) {
|
||||
|
@ -669,8 +669,8 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
}
|
||||
|
||||
/**
|
||||
* Install the packet listener. The listener is responsible for responding
|
||||
* to any packet that we receive...
|
||||
* Install the stanza(/packet) listener. The listener is responsible for responding
|
||||
* to any stanza(/packet) that we receive...
|
||||
*/
|
||||
protected void updatePacketListener() {
|
||||
removeAsyncPacketListener();
|
||||
|
@ -1031,9 +1031,9 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
* incoming packet.
|
||||
*
|
||||
* @param iq
|
||||
* The Jingle packet we are responing to
|
||||
* The Jingle stanza(/packet) we are responing to
|
||||
* @param jingleError
|
||||
* the IQ packet we want to complete and send
|
||||
* the IQ stanza(/packet) we want to complete and send
|
||||
*/
|
||||
public IQ createJingleError(IQ iq, JingleError jingleError) {
|
||||
IQ errorPacket = null;
|
||||
|
@ -1139,7 +1139,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
/**
|
||||
* When we initiate a session we need to start a bunch of negotiators right after we receive the result
|
||||
* packet for our session-initiate. This is where we start them.
|
||||
* stanza(/packet) for our session-initiate. This is where we start them.
|
||||
*
|
||||
*/
|
||||
private void startNegotiators() {
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.jxmpp.jid.Jid;
|
|||
* A Jingle session request.
|
||||
* <p/>
|
||||
* This class is a facade of a received Jingle request. The user can have direct
|
||||
* access to the Jingle packet (<i>JingleSessionRequest.getJingle() </i>) of
|
||||
* access to the Jingle stanza(/packet) (<i>JingleSessionRequest.getJingle() </i>) of
|
||||
* the request or can use the convencience methods provided by this class.
|
||||
*
|
||||
* @author Alvaro Saurin
|
||||
|
@ -76,7 +76,7 @@ public class JingleSessionRequest {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the Jingle packet that was sent by the requester which contains
|
||||
* Returns the Jingle stanza(/packet) that was sent by the requester which contains
|
||||
* the parameters of the session.
|
||||
*/
|
||||
public Jingle getJingle() {
|
||||
|
|
|
@ -95,12 +95,12 @@ public class MediaNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Dispatch an incoming packet. The method is responsible for recognizing
|
||||
* the packet type and, depending on the current state, delivering the
|
||||
* packet to the right event handler and wait for a response.
|
||||
* the stanza(/packet) type and, depending on the current state, delivering the
|
||||
* stanza(/packet) to the right event handler and wait for a response.
|
||||
*
|
||||
* @param iq
|
||||
* the packet received
|
||||
* @return the new Jingle packet to send.
|
||||
* the stanza(/packet) received
|
||||
* @return the new Jingle stanza(/packet) to send.
|
||||
* @throws XMPPException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
|
|
|
@ -308,11 +308,11 @@ public class AudioChannel {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the best packet size for a given codec and a codec rate
|
||||
* Get the best stanza(/packet) size for a given codec and a codec rate
|
||||
*
|
||||
* @param codecFormat
|
||||
* @param milliseconds
|
||||
* @return the best packet size
|
||||
* @return the best stanza(/packet) size
|
||||
* @throws IllegalArgumentException
|
||||
*/
|
||||
private int getPacketSize(Format codecFormat, int milliseconds) throws IllegalArgumentException {
|
||||
|
|
|
@ -27,9 +27,9 @@ public interface DatagramListener {
|
|||
|
||||
/**
|
||||
* Called when a datagram is received. If the method returns false, the
|
||||
* packet MUST NOT be resent from the received Channel.
|
||||
* stanza(/packet) MUST NOT be resent from the received Channel.
|
||||
*
|
||||
* @param datagramPacket the datagram packet received.
|
||||
* @param datagramPacket the datagram stanza(/packet) received.
|
||||
* @return ?
|
||||
*/
|
||||
public boolean datagramReceived(DatagramPacket datagramPacket);
|
||||
|
|
|
@ -40,7 +40,7 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
/**
|
||||
* RTPBridge IQ Packet used to request and retrieve a RTPBridge Candidates that can be used for a Jingle Media Transmission between two parties that are behind NAT.
|
||||
* RTPBridge IQ Stanza(/Packet) used to request and retrieve a RTPBridge Candidates that can be used for a Jingle Media Transmission between two parties that are behind NAT.
|
||||
* This Jingle Bridge has all the needed information to establish a full UDP Channel (Send and Receive) between two parties.
|
||||
* <i>This transport method should be used only if other transport methods are not allowed. Or if you want a more reliable transport.</i>
|
||||
* <p/>
|
||||
|
@ -70,17 +70,17 @@ public class RTPBridge extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Element name of the packet extension.
|
||||
* Element name of the stanza(/packet) extension.
|
||||
*/
|
||||
public static final String NAME = "rtpbridge";
|
||||
|
||||
/**
|
||||
* Element name of the packet extension.
|
||||
* Element name of the stanza(/packet) extension.
|
||||
*/
|
||||
public static final String ELEMENT_NAME = "rtpbridge";
|
||||
|
||||
/**
|
||||
* Namespace of the packet extension.
|
||||
* Namespace of the stanza(/packet) extension.
|
||||
*/
|
||||
public static final String NAMESPACE = "http://www.jivesoftware.com/protocol/rtpbridge";
|
||||
|
||||
|
@ -121,7 +121,7 @@ public class RTPBridge extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a RTPBridge Packet without Session ID
|
||||
* Creates a RTPBridge Stanza(/Packet) without Session ID
|
||||
*/
|
||||
public RTPBridge() {
|
||||
super(ELEMENT_NAME, NAMESPACE);
|
||||
|
@ -155,7 +155,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 Stanza(/Packet) (usually same as Jingle Session ID)
|
||||
*
|
||||
* @return the session ID
|
||||
*/
|
||||
|
@ -164,7 +164,7 @@ public class RTPBridge extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the Session ID of the Packet (usually same as Jingle Session ID)
|
||||
* Set the Session ID of the Stanza(/Packet) (usually same as Jingle Session ID)
|
||||
*
|
||||
* @param sid
|
||||
*/
|
||||
|
@ -319,7 +319,7 @@ public class RTPBridge extends IQ {
|
|||
|
||||
/**
|
||||
* IQProvider for RTP Bridge packets.
|
||||
* Parse receive RTPBridge packet to a RTPBridge instance
|
||||
* Parse receive RTPBridge stanza(/packet) to a RTPBridge instance
|
||||
*
|
||||
* @author Thiago Rocha
|
||||
*/
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
/**
|
||||
* STUN IQ Packet used to request and retrieve a STUN server and port to make p2p connections easier. STUN is usually used by Jingle Media Transmission between two parties that are behind NAT.
|
||||
* STUN IQ Stanza(/Packet) used to request and retrieve a STUN server and port to make p2p connections easier. STUN is usually used by Jingle Media Transmission between two parties that are behind NAT.
|
||||
* <p/>
|
||||
* High Level Usage Example:
|
||||
* <p/>
|
||||
|
@ -53,17 +53,17 @@ public class STUN extends SimpleIQ {
|
|||
private String publicIp = null;
|
||||
|
||||
/**
|
||||
* Element name of the packet extension.
|
||||
* Element name of the stanza(/packet) extension.
|
||||
*/
|
||||
public static final String DOMAIN = "stun";
|
||||
|
||||
/**
|
||||
* Element name of the packet extension.
|
||||
* Element name of the stanza(/packet) extension.
|
||||
*/
|
||||
public static final String ELEMENT_NAME = "query";
|
||||
|
||||
/**
|
||||
* Namespace of the packet extension.
|
||||
* Namespace of the stanza(/packet) extension.
|
||||
*/
|
||||
public static final String NAMESPACE = "google:jingleinfo";
|
||||
|
||||
|
@ -107,7 +107,7 @@ public class STUN extends SimpleIQ {
|
|||
|
||||
/**
|
||||
* IQProvider for RTP Bridge packets.
|
||||
* Parse receive RTPBridge packet to a RTPBridge instance
|
||||
* Parse receive RTPBridge stanza(/packet) to a RTPBridge instance
|
||||
*
|
||||
* @author Thiago Rocha
|
||||
*/
|
||||
|
|
|
@ -46,7 +46,7 @@ import org.jivesoftware.smackx.jingleold.packet.JingleTransport.JingleTransportC
|
|||
* <p/>
|
||||
* <p/>
|
||||
* This class is responsible for managing the transport negotiation process,
|
||||
* handling all the packet interchange and the stage control.
|
||||
* handling all the stanza(/packet) interchange and the stage control.
|
||||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
|
@ -545,7 +545,7 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create a Jingle packet where we announce our transport candidates.
|
||||
* Create a Jingle stanza(/packet) where we announce our transport candidates.
|
||||
*
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
|
@ -588,11 +588,11 @@ public abstract class TransportNegotiator extends JingleNegotiator {
|
|||
|
||||
/**
|
||||
* Dispatch an incoming packet. The method is responsible for recognizing
|
||||
* the packet type and, depending on the current state, deliverying the
|
||||
* packet to the right event handler and wait for a response.
|
||||
* the stanza(/packet) type and, depending on the current state, deliverying the
|
||||
* stanza(/packet) to the right event handler and wait for a response.
|
||||
*
|
||||
* @param iq the packet received
|
||||
* @return the new Jingle packet to send.
|
||||
* @param iq the stanza(/packet) received
|
||||
* @return the new Jingle stanza(/packet) to send.
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
|
|
|
@ -180,7 +180,7 @@ public class Jingle extends IQ {
|
|||
* Returns the XML element name of the extension sub-packet root element.
|
||||
* Always returns "jingle"
|
||||
*
|
||||
* @return the XML element name of the packet extension.
|
||||
* @return the XML element name of the stanza(/packet) extension.
|
||||
*/
|
||||
public static String getElementName() {
|
||||
return NODENAME;
|
||||
|
@ -189,7 +189,7 @@ public class Jingle extends IQ {
|
|||
/**
|
||||
* Returns the XML namespace of the extension sub-packet root element.
|
||||
*
|
||||
* @return the XML namespace of the packet extension.
|
||||
* @return the XML namespace of the stanza(/packet) extension.
|
||||
*/
|
||||
public static String getNamespace() {
|
||||
return NAMESPACE;
|
||||
|
@ -320,7 +320,7 @@ public class Jingle extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get a hash key for the session this packet belongs to.
|
||||
* Get a hash key for the session this stanza(/packet) belongs to.
|
||||
*
|
||||
* @param sid The session id
|
||||
* @param initiator The initiator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue