mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-18 17:01:08 +01:00
Globally 's;stanza(/packet);stanza;'
This commit is contained in:
parent
1d12be1644
commit
ad87243060
171 changed files with 911 additions and 599 deletions
|
|
@ -73,11 +73,11 @@ public class MultipleRecipientInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the received stanza(/packet) should not be replied. Use
|
||||
* Returns true if the received stanza should not be replied. Use
|
||||
* {@link MultipleRecipientManager#reply(org.jivesoftware.smack.XMPPConnection, org.jivesoftware.smack.packet.Message, org.jivesoftware.smack.packet.Message)}
|
||||
* to send replies.
|
||||
*
|
||||
* @return true if the received stanza(/packet) should not be replied.
|
||||
* @return true if the received stanza should not be replied.
|
||||
*/
|
||||
public boolean shouldNotReply() {
|
||||
return !extension.getAddressesOfType(MultipleAddresses.Type.noreply).isEmpty();
|
||||
|
|
|
|||
|
|
@ -49,14 +49,14 @@ import org.jxmpp.jid.Jid;
|
|||
public class MultipleRecipientManager {
|
||||
|
||||
/**
|
||||
* Sends the specified stanza(/packet) to the collection of specified recipients using the
|
||||
* Sends the specified stanza to the collection of specified recipients using the
|
||||
* specified connection. If the server has support for XEP-33 then only one
|
||||
* stanza(/packet) is going to be sent to the server with the multiple recipient instructions.
|
||||
* stanza is going to be sent to the server with the multiple recipient instructions.
|
||||
* However, if XEP-33 is not supported by the server then the client is going to send
|
||||
* the stanza(/packet) to each recipient.
|
||||
* the stanza to each recipient.
|
||||
*
|
||||
* @param connection the connection to use to send the packet.
|
||||
* @param packet the stanza(/packet) to send to the list of recipients.
|
||||
* @param packet the stanza to send to the list of recipients.
|
||||
* @param to the collection of JIDs to include in the TO list or <tt>null</tt> if no TO
|
||||
* list exists.
|
||||
* @param cc the collection of JIDs to include in the CC list or <tt>null</tt> if no CC
|
||||
|
|
@ -77,13 +77,13 @@ public class MultipleRecipientManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sends the specified stanza(/packet) to the collection of specified recipients using the specified
|
||||
* connection. If the server has support for XEP-33 then only one stanza(/packet) is going to be sent to
|
||||
* Sends the specified stanza to the collection of specified recipients using the specified
|
||||
* connection. If the server has support for XEP-33 then only one stanza is going to be sent to
|
||||
* the server with the multiple recipient instructions. However, if XEP-33 is not supported by
|
||||
* the server then the client is going to send the stanza(/packet) to each recipient.
|
||||
* the server then the client is going to send the stanza to each recipient.
|
||||
*
|
||||
* @param connection the connection to use to send the packet.
|
||||
* @param packet the stanza(/packet) to send to the list of recipients.
|
||||
* @param packet the stanza to send to the list of recipients.
|
||||
* @param to the collection of JIDs to include in the TO list or <tt>null</tt> if no TO list exists.
|
||||
* @param cc the collection of JIDs to include in the CC list or <tt>null</tt> if no CC list exists.
|
||||
* @param bcc the collection of JIDs to include in the BCC list or <tt>null</tt> if no BCC list
|
||||
|
|
@ -132,12 +132,12 @@ public class MultipleRecipientManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sends a reply to a previously received stanza(/packet) that was sent to multiple recipients. Before
|
||||
* Sends a reply to a previously received stanza that was sent to multiple recipients. Before
|
||||
* attempting to send the reply message some checks are performed. If any of those checks
|
||||
* fails, then an XMPPException is going to be thrown with the specific error detail.
|
||||
*
|
||||
* @param connection the connection to use to send the reply.
|
||||
* @param original the previously received stanza(/packet) that was sent to multiple recipients.
|
||||
* @param original the previously received stanza that was sent to multiple recipients.
|
||||
* @param reply the new message to send as a reply.
|
||||
* @throws SmackException
|
||||
* @throws XMPPErrorException
|
||||
|
|
@ -192,12 +192,12 @@ public class MultipleRecipientManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link MultipleRecipientInfo} contained in the specified stanza(/packet) or
|
||||
* Returns the {@link MultipleRecipientInfo} contained in the specified stanza or
|
||||
* <tt>null</tt> if none was found. Only packets sent to multiple recipients will
|
||||
* contain such information.
|
||||
*
|
||||
* @param packet the stanza(/packet) to check.
|
||||
* @return the MultipleRecipientInfo contained in the specified stanza(/packet) or <tt>null</tt>
|
||||
* @param packet the stanza to check.
|
||||
* @return the MultipleRecipientInfo contained in the specified stanza or <tt>null</tt>
|
||||
* if none was found.
|
||||
*/
|
||||
public static MultipleRecipientInfo getMultipleRecipientInfo(Stanza packet) {
|
||||
|
|
@ -289,8 +289,8 @@ public class MultipleRecipientManager {
|
|||
|
||||
/**
|
||||
* Stanza(/Packet) that holds the XML stanza to send. This class is useful when the same packet
|
||||
* is needed to be sent to different recipients. Since using the same stanza(/packet) is not possible
|
||||
* (i.e. cannot change the TO address of a queues stanza(/packet) to be sent) then this class was
|
||||
* is needed to be sent to different recipients. Since using the same stanza is not possible
|
||||
* (i.e. cannot change the TO address of a queues stanza to be sent) then this class was
|
||||
* created to keep the XML stanza to send.
|
||||
*/
|
||||
private static final class PacketCopy extends Stanza {
|
||||
|
|
@ -298,10 +298,10 @@ public class MultipleRecipientManager {
|
|||
private final CharSequence text;
|
||||
|
||||
/**
|
||||
* Create a copy of a stanza(/packet) with the text to send. The passed text must be a valid text to
|
||||
* Create a copy of a stanza with the text to send. The passed text must be a valid text to
|
||||
* send to the server, no validation will be done on the passed text.
|
||||
*
|
||||
* @param text the whole text of the stanza(/packet) to send
|
||||
* @param text the whole text of the stanza to send
|
||||
*/
|
||||
private PacketCopy(CharSequence text) {
|
||||
this.text = text;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
|
|||
import org.jxmpp.jid.Jid;
|
||||
|
||||
/**
|
||||
* Stanza(/Packet) extension that contains the list of addresses that a stanza(/packet) should be sent or was sent.
|
||||
* Stanza(/Packet) extension that contains the list of addresses that a stanza should be sent or was sent.
|
||||
*
|
||||
* @author Gaston Dombiak
|
||||
*/
|
||||
|
|
@ -56,14 +56,14 @@ public class MultipleAddresses implements ExtensionElement {
|
|||
private final List<Address> addresses = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Adds a new address to which the stanza(/packet) is going to be sent or was sent.
|
||||
* Adds a new address to which the stanza is going to be sent or was sent.
|
||||
*
|
||||
* @param type on of the static type (BCC, CC, NO_REPLY, REPLY_ROOM, etc.)
|
||||
* @param jid the JID address of the recipient.
|
||||
* @param node used to specify a sub-addressable unit at a particular JID, corresponding to
|
||||
* a Service Discovery node.
|
||||
* @param desc used to specify human-readable information for this address.
|
||||
* @param delivered true when the stanza(/packet) was already delivered to this address.
|
||||
* @param delivered true when the stanza was already delivered to this address.
|
||||
* @param uri used to specify an external system address, such as a sip:, sips:, or im: URI.
|
||||
*/
|
||||
public void addAddress(Type type, Jid jid, String node, String desc, boolean delivered,
|
||||
|
|
@ -80,7 +80,7 @@ public class MultipleAddresses implements ExtensionElement {
|
|||
}
|
||||
|
||||
/**
|
||||
* Indicate that the stanza(/packet) being sent should not be replied.
|
||||
* Indicate that the stanza being sent should not be replied.
|
||||
*/
|
||||
public void setNoReply() {
|
||||
// Create a new address with the specified configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue