Home | History | Annotate | Download | only in smackx

Lines Matching refs:to

14  * Unless required by applicable law or agreed to in writing, software
38 * A MultipleRecipientManager allows to send packets to multiple recipients by making use of
40 * It also allows to send replies to packets that were sent to multiple recipients.
47 * Create a cache to hold the 100 most recently accessed elements for a period of
53 * Sends the specified packet to the list of specified recipients using the
55 * packet is going to be sent to the server with the multiple recipient instructions.
56 * However, if JEP-33 is not supported by the server then the client is going to send
57 * the packet to each recipient.
59 * @param connection the connection to use to send the packet.
60 * @param packet the packet to send to the list of recipients.
61 * @param to the list of JIDs to include in the TO list or <tt>null</tt> if no TO
63 * @param cc the list of JIDs to include in the CC list or <tt>null</tt> if no CC
65 * @param bcc the list of JIDs to include in the BCC list or <tt>null</tt> if no BCC
70 public static void send(Connection connection, Packet packet, List<String> to, List<String> cc, List<String> bcc)
72 send(connection, packet, to, cc, bcc, null, null, false);
76 * Sends the specified packet to the list of specified recipients using the
78 * packet is going to be sent to the server with the multiple recipient instructions.
79 * However, if JEP-33 is not supported by the server then the client is going to send
80 * the packet to each recipient.
82 * @param connection the connection to use to send the packet.
83 * @param packet the packet to send to the list of recipients.
84 * @param to the list of JIDs to include in the TO list or <tt>null</tt> if no TO
86 * @param cc the list of JIDs to include in the CC list or <tt>null</tt> if no CC
88 * @param bcc the list of JIDs to include in the BCC list or <tt>null</tt> if no BCC
90 * @param replyTo address to which all replies are requested to be sent or <tt>null</tt>
91 * indicating that they can reply to any address.
92 * @param replyRoom JID of a MUC room to which responses should be sent or <tt>null</tt>
93 * indicating that they can reply to any address.
94 * @param noReply true means that receivers should not reply to the message.
98 public static void send(Connection connection, Packet packet, List<String> to, List<String> cc, List<String> bcc,
102 // Send packet to target users using multiple recipient service provided by the server
103 sendThroughService(connection, packet, to, cc, bcc, replyTo, replyRoom, noReply,
107 // Server does not support JEP-33 so try to send the packet to each recipient
114 // Send the packet to each individual recipient
115 sendToIndividualRecipients(connection, packet, to, cc, bcc);
120 * Sends a reply to a previously received packet that was sent to multiple recipients. Before
121 * attempting to send the reply message some checkings are performed. If any of those checkings
122 * fail then an XMPPException is going to be thrown with the specific error detail.
124 * @param connection the connection to use to send the reply.
125 * @param original the previously received packet that was sent to multiple recipients.
126 * @param reply the new message to send as a reply.
127 * @throws XMPPException if the original message was not sent to multiple recipients, or the
128 * original message cannot be replied or reply should be sent to a room.
148 // Send reply to the reply_to address
153 // Send reply to multiple recipients
154 List<String> to = new ArrayList<String>();
158 to.add(jid);
164 // Add original sender as a 'to' address (if not already present)
165 if (!to.contains(original.getFrom()) && !cc.contains(original.getFrom())) {
166 to.add(original.getFrom());
168 // Remove the sender from the TO/CC list (try with bare JID too)
170 if (!to.remove(from) && !cc.remove(from)) {
172 to.remove(bareJID);
178 // Send packet to target users using multiple recipient service provided by the server
179 sendThroughService(connection, reply, to, cc, null, null, null, false,
183 // Server does not support JEP-33 so try to send the packet to each recipient
184 sendToIndividualRecipients(connection, reply, to, cc, null);
191 * <tt>null</tt> if none was found. Only packets sent to multiple recipients will
194 * @param packet the packet to check.
205 List<String> to, List<String> cc, List<String> bcc) {
206 if (to != null) {
207 for (Iterator<String> it = to.iterator(); it.hasNext();) {
229 private static void sendThroughService(Connection connection, Packet packet, List<String> to,
234 if (to != null) {
235 for (Iterator<String> it = to.iterator(); it.hasNext();) {
237 multipleAddresses.addAddress(MultipleAddresses.TO, jid, null, null, false, null);
267 // Add extension to packet
274 * Returns the address of the multiple recipients service. To obtain such address service
275 * discovery is going to be used on the connected server and if none was found then another
276 * attempt will be tried on the server items. The discovered information is going to be
279 * @param connection the connection to use for disco. The connected server is going to be
291 // Send the disco packet to the server itself
300 // Get the disco items and send the disco packet to each server item
328 * Packet that holds the XML stanza to send. This class is useful when the same packet
329 * is needed to be sent to different recipients. Since using the same packet is not possible
330 * (i.e. cannot change the TO address of a queues packet to be sent) then this class was
331 * created to keep the XML stanza to send.
338 * Create a copy of a packet with the text to send. The passed text must be a valid text to
339 * send to
341 * @param text the whole text of the packet to send