com.sun.enterprise.registration.impl.environment
Class EnvironmentInformation

java.lang.Object
  extended by com.sun.enterprise.registration.impl.environment.EnvironmentInformation

public class EnvironmentInformation
extends java.lang.Object


Constructor Summary
EnvironmentInformation()
          No-arg constructor.
EnvironmentInformation(boolean collectEnvData)
          Constructor which either returns an empty environment or a populated environment from attempting to run system collection methods.
EnvironmentInformation(org.w3c.dom.Element e)
          Constructs an environment information object from information contained within the given Element object.
EnvironmentInformation(org.w3c.dom.Element e, boolean isAgent)
          Constructs an environment information object from information contained within the given Agent Element object.
EnvironmentInformation(java.lang.String hostname, java.lang.String hostId, java.lang.String osName, java.lang.String osVersion, java.lang.String osArchitecture, java.lang.String systemModel, java.lang.String systemManufacturer, java.lang.String cpuManufacturer, java.lang.String serialNumber, java.lang.String physmem, java.lang.String sockets, java.lang.String cores, java.lang.String virtcpus, java.lang.String cpuname, java.lang.String clockrate)
          Constructs an environment information object with the given fields.
EnvironmentInformation(SystemEnvironment se)
          Constructs an EnvironmentInformation object based on the SystemEnvironment object.
 
Method Summary
 java.lang.String getClockRate()
           
 java.lang.String getCores()
           
 java.lang.String getCpuManufacturer()
          Returns the cpuManufacturer.
 java.lang.String getCpuName()
           
 java.lang.String getHostId()
          Returns the hostId.
 java.lang.String getHostname()
          Returns the hostname.
 java.lang.String getOsArchitecture()
          Returns the osArchitecture.
 java.lang.String getOsName()
          Returns the osName.
 java.lang.String getOsVersion()
          Returns the osVersion.
 java.lang.String getPhysMem()
           
 java.lang.String getSerialNumber()
          Returns the serialNumber.
 java.lang.String getSockets()
           
 java.lang.String getSystemManufacturer()
          Returns the systemManufacturer.
 java.lang.String getSystemModel()
          Returns the systemModel.
 java.lang.String getVirtCpus()
           
static void main(java.lang.String[] args)
           
 void setClockRate(java.lang.String clockrate)
          Sets the clockrate
 void setCores(java.lang.String cores)
          Sets the cores
 void setCpuManufacturer(java.lang.String cpuManufacturer)
          Sets the cpu manufacturer.
 void setCpuName(java.lang.String cpuname)
          Sets the cpuname
 void setHostId(java.lang.String hostId)
          Sets the hostid.
 void setHostname(java.lang.String hostname)
          Sets the hostname.
 void setOsArchitecture(java.lang.String osArchitecture)
          Sets the os architecture.
 void setOsName(java.lang.String osName)
          Sets the os name.
 void setOsVersion(java.lang.String osVersion)
          Sets the os version.
 void setPhysMem(java.lang.String physmem)
          Sets the physmem
 void setSerialNumber(java.lang.String serialNumber)
          Sets the serial number.
 void setSockets(java.lang.String sockets)
          Sets the sockets
 void setSystemManufacturer(java.lang.String systemManufacturer)
          Sets the system manufacturer.
 void setSystemModel(java.lang.String systemModel)
          Sets the system model.
 void setVirtCpus(java.lang.String virtcpus)
          Sets the virtcpus
 java.lang.String toXMLString()
          Converts the environment information object into an XML format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentInformation

public EnvironmentInformation()
No-arg constructor. Does a best effort job of capturing the various environment information fields.


EnvironmentInformation

public EnvironmentInformation(SystemEnvironment se)
Constructs an EnvironmentInformation object based on the SystemEnvironment object.


EnvironmentInformation

public EnvironmentInformation(boolean collectEnvData)
Constructor which either returns an empty environment or a populated environment from attempting to run system collection methods. If you don't want any system collection calls run, pass false.


EnvironmentInformation

public EnvironmentInformation(org.w3c.dom.Element e)
Constructs an environment information object from information contained within the given Element object. Does not attempt to collect any information through system calls.


EnvironmentInformation

public EnvironmentInformation(org.w3c.dom.Element e,
                              boolean isAgent)
Constructs an environment information object from information contained within the given Agent Element object. Does not attempt to collect any information through system calls.


EnvironmentInformation

public EnvironmentInformation(java.lang.String hostname,
                              java.lang.String hostId,
                              java.lang.String osName,
                              java.lang.String osVersion,
                              java.lang.String osArchitecture,
                              java.lang.String systemModel,
                              java.lang.String systemManufacturer,
                              java.lang.String cpuManufacturer,
                              java.lang.String serialNumber,
                              java.lang.String physmem,
                              java.lang.String sockets,
                              java.lang.String cores,
                              java.lang.String virtcpus,
                              java.lang.String cpuname,
                              java.lang.String clockrate)
Constructs an environment information object with the given fields. Note that if any of the fields are null or empty, attempts will be made to fill them out with values obtained through system calls.

Method Detail

main

public static void main(java.lang.String[] args)

setHostname

public void setHostname(java.lang.String hostname)
Sets the hostname.

Parameters:
hostname - The hostname to set.

setOsName

public void setOsName(java.lang.String osName)
Sets the os name.

Parameters:
osName - The osName to set.

setOsVersion

public void setOsVersion(java.lang.String osVersion)
Sets the os version.

Parameters:
osVersion - The osVersion to set.

setPhysMem

public void setPhysMem(java.lang.String physmem)
Sets the physmem

Parameters:
physmem - The physmem to set.

setSockets

public void setSockets(java.lang.String sockets)
Sets the sockets

Parameters:
sockets - The sockets to set.

setCores

public void setCores(java.lang.String cores)
Sets the cores

Parameters:
cores - The cores to set.

setVirtCpus

public void setVirtCpus(java.lang.String virtcpus)
Sets the virtcpus

Parameters:
virtcpus - The virtcpus to set.

setCpuName

public void setCpuName(java.lang.String cpuname)
Sets the cpuname

Parameters:
cpuname - The cpuname to set.

setClockRate

public void setClockRate(java.lang.String clockrate)
Sets the clockrate

Parameters:
clockrate - The clockrate to set.

setOsArchitecture

public void setOsArchitecture(java.lang.String osArchitecture)
Sets the os architecture.

Parameters:
osArchitecture - The osArchitecture to set.

setSystemModel

public void setSystemModel(java.lang.String systemModel)
Sets the system model.

Parameters:
systemModel - The systemModel to set.

setSystemManufacturer

public void setSystemManufacturer(java.lang.String systemManufacturer)
Sets the system manufacturer.

Parameters:
systemManufacturer - The systemManufacturer to set.

setCpuManufacturer

public void setCpuManufacturer(java.lang.String cpuManufacturer)
Sets the cpu manufacturer.

Parameters:
cpuManufacturer - The cpuManufacturer to set.

setSerialNumber

public void setSerialNumber(java.lang.String serialNumber)
Sets the serial number.

Parameters:
serialNumber - The serialNumber to set.

setHostId

public void setHostId(java.lang.String hostId)
Sets the hostid. Truncates to a max length of 16 chars.

Parameters:
hostId - The hostid to set.

getHostname

public java.lang.String getHostname()
Returns the hostname.

Returns:
The hostname.

getOsName

public java.lang.String getOsName()
Returns the osName.

Returns:
The osName.

getOsVersion

public java.lang.String getOsVersion()
Returns the osVersion.

Returns:
The osVersion.

getOsArchitecture

public java.lang.String getOsArchitecture()
Returns the osArchitecture.

Returns:
The osArchitecture.

getSystemModel

public java.lang.String getSystemModel()
Returns the systemModel.

Returns:
The systemModel.

getSystemManufacturer

public java.lang.String getSystemManufacturer()
Returns the systemManufacturer.

Returns:
The systemManufacturer.

getSerialNumber

public java.lang.String getSerialNumber()
Returns the serialNumber.

Returns:
The serialNumber.

getHostId

public java.lang.String getHostId()
Returns the hostId.

Returns:
The hostId.

getCpuManufacturer

public java.lang.String getCpuManufacturer()
Returns the cpuManufacturer.

Returns:
The cpuManufacturer.

getPhysMem

public java.lang.String getPhysMem()

getSockets

public java.lang.String getSockets()

getCores

public java.lang.String getCores()

getVirtCpus

public java.lang.String getVirtCpus()

getCpuName

public java.lang.String getCpuName()

getClockRate

public java.lang.String getClockRate()

toXMLString

public java.lang.String toXMLString()
Converts the environment information object into an XML format.

Returns:
The XML string representing this object.


Copyright © 2012 GlassFish Community. All Rights Reserved.