code: private synchronized void getRegistrationInfo() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          Registration reg = new Registration();
          reg.setTo(connection().getXMPPServiceDomain());
          info = createStanzaCollectorAndSend(reg).nextResultOrThrow();
      }
docs: Gets the account registration info from the server.
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException
  
  @throws XMPPException if an error occurs.
  @throws SmackException if there was no response from the server.