mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-13 06:21:08 +01:00
Expose InterruptedException
SMACK-632
This commit is contained in:
parent
43b99a2a85
commit
bc61527bd2
124 changed files with 977 additions and 597 deletions
|
|
@ -33,8 +33,9 @@ public class AMPDeliverCondition implements AMPExtension.Condition {
|
|||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return AMPManager.isConditionSupported(connection, NAME);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,9 @@ public class AMPExpireAtCondition implements AMPExtension.Condition {
|
|||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return AMPManager.isConditionSupported(connection, NAME);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,8 +86,9 @@ public class AMPManager {
|
|||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
String featureName = AMPExtension.NAMESPACE + "?action=" + action.toString();
|
||||
return isFeatureSupportedByServer(connection, featureName, AMPExtension.NAMESPACE);
|
||||
}
|
||||
|
|
@ -100,16 +101,17 @@ public class AMPManager {
|
|||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @see AMPDeliverCondition
|
||||
* @see AMPExpireAtCondition
|
||||
* @see AMPMatchResourceCondition
|
||||
*/
|
||||
public static boolean isConditionSupported(XMPPConnection connection, String conditionName) throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
public static boolean isConditionSupported(XMPPConnection connection, String conditionName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
String featureName = AMPExtension.NAMESPACE + "?condition=" + conditionName;
|
||||
return isFeatureSupportedByServer(connection, featureName, AMPExtension.NAMESPACE);
|
||||
}
|
||||
|
||||
private static boolean isFeatureSupportedByServer(XMPPConnection connection, String featureName, String node) throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
private static boolean isFeatureSupportedByServer(XMPPConnection connection, String featureName, String node) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(node, featureName);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,9 @@ public class AMPMatchResourceCondition implements AMPExtension.Condition {
|
|||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
public static boolean isSupported(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return AMPManager.isConditionSupported(connection, NAME);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue