All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.chrome.devtools.client.core.systeminfo.SystemInfo Maven / Gradle / Ivy

package com.hubspot.chrome.devtools.client.core.systeminfo;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hubspot.chrome.devtools.base.ChromeRequest;
import com.hubspot.chrome.devtools.base.ChromeSessionCore;
import java.util.concurrent.CompletableFuture;

/**
 * The SystemInfo domain defines methods and events for querying low-level system information.
 */
public final class SystemInfo {
  ChromeSessionCore chromeSession;

  ObjectMapper objectMapper;

  public SystemInfo(ChromeSessionCore chromeSession, ObjectMapper objectMapper) {
    this.chromeSession = chromeSession;
    this.objectMapper = objectMapper;
  }

  /**
   * Returns information about the system.
   */
  public GetInfoResult getInfo() {
    ChromeRequest chromeRequest = new ChromeRequest("SystemInfo.getInfo");
    return chromeSession.send(chromeRequest, new TypeReference(){});
  }

  /**
   * Returns information about the system.
   */
  public CompletableFuture getInfoAsync() {
    ChromeRequest chromeRequest = new ChromeRequest("SystemInfo.getInfo");
    return chromeSession.sendAsync(chromeRequest, new TypeReference(){});
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy