Package com.io7m.waxmill.machines
Class WXMDeviceFramebuffer
java.lang.Object
com.io7m.waxmill.machines.WXMDeviceFramebuffer
- All Implemented Interfaces:
WXMDeviceType,WXMDeviceType.WXMDeviceFramebufferType
public final class WXMDeviceFramebuffer extends java.lang.Object implements WXMDeviceType.WXMDeviceFramebufferType
A raw framebuffer device attached to a VNC server.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMDeviceFramebuffer.BuilderBuilds instances of typeWXMDeviceFramebuffer.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType
WXMDeviceType.Kind, WXMDeviceType.WXMDeviceAHCIDiskType, WXMDeviceType.WXMDeviceAHCIOpticalDiskType, WXMDeviceType.WXMDeviceE1000Type, WXMDeviceType.WXMDeviceFramebufferType, WXMDeviceType.WXMDeviceHostBridgeType, WXMDeviceType.WXMDeviceLPCType, WXMDeviceType.WXMDeviceNetworkType, WXMDeviceType.WXMDevicePassthruType, WXMDeviceType.WXMDeviceVirtioBlockStorageType, WXMDeviceType.WXMDeviceVirtioNetworkType, WXMDeviceType.WXMLPCTTYNames, WXMDeviceType.WXMSectorSizesType, WXMDeviceType.WXMStorageBackendFileType, WXMDeviceType.WXMStorageBackendType, WXMDeviceType.WXMStorageBackendZFSVolumeType, WXMDeviceType.WXMTTYBackendFileType, WXMDeviceType.WXMTTYBackendNMDMType, WXMDeviceType.WXMTTYBackendStdioType, WXMDeviceType.WXMTTYBackendTypeNested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceFramebufferType
WXMDeviceType.WXMDeviceFramebufferType.WXMVGAConfiguration -
Method Summary
Modifier and Type Method Description static WXMDeviceFramebuffer.Builderbuilder()Creates a builder forWXMDeviceFramebuffer.java.lang.Stringcomment()static WXMDeviceFramebuffercopyOf(WXMDeviceType.WXMDeviceFramebufferType instance)Creates an immutable copy of aWXMDeviceType.WXMDeviceFramebufferTypevalue.WXMDeviceSlotdeviceSlot()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMDeviceFramebufferthat have equal attribute values.inthashCode()Computes a hash code from attributes:comment,deviceSlot,listenAddress,listenPort,width,height,vgaConfiguration,waitForVNC.intheight()java.net.InetAddresslistenAddress()intlistenPort()java.lang.StringtoString()Prints the immutable valueWXMDeviceFramebufferwith attribute values.WXMDeviceType.WXMDeviceFramebufferType.WXMVGAConfigurationvgaConfiguration()booleanwaitForVNC()intwidth()WXMDeviceFramebufferwithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMDeviceFramebufferwithDeviceSlot(WXMDeviceSlot value)Copy the current immutable object by setting a value for thedeviceSlotattribute.WXMDeviceFramebufferwithHeight(int value)Copy the current immutable object by setting a value for theheightattribute.WXMDeviceFramebufferwithListenAddress(java.net.InetAddress value)Copy the current immutable object by setting a value for thelistenAddressattribute.WXMDeviceFramebufferwithListenPort(int value)Copy the current immutable object by setting a value for thelistenPortattribute.WXMDeviceFramebufferwithVgaConfiguration(WXMDeviceType.WXMDeviceFramebufferType.WXMVGAConfiguration value)Copy the current immutable object by setting a value for thevgaConfigurationattribute.WXMDeviceFramebufferwithWaitForVNC(boolean value)Copy the current immutable object by setting a value for thewaitForVNCattribute.WXMDeviceFramebufferwithWidth(int value)Copy the current immutable object by setting a value for thewidthattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.waxmill.machines.WXMDeviceType
isConsoleDevice, isStorageDeviceMethods inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceFramebufferType
externalName, kind
-
Method Details
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMDeviceType- Specified by:
commentin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- The value of the
commentattribute
-
deviceSlot
- Specified by:
deviceSlotin interfaceWXMDeviceType- Specified by:
deviceSlotin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- The value of the
deviceSlotattribute
-
listenAddress
public java.net.InetAddress listenAddress()- Specified by:
listenAddressin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- The IP address upon which the VNC server will listen
-
listenPort
public int listenPort()- Specified by:
listenPortin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- The port upon which the VNC server will listen
-
width
public int width()- Specified by:
widthin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- The width of the framebuffer
-
height
public int height()- Specified by:
heightin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- The height of the framebuffer
-
vgaConfiguration
- Specified by:
vgaConfigurationin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- The guest VGA configuration used
-
waitForVNC
public boolean waitForVNC()- Specified by:
waitForVNCin interfaceWXMDeviceType.WXMDeviceFramebufferType- Returns:
- Delay booting until a VNC connection has arrived
-
withComment
Copy the current immutable object by setting a value for thecommentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for comment- Returns:
- A modified copy of the
thisobject
-
withDeviceSlot
Copy the current immutable object by setting a value for thedeviceSlotattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deviceSlot- Returns:
- A modified copy of the
thisobject
-
withListenAddress
Copy the current immutable object by setting a value for thelistenAddressattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for listenAddress- Returns:
- A modified copy of the
thisobject
-
withListenPort
Copy the current immutable object by setting a value for thelistenPortattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for listenPort- Returns:
- A modified copy of the
thisobject
-
withWidth
Copy the current immutable object by setting a value for thewidthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for width- Returns:
- A modified copy of the
thisobject
-
withHeight
Copy the current immutable object by setting a value for theheightattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for height- Returns:
- A modified copy of the
thisobject
-
withVgaConfiguration
public final WXMDeviceFramebuffer withVgaConfiguration(WXMDeviceType.WXMDeviceFramebufferType.WXMVGAConfiguration value)Copy the current immutable object by setting a value for thevgaConfigurationattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for vgaConfiguration- Returns:
- A modified copy of the
thisobject
-
withWaitForVNC
Copy the current immutable object by setting a value for thewaitForVNCattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for waitForVNC- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMDeviceFramebufferthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:comment,deviceSlot,listenAddress,listenPort,width,height,vgaConfiguration,waitForVNC.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMDeviceFramebufferwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aWXMDeviceType.WXMDeviceFramebufferTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable WXMDeviceFramebuffer instance
-
builder
Creates a builder forWXMDeviceFramebuffer.WXMDeviceFramebuffer.builder() .setComment(String) // optionalcomment.setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // requireddeviceSlot.setListenAddress(java.net.InetAddress) // requiredlistenAddress.setListenPort(int) // requiredlistenPort.setWidth(int) // optionalwidth.setHeight(int) // optionalheight.setVgaConfiguration(com.io7m.waxmill.machines.WXMDeviceType.WXMDeviceFramebufferType.WXMVGAConfiguration) // optionalvgaConfiguration.setWaitForVNC(boolean) // requiredwaitForVNC.build();- Returns:
- A new WXMDeviceFramebuffer builder
-