Tabnine Logo
SystemInfoFactory.createSystemInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
createSystemInfo
method
in
org.rhq.core.system.SystemInfoFactory

Best Java code snippets using org.rhq.core.system.SystemInfoFactory.createSystemInfo (Showing top 13 results out of 315)

origin: org.rhq/rhq-core-plugin-container

private List<ProcessInfo> getProcessInfos() {
  SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
  log.debug("Retrieving process table...");
  long startTime = System.currentTimeMillis();
  List<ProcessInfo> processInfos = null;
  try {
    processInfos = systemInfo.getAllProcesses();
  } catch (UnsupportedOperationException uoe) {
    log.debug("Cannot perform process scan - not supported on this platform. (" + systemInfo.getClass() + ")");
  }
  long elapsedTime = System.currentTimeMillis() - startTime;
  if (log.isDebugEnabled()) {
    log.debug("Retrieval of process table took " + elapsedTime + " ms.");
  }
  return processInfos;
}
origin: org.rhq/rhq-core-plugin-container

private PluginContext createPluginContext(String pluginName) {
  SystemInfo sysInfo = SystemInfoFactory.createSystemInfo();
  File dataDir = new File(pluginContainerConfiguration.getDataDirectory(), pluginName);
  File tmpDir = pluginContainerConfiguration.getTemporaryDirectory();
  String pcName = pluginContainerConfiguration.getContainerName();
  PluginContext context = new PluginContext(pluginName, sysInfo, tmpDir, dataDir, pcName);
  return context;
}
origin: org.rhq/rhq-cassandra-ccm-core

private ProcessExecutionResults startNode(File basedir) {
  if (log.isDebugEnabled()) {
    log.debug("Starting node at " + basedir);
  }
  File binDir = new File(basedir, "bin");
  File startScript;
  SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
  ProcessExecution startScriptExe;
  if (systemInfo.getOperatingSystemType() == OperatingSystemType.WINDOWS) {
    startScript = new File(binDir, "cassandra.bat");
    startScriptExe = createProcessExecution(null, startScript);
  } else {
    startScript = new File(binDir, "cassandra");
    startScriptExe = createProcessExecution(null, startScript);
    startScriptExe.addArguments(Arrays.asList("-p", "cassandra.pid"));
  }
  startScriptExe.setWaitForCompletion(0);
  ProcessExecutionResults results = systemInfo.executeProcess(startScriptExe);
  if (log.isDebugEnabled()) {
    log.debug(startScript + " returned with exit code [" + results.getExitCode() + "]");
  }
  return results;
}
origin: org.rhq/rhq-cassandra-ccm-core

SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
origin: org.rhq/rhq-core-native-system

public static TemplateEngine fetchTemplateEngine() {
    SystemInfo systemInfo = createSystemInfo();
origin: rhq-project/rhq

public static TemplateEngine fetchTemplateEngine() {
    SystemInfo systemInfo = createSystemInfo();
origin: org.rhq/rhq-core-plugin-api

SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
origin: org.rhq/rhq-core-plugin-container

SystemInfo systemInfo = SystemInfoFactory.createSystemInfo();
PluginMetadataManager metadataManager = pluginManager.getMetadataManager();
Set<ResourceType> platformTypes = metadataManager.getTypesForCategory(ResourceCategory.PLATFORM);
origin: org.rhq/rhq-core-plugin-container

try {
  ResourceDiscoveryContext context = new ResourceDiscoveryContext(resourceType, parentComponent,
    parentResourceContext, SystemInfoFactory.createSystemInfo(), processScanResults,
    Collections.EMPTY_LIST, this.configuration.getContainerName(),
    this.configuration.getPluginContainerDeployment());
origin: org.rhq/rhq-core-plugin-container

public <T extends ResourceComponent<?>> ResourceUpgradeContext<T> createResourceUpgradeContext(Resource resource,
  ResourceContext<?> parentResourceContext, T parentComponent, ResourceDiscoveryComponent<T> discoveryComponent) {
  return new ResourceUpgradeContext<T>(resource, // the resource itself
    parentResourceContext, //the context of its parent resource
    parentComponent, // its parent component
    discoveryComponent, // the discovery component (this is actually the proxy to it)
    SystemInfoFactory.createSystemInfo(), // for native access
    this.configuration.getTemporaryDirectory(), // location for plugin to write temp files
    this.configuration.getDataDirectory(), // base location for plugin to write data files
    this.configuration.getContainerName(), // the name of the agent/PC
    getEventContext(resource), // for event access
    getOperationContext(resource), // for operation manager access
    getContentContext(resource), // for content manager access
    getAvailabilityContext(resource), // for components that want avail manager access
    getInventoryContext(resource), this.configuration.getPluginContainerDeployment()); // helps components make determinations of what to do
}
origin: org.rhq/rhq-core-plugin-container

  SystemInfoFactory.createSystemInfo(), new ArrayList<ProcessScanResult>(0),
  new ArrayList<Configuration>(0), this.configuration.getContainerName(),
  this.configuration.getPluginContainerDeployment());
ResourceDiscoveryContext<ResourceComponent<?>> discoveryContext = new ResourceDiscoveryContext<ResourceComponent<?>>(
  resourceType, parentResourceComponent, parentResourceContainer.getResourceContext(),
  SystemInfoFactory.createSystemInfo(), new ArrayList<ProcessScanResult>(0), pluginConfigurations,
  this.configuration.getContainerName(), this.configuration.getPluginContainerDeployment());
origin: org.rhq/rhq-core-plugin-container

private <T extends ResourceComponent<?>> ResourceContext<T> createResourceContext(Resource resource,
  T parentComponent, ResourceContext<?> parentResourceContext, ResourceDiscoveryComponent<T> discoveryComponent) {
  return new ResourceContext<T>(resource, // the resource itself
    parentComponent, // its parent component
    parentResourceContext, //the resource context of the parent
    discoveryComponent, // the discovery component (this is actually the proxy to it)
    SystemInfoFactory.createSystemInfo(), // for native access
    this.configuration.getTemporaryDirectory(), // location for plugin to write temp files
    this.configuration.getDataDirectory(), // base location for plugin to write data files
    this.configuration.getContainerName(), // the name of the agent/PC
    getEventContext(resource), // for event access
    getOperationContext(resource), // for operation manager access
    getContentContext(resource), // for content manager access
    getAvailabilityContext(resource), getInventoryContext(resource),
    this.configuration.getPluginContainerDeployment(), // helps components make determinations of what to do
    new ComponentInvocationContextImpl());
}
origin: org.rhq/rhq-core-plugin-container

parentResourceContext, SystemInfoFactory.createSystemInfo(), null, null,
this.configuration.getContainerName(), this.configuration.getPluginContainerDeployment());
org.rhq.core.systemSystemInfoFactorycreateSystemInfo

Javadoc

Returns the appropriate SystemInfo implementation based on the platform/operating system the JVM is running on.

Popular methods of SystemInfoFactory

  • isNativeSystemInfoDisabled
    Returns true if this factory was told to #disableNativeSystemInfo() the native layer. This only indi
  • disableNativeSystemInfo
    This will tell the factory to not #createSystemInfo() any native objects and to not load the native
  • isNativeSystemInfoAvailable
    If there is a native library available for the JVM's platform/operating system, true is returned. I
  • isNativeSystemInfoInitialized
    This returns true iff the native libraries have actually been initialized. This will return false if
  • createJavaSystemInfo
    Under some circumstances, you may want to force this factory to provide a Java-only SystemInfoimplem
  • enableNativeSystemInfo
    This will allow the factory to load the native libraries and #createSystemInfo() native objects. Not
  • getNativeSystemInfoVersion
    If the native system is both #isNativeSystemInfoAvailable() and #isNativeSystemInfoDisabled(), this
  • initialize
    This will initialize the native layer, if applicable. If the native layer was already initialized, t
  • invokeApi
    In order for this class to not have any compile or load time dependencies on the SIGAR jar, use this

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • Menu (java.awt)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now