public class GuestBuilder
extends java.lang.Object
Constructor and Description |
---|
GuestBuilder(User theOwner) |
Modifier and Type | Method and Description |
---|---|
GuestBuilder |
asFullyVirtGuest() |
GuestBuilder |
asParaVirtGuest() |
VirtualInstance |
build()
This is the final step in building or compiling a guest.
|
GuestBuilder |
createGuest()
Creates a guest with a random uuid and an associated registered virtual
system.
|
GuestBuilder |
createUnregisteredGuest()
Creates a guest with a random uuid.
|
GuestBuilder |
inCrashedState() |
GuestBuilder |
inPausedState() |
GuestBuilder |
inRunningState() |
GuestBuilder |
inStoppedState() |
GuestBuilder |
withCPUs(java.lang.Integer numberOfCPUs) |
GuestBuilder |
withName(java.lang.String name) |
GuestBuilder |
withNonVirtHost()
Creates the host for the guest under construction.
|
GuestBuilder |
withNonVirtHostInAnotherOrg()
Creates a host for the guest under construction.
|
GuestBuilder |
withPersistence()
Tells the builder that the guest under construction should be persisted
to the database.
|
GuestBuilder |
withTotalMemory(java.lang.Long memory) |
GuestBuilder |
withVirtHost()
Creates the host for the guest under construction.
|
GuestBuilder |
withVirtHostInAnotherOrg() |
public GuestBuilder(User theOwner)
public VirtualInstance build() throws GuestBuilderException
build
successive times will simply return
null
. One of the create methods must be called
before every invocation of this method.GuestBuilderException
- if the guest is not registered and has no
host.public GuestBuilder createUnregisteredGuest()
build()
.public GuestBuilder createGuest() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic GuestBuilder withPersistence()
public GuestBuilder withNonVirtHost() throws java.lang.Exception
java.lang.Exception
- if an error occurs.public GuestBuilder withVirtHost() throws java.lang.Exception
java.lang.Exception
- if an error occurs.public GuestBuilder withNonVirtHostInAnotherOrg() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic GuestBuilder withVirtHostInAnotherOrg() throws java.lang.Exception
java.lang.Exception
public GuestBuilder asParaVirtGuest()
public GuestBuilder asFullyVirtGuest()
public GuestBuilder withName(java.lang.String name)
public GuestBuilder withTotalMemory(java.lang.Long memory)
public GuestBuilder withCPUs(java.lang.Integer numberOfCPUs)
public GuestBuilder inRunningState()
public GuestBuilder inStoppedState()
public GuestBuilder inPausedState()
public GuestBuilder inCrashedState()