code: protected final XMPPConnection getAuthenticatedConnectionOrThrow() throws NotLoggedInException {
          XMPPConnection connection = connection();
          if (!connection.isAuthenticated()) {
              throw new NotLoggedInException();
          }
          return connection;
      }
docs: Get the XMPPConnection of this Manager if it's authenticated, i.e. logged in. Otherwise throw a {@link NotLoggedInException}.
  
  @return the XMPPConnection of this Manager.
  @throws NotLoggedInException if the connection is not authenticated.