code: public static synchronized PingManager getInstanceFor(XMPPConnection connection) {
          PingManager pingManager = INSTANCES.get(connection);
          if (pingManager == null) {
              pingManager = new PingManager(connection);
              INSTANCES.put(connection, pingManager);
          }
          return pingManager;
      }
docs: Retrieves a {@link PingManager} for the specified {@link XMPPConnection}, creating one if it doesn't already
  exist.
  
  @param connection
  The connection the manager is attached to.
  @return The new or existing manager.