code: 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;
      }
docs: Notify server to change the carbons state. This method blocks
  some time until the server replies to the IQ and returns true on
  success.
  
  You should first check for support using isSupportedByServer().
  
  @param new_state whether carbons should be enabled or disabled
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException