1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 05:51:08 +01: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:
Florian Schmaus 2015-03-24 17:16:18 +01:00
commit 83b84c5bd3
168 changed files with 780 additions and 687 deletions

View file

@ -24,9 +24,9 @@ import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension;
/**
* DataListener handles all In-Band Bytestream IQ stanzas containing a data
* packet extension that don't belong to an existing session.
* stanza(/packet) extension that don't belong to an existing session.
* <p>
* If a data packet is received it looks if a stored In-Band Bytestream session
* If a data stanza(/packet) is received it looks if a stored In-Band Bytestream session
* exists. If no session with the given session ID exists an
* &lt;item-not-found/&gt; error is returned to the sender.
* <p>

View file

@ -50,7 +50,7 @@ import org.jxmpp.jid.Jid;
* in case the Socks5 bytestream method of transferring data is not available.
* <p>
* There are two ways to send data over an In-Band Bytestream. It could either use IQ stanzas to
* send data packets or message stanzas. If IQ stanzas are used every data packet is acknowledged by
* send data packets or message stanzas. If IQ stanzas are used every data stanza(/packet) is acknowledged by
* the receiver. This is the recommended way to avoid possible rate-limiting penalties. Message
* stanzas are not acknowledged because most XMPP server implementation don't support stanza
* flow-control method like <a href="http://xmpp.org/extensions/xep-0079.html">Advanced Message
@ -287,7 +287,7 @@ public class InBandBytestreamManager implements BytestreamManager {
* to the initiator.
* <p>
* This method should be used if you are awaiting an In-Band Bytestream request as a reply to
* another packet (e.g. file transfer).
* another stanza(/packet) (e.g. file transfer).
*
* @param sessionID to be ignored
*/
@ -439,7 +439,7 @@ public class InBandBytestreamManager implements BytestreamManager {
* Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream is
* not accepted.
*
* @param request IQ packet that should be answered with a not-acceptable error
* @param request IQ stanza(/packet) that should be answered with a not-acceptable error
* @throws NotConnectedException
* @throws InterruptedException
*/
@ -453,7 +453,7 @@ public class InBandBytestreamManager implements BytestreamManager {
* Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream open
* request is rejected because its block size is greater than the maximum allowed block size.
*
* @param request IQ packet that should be answered with a resource-constraint error
* @param request IQ stanza(/packet) that should be answered with a resource-constraint error
* @throws NotConnectedException
* @throws InterruptedException
*/
@ -467,7 +467,7 @@ public class InBandBytestreamManager implements BytestreamManager {
* Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream
* session could not be found.
*
* @param request IQ packet that should be answered with a item-not-found error
* @param request IQ stanza(/packet) that should be answered with a item-not-found error
* @throws NotConnectedException
* @throws InterruptedException
*/
@ -538,7 +538,7 @@ public class InBandBytestreamManager implements BytestreamManager {
}
/**
* Disables the InBandBytestreamManager by removing its packet listeners and resetting its
* Disables the InBandBytestreamManager by removing its stanza(/packet) listeners and resetting its
* internal status, which includes removing this instance from the managers map.
*/
private void disableService() {

View file

@ -231,7 +231,7 @@ public class InBandBytestreamSession implements BytestreamSession {
/**
* IBBInputStream class is the base implementation of an In-Band Bytestream input stream.
* Subclasses of this input stream must provide a packet listener along with a packet filter to
* Subclasses of this input stream must provide a stanza(/packet) listener along with a stanza(/packet) filter to
* collect the In-Band Bytestream data packets.
*/
private abstract class IBBInputStream extends InputStream {
@ -270,16 +270,16 @@ public class InBandBytestreamSession implements BytestreamSession {
}
/**
* Returns the packet listener that processes In-Band Bytestream data packets.
* Returns the stanza(/packet) listener that processes In-Band Bytestream data packets.
*
* @return the data packet listener
* @return the data stanza(/packet) listener
*/
protected abstract StanzaListener getDataPacketListener();
/**
* Returns the packet filter that accepts In-Band Bytestream data packets.
* Returns the stanza(/packet) filter that accepts In-Band Bytestream data packets.
*
* @return the data packet filter
* @return the data stanza(/packet) filter
*/
protected abstract StanzaFilter getDataPacketFilter();
@ -336,7 +336,7 @@ public class InBandBytestreamSession implements BytestreamSession {
}
/**
* This method blocks until a data packet is received, the stream is closed or the current
* This method blocks until a data stanza(/packet) is received, the stream is closed or the current
* thread is interrupted.
*
* @return <code>true</code> if data was received, otherwise <code>false</code>
@ -420,7 +420,7 @@ public class InBandBytestreamSession implements BytestreamSession {
}
/**
* This method sets the close flag and removes the data packet listener.
* This method sets the close flag and removes the data stanza(/packet) listener.
*/
private void closeInternal() {
if (isClosed) {
@ -494,7 +494,7 @@ public class InBandBytestreamSession implements BytestreamSession {
protected StanzaFilter getDataPacketFilter() {
/*
* filter all IQ stanzas having type 'SET' (represented by Data class), containing a
* data packet extension, matching session ID and recipient
* data stanza(/packet) extension, matching session ID and recipient
*/
return new AndFilter(new StanzaTypeFilter(Data.class), new IBBDataPacketFilter());
}
@ -540,7 +540,7 @@ public class InBandBytestreamSession implements BytestreamSession {
@Override
protected StanzaFilter getDataPacketFilter() {
/*
* filter all message stanzas containing a data packet extension, matching session ID
* filter all message stanzas containing a data stanza(/packet) extension, matching session ID
* and recipient
*/
return new AndFilter(new StanzaTypeFilter(Message.class), new IBBDataPacketFilter());
@ -550,7 +550,7 @@ public class InBandBytestreamSession implements BytestreamSession {
/**
* IBBDataPacketFilter class filters all packets from the remote peer of this session,
* containing an In-Band Bytestream data packet extension whose session ID matches this sessions
* containing an In-Band Bytestream data stanza(/packet) extension whose session ID matches this sessions
* ID.
*/
private class IBBDataPacketFilter implements StanzaFilter {
@ -610,7 +610,7 @@ public class InBandBytestreamSession implements BytestreamSession {
}
/**
* Writes the given data packet to the XMPP stream.
* Writes the given data stanza(/packet) to the XMPP stream.
*
* @param data the data packet
* @throws IOException if an I/O error occurred while sending or if the stream is closed

View file

@ -32,7 +32,7 @@ public class Data extends IQ {
/**
* Constructor.
*
* @param data data packet extension containing the encoded data
* @param data data stanza(/packet) extension containing the encoded data
*/
public Data(DataPacketExtension data) {
super(DataPacketExtension.ELEMENT, DataPacketExtension.NAMESPACE);
@ -45,9 +45,9 @@ public class Data extends IQ {
}
/**
* Returns the data packet extension.
* Returns the data stanza(/packet) extension.
*
* @return the data packet extension
* @return the data stanza(/packet) extension
*/
public DataPacketExtension getDataPacketExtension() {
return this.dataPacketExtension;

View file

@ -30,7 +30,7 @@ import org.jivesoftware.smack.util.stringencoder.Base64;
public class DataPacketExtension implements ExtensionElement {
/**
* The element name of the data packet extension.
* The element name of the data stanza(/packet) extension.
*/
public final static String ELEMENT = "data";
@ -54,7 +54,7 @@ public class DataPacketExtension implements ExtensionElement {
* Creates a new In-Band Bytestream data packet.
*
* @param sessionID unique session ID identifying this In-Band Bytestream
* @param seq sequence of this packet in regard to the other data packets
* @param seq sequence of this stanza(/packet) in regard to the other data packets
* @param data the base64 encoded data contained in this packet
*/
public DataPacketExtension(String sessionID, long seq, String data) {
@ -82,9 +82,9 @@ public class DataPacketExtension implements ExtensionElement {
}
/**
* Returns the sequence of this packet in regard to the other data packets.
* Returns the sequence of this stanza(/packet) in regard to the other data packets.
*
* @return the sequence of this packet in regard to the other data packets.
* @return the sequence of this stanza(/packet) in regard to the other data packets.
*/
public long getSeq() {
return seq;

View file

@ -24,7 +24,7 @@ import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
* Parses an In-Band Bytestream data packet which can be a packet extension of
* Parses an In-Band Bytestream data stanza(/packet) which can be a stanza(/packet) extension of
* either an IQ stanza or a message stanza.
*
* @author Henning Staib

View file

@ -268,7 +268,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
* to the initiator.
* <p>
* This method should be used if you are awaiting a SOCKS5 Bytestream request as a reply to
* another packet (e.g. file transfer).
* another stanza(/packet) (e.g. file transfer).
*
* @param sessionID to be ignored
*/
@ -621,10 +621,10 @@ public final class Socks5BytestreamManager implements BytestreamManager {
}
/**
* Returns a IQ packet to query a SOCKS5 proxy its network settings.
* Returns a IQ stanza(/packet) to query a SOCKS5 proxy its network settings.
*
* @param proxy the proxy to query
* @return IQ packet to query a SOCKS5 proxy its network settings
* @return IQ stanza(/packet) to query a SOCKS5 proxy its network settings
*/
private static Bytestream createStreamHostRequest(Jid proxy) {
Bytestream request = new Bytestream();
@ -673,7 +673,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
}
/**
* Returns a SOCKS5 Bytestream initialization request packet with the given session ID
* Returns a SOCKS5 Bytestream initialization request stanza(/packet) with the given session ID
* containing the given stream hosts for the given target JID.
*
* @param sessionID the session ID for the SOCKS5 Bytestream
@ -703,7 +703,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
* Specified in XEP-65 5.3.1 (Example 13)
* </p>
*
* @param packet Packet that should be answered with a not-acceptable error
* @param packet Stanza(/Packet) that should be answered with a not-acceptable error
* @throws NotConnectedException
* @throws InterruptedException
*/

View file

@ -101,7 +101,7 @@ class Socks5ClientForInitiator extends Socks5Client {
}
/**
* Activates the SOCKS5 Bytestream by sending an XMPP SOCKS5 Bytestream activation packet to the
* Activates the SOCKS5 Bytestream by sending an XMPP SOCKS5 Bytestream activation stanza(/packet) to the
* SOCKS5 proxy.
* @throws XMPPErrorException
* @throws NoResponseException

View file

@ -26,7 +26,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jxmpp.jid.Jid;
/**
* A packet representing part of a SOCKS5 Bytestream negotiation.
* A stanza(/packet) representing part of a SOCKS5 Bytestream negotiation.
*
* @author Alexander Wenckus
*/
@ -199,10 +199,10 @@ public class Bytestream extends IQ {
}
/**
* Returns the activate element of the packet sent to the proxy host to verify the identity of
* Returns the activate element of the stanza(/packet) sent to the proxy host to verify the identity of
* the initiator and match them to the appropriate stream.
*
* @return Returns the activate element of the packet sent to the proxy host to verify the
* @return Returns the activate element of the stanza(/packet) sent to the proxy host to verify the
* identity of the initiator and match them to the appropriate stream.
*/
public Activate getToActivate() {
@ -210,7 +210,7 @@ public class Bytestream extends IQ {
}
/**
* Upon the response from the target of the used host the activate packet is sent to the SOCKS5
* Upon the response from the target of the used host the activate stanza(/packet) is sent to the SOCKS5
* proxy. The proxy will activate the stream or return an error after verifying the identity of
* the initiator, using the activate packet.
*
@ -257,7 +257,7 @@ public class Bytestream extends IQ {
}
/**
* Packet extension that represents a potential SOCKS5 proxy for the file transfer. Stream hosts
* Stanza(/Packet) extension that represents a potential SOCKS5 proxy for the file transfer. Stream hosts
* are forwarded to the target of the file transfer who then chooses and connects to one.
*
* @author Alexander Wenckus
@ -336,7 +336,7 @@ public class Bytestream extends IQ {
/**
* After selected a SOCKS5 stream host and successfully connecting, the target of the file
* transfer returns a byte stream packet with the stream host used extension.
* transfer returns a byte stream stanza(/packet) with the stream host used extension.
*
* @author Alexander Wenckus
*/
@ -378,7 +378,7 @@ public class Bytestream extends IQ {
}
/**
* The packet sent by the stream initiator to the stream proxy to activate the connection.
* The stanza(/packet) sent by the stream initiator to the stream proxy to activate the connection.
*
* @author Alexander Wenckus
*/