public synchronized void setCarbonsEnabled ( final boolean new_state ) throws NoResponseException , XMPPErrorException , NotConnectedException , InterruptedException { if ( enabled_state == new_state ) return ; IQ setIQ = carbonsEnabledIQ ( new_state ) ; connection ( ) . createStanzaCollectorAndSend ( setIQ ) . nextResultOrThrow ( ) ; enabled_state = new_state ; }
Notify server to change the carbons state . This method blocks some time until the server replies to the IQ and returns true on success .