org.jclouds.compute.domain
Class OperatingSystem

java.lang.Object
  extended by org.jclouds.compute.domain.OperatingSystem
Direct Known Subclasses:
CIMOperatingSystem

@Beta
public class OperatingSystem
extends Object

Running Operating system

Author:
Adrian Cole

Nested Class Summary
static class OperatingSystem.Builder
           
 
Field Summary
protected  String arch
           
protected  String description
           
protected  OsFamily family
           
protected  boolean is64Bit
           
protected  String name
           
protected  String version
           
 
Constructor Summary
protected OperatingSystem()
           
  OperatingSystem(OsFamily family, String name, String version, String arch, String description, boolean is64Bit)
           
 
Method Summary
static OperatingSystem.Builder builder()
           
 boolean equals(Object obj)
           
 String getArch()
          architecture of the operating system; ex.
 String getDescription()
          description of the operating system; ex.
 OsFamily getFamily()
          Type of the operating system

generally, this is used to compare the means by which you use an operating system.

 String getName()
          name of the operating system; ex.
 String getVersion()
          version of the operating system; ex.
 int hashCode()
           
 boolean is64Bit()
           
 OperatingSystem.Builder toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

family

@Nullable
protected OsFamily family

name

@Nullable
protected String name

arch

@Nullable
protected String arch

version

@Nullable
protected String version

description

protected String description

is64Bit

protected boolean is64Bit
Constructor Detail

OperatingSystem

protected OperatingSystem()

OperatingSystem

public OperatingSystem(@Nullable
                       OsFamily family,
                       @Nullable
                       String name,
                       @Nullable
                       String version,
                       @Nullable
                       String arch,
                       String description,
                       boolean is64Bit)
Method Detail

builder

public static OperatingSystem.Builder builder()

getFamily

@Nullable
public OsFamily getFamily()
Type of the operating system

generally, this is used to compare the means by which you use an operating system. For example, to determine compatibility of a particular bootstrapping or package installation approach.


getName

@Nullable
public String getName()
name of the operating system; ex. Red Hat Enterprise Linux

note

While this looks similar to, and may in some cases be the same as the java system property os.name it isn't guaranteed to match a particular value. For example, this value could be derived from data parsed for a cloud api or the OVF CIM OSType enum value;

Returns:
operating system name or null if it couldn't be determined.

getArch

@Nullable
public String getArch()
architecture of the operating system; ex. x86_64

generally, this is used to decide whether an operating system will run certain binaries, for example, a 64bit JDK.

note

While this looks similar to, and may in some cases be the same as the java system property os.arch it isn't guaranteed to match a particular value. For example, this value could be derived from data parsed for a cloud api or the OVF CIM OSType enum value;

Returns:
operating system architecture or null if it couldn't be determined.

getVersion

@Nullable
public String getVersion()
version of the operating system; ex. 10.0.4

generally, this is used to compare versions of the same operating system name. It should be meaningful when sorted against, although this isn't necessary.

note

While this looks similar to, and may in some cases be the same as the java system property os.version it isn't guaranteed to match a particular value. For example, this value could be derived from data parsed for a cloud api or the OVF CIM OSType enum value;

Returns:
operating system version or null if it couldn't be determined.

getDescription

public String getDescription()
description of the operating system; ex. CentOS 32-bit,Other Linux (32-bit)

This is the only required field in the operating system object. In some implementations, it is this data that is used to parse the value of the name, version, and arch fields.

Returns:
operating system description

is64Bit

public boolean is64Bit()
Returns:
whether this operating system supports 64 bit computation.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toBuilder

public OperatingSystem.Builder toBuilder()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2011 jclouds. All Rights Reserved.