public class MultipleRecipientManager extends Object
Constructor and Description |
---|
MultipleRecipientManager() |
Modifier and Type | Method and Description |
---|---|
static MultipleRecipientInfo |
getMultipleRecipientInfo(Packet packet)
Returns the
MultipleRecipientInfo contained in the specified packet or
null if none was found. |
static void |
reply(XMPPConnection connection,
Message original,
Message reply)
Sends a reply to a previously received packet that was sent to multiple recipients.
|
static void |
send(XMPPConnection connection,
Packet packet,
List<String> to,
List<String> cc,
List<String> bcc)
Sends the specified packet to the list of specified recipients using the
specified connection.
|
static void |
send(XMPPConnection connection,
Packet packet,
List<String> to,
List<String> cc,
List<String> bcc,
String replyTo,
String replyRoom,
boolean noReply)
Sends the specified packet to the list of specified recipients using the specified
connection.
|
public MultipleRecipientManager()
public static void send(XMPPConnection connection, Packet packet, List<String> to, List<String> cc, List<String> bcc) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.FeatureNotSupportedException, SmackException.NotConnectedException
connection
- the connection to use to send the packet.packet
- the packet to send to the list of recipients.to
- the list of JIDs to include in the TO list or null if no TO
list exists.cc
- the list of JIDs to include in the CC list or null if no CC
list exists.bcc
- the list of JIDs to include in the BCC list or null if no BCC
list exists.SmackException.FeatureNotSupportedException
- if special XEP-33 features where requested, but the
server does not support them.XMPPException.XMPPErrorException
- if server does not support XEP-33: Extended Stanza Addressing and
some XEP-33 specific features were requested.SmackException.NoResponseException
- if there was no response from the server.SmackException.NotConnectedException
public static void send(XMPPConnection connection, Packet packet, List<String> to, List<String> cc, List<String> bcc, String replyTo, String replyRoom, boolean noReply) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.FeatureNotSupportedException, SmackException.NotConnectedException
connection
- the connection to use to send the packet.packet
- the packet to send to the list of recipients.to
- the list of JIDs to include in the TO list or null if no TO list exists.cc
- the list of JIDs to include in the CC list or null if no CC list exists.bcc
- the list of JIDs to include in the BCC list or null if no BCC list
exists.replyTo
- address to which all replies are requested to be sent or null
indicating that they can reply to any address.replyRoom
- JID of a MUC room to which responses should be sent or null
indicating that they can reply to any address.noReply
- true means that receivers should not reply to the message.XMPPException.XMPPErrorException
- if server does not support XEP-33: Extended Stanza Addressing and
some XEP-33 specific features were requested.SmackException.NoResponseException
- if there was no response from the server.SmackException.FeatureNotSupportedException
- if special XEP-33 features where requested, but the
server does not support them.SmackException.NotConnectedException
public static void reply(XMPPConnection connection, Message original, Message reply) throws SmackException, XMPPException.XMPPErrorException
connection
- the connection to use to send the reply.original
- the previously received packet that was sent to multiple recipients.reply
- the new message to send as a reply.SmackException
XMPPException.XMPPErrorException
public static MultipleRecipientInfo getMultipleRecipientInfo(Packet packet)
MultipleRecipientInfo
contained in the specified packet or
null if none was found. Only packets sent to multiple recipients will
contain such information.packet
- the packet to check.