mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Expose InterruptedException
SMACK-632
This commit is contained in:
parent
43b99a2a85
commit
bc61527bd2
124 changed files with 977 additions and 597 deletions
|
@ -102,8 +102,9 @@ public class CarbonManager extends Manager {
|
|||
* @throws NotConnectedException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public boolean isSupportedByServer() throws NoResponseException, XMPPErrorException, NotConnectedException {
|
||||
public boolean isSupportedByServer() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return ServiceDiscoveryManager.getInstanceFor(connection()).serverSupportsFeature(CarbonExtension.NAMESPACE);
|
||||
}
|
||||
|
||||
|
@ -115,8 +116,9 @@ public class CarbonManager extends Manager {
|
|||
*
|
||||
* @param new_state whether carbons should be enabled or disabled
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void sendCarbonsEnabled(final boolean new_state) throws NotConnectedException {
|
||||
public void sendCarbonsEnabled(final boolean new_state) throws NotConnectedException, InterruptedException {
|
||||
IQ setIQ = carbonsEnabledIQ(new_state);
|
||||
|
||||
connection().sendIqWithResponseCallback(setIQ, new PacketListener() {
|
||||
|
@ -137,10 +139,11 @@ public class CarbonManager extends Manager {
|
|||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*
|
||||
*/
|
||||
public synchronized void setCarbonsEnabled(final boolean new_state) throws NoResponseException,
|
||||
XMPPErrorException, NotConnectedException {
|
||||
XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
if (enabled_state == new_state)
|
||||
return;
|
||||
|
||||
|
@ -155,8 +158,9 @@ public class CarbonManager extends Manager {
|
|||
*
|
||||
* @throws XMPPException
|
||||
* @throws SmackException if there was no response from the server.
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void enableCarbons() throws XMPPException, SmackException {
|
||||
public void enableCarbons() throws XMPPException, SmackException, InterruptedException {
|
||||
setCarbonsEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -165,8 +169,9 @@ public class CarbonManager extends Manager {
|
|||
*
|
||||
* @throws XMPPException
|
||||
* @throws SmackException if there was no response from the server.
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public void disableCarbons() throws XMPPException, SmackException {
|
||||
public void disableCarbons() throws XMPPException, SmackException, InterruptedException {
|
||||
setCarbonsEnabled(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,12 +27,12 @@ import org.jivesoftware.smackx.csi.packet.ClientStateIndication;
|
|||
*/
|
||||
public class ClientStateIndicationManager {
|
||||
|
||||
public static void active(XMPPConnection connection) throws NotConnectedException {
|
||||
public static void active(XMPPConnection connection) throws NotConnectedException, InterruptedException {
|
||||
throwIaeIfNotSupported(connection);
|
||||
connection.send(ClientStateIndication.Active.INSTANCE);
|
||||
}
|
||||
|
||||
public static void inactive(XMPPConnection connection) throws NotConnectedException {
|
||||
public static void inactive(XMPPConnection connection) throws NotConnectedException, InterruptedException {
|
||||
throwIaeIfNotSupported(connection);
|
||||
connection.send(ClientStateIndication.Inactive.INSTANCE);
|
||||
}
|
||||
|
|
|
@ -56,8 +56,9 @@ public class HOXTManager {
|
|||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
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 ServiceDiscoveryManager.getInstanceFor(connection).supportsFeature(jid, NAMESPACE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue