1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 14:01:08 +01:00

Expose InterruptedException

SMACK-632
This commit is contained in:
Florian Schmaus 2015-02-14 09:43:44 +01:00
parent 43b99a2a85
commit bc61527bd2
124 changed files with 977 additions and 597 deletions

View file

@ -70,10 +70,11 @@ public class VCardManager extends Manager {
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @deprecated use {@link #isSupported(String)} instead.
*/
@Deprecated
public static boolean isSupported(String jid, XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException {
public static boolean isSupported(String jid, XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
return VCardManager.getInstanceFor(connection).isSupported(jid);
}
@ -89,8 +90,9 @@ public class VCardManager extends Manager {
* @throws XMPPErrorException thrown if there was an issue setting the VCard in the server.
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
*/
public void saveVCard(VCard vcard) throws NoResponseException, XMPPErrorException, NotConnectedException {
public void saveVCard(VCard vcard) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
vcard.setType(IQ.Type.set);
connection().createPacketCollectorAndSend(vcard).nextResultOrThrow();
}
@ -101,8 +103,9 @@ public class VCardManager extends Manager {
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public VCard loadVCard() throws NoResponseException, XMPPErrorException, NotConnectedException {
public VCard loadVCard() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
return loadVCard(null);
}
@ -112,8 +115,9 @@ public class VCardManager extends Manager {
* @throws XMPPErrorException
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
*/
public VCard loadVCard(String bareJid) throws NoResponseException, XMPPErrorException, NotConnectedException {
public VCard loadVCard(String bareJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
VCard vcardRequest = new VCard();
vcardRequest.setTo(bareJid);
VCard result = connection().createPacketCollectorAndSend(vcardRequest).nextResultOrThrow();
@ -128,8 +132,9 @@ public class VCardManager extends Manager {
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public boolean isSupported(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException {
public boolean isSupported(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, NAMESPACE);
}
}

View file

@ -523,10 +523,11 @@ public class VCard extends IQ {
* @throws XMPPErrorException thrown if there was an issue setting the VCard in the server.
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @deprecated use {@link VCardManager#saveVCard(VCard)} instead.
*/
@Deprecated
public void save(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException {
public void save(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
VCardManager.getInstanceFor(connection).saveVCard(this);
}
@ -536,10 +537,11 @@ public class VCard extends IQ {
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @deprecated use {@link VCardManager#loadVCard()} instead.
*/
@Deprecated
public void load(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException {
public void load(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
load(connection, null);
}
@ -548,10 +550,11 @@ public class VCard extends IQ {
* @throws XMPPErrorException
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @deprecated use {@link VCardManager#loadVCard(String)} instead.
*/
@Deprecated
public void load(XMPPConnection connection, String user) throws NoResponseException, XMPPErrorException, NotConnectedException {
public void load(XMPPConnection connection, String user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
VCard result = VCardManager.getInstanceFor(connection).loadVCard(user);
copyFieldsFrom(result);
}