public class HostBuilder
extends java.lang.Object
Constructor and Description |
---|
HostBuilder(User theOwner) |
Modifier and Type | Method and Description |
---|---|
Server |
build()
This is the final step in building or compiling a host.
|
HostBuilder |
createNonVirtHost()
Creates a server without any of the virtualization entitlements.
|
HostBuilder |
createVirtHost()
Creates a Server with the Virtualization Host entitlement.
|
HostBuilder |
withGuests(int numberOfGuests)
Creates the specified number of guests for the host under construction.
|
HostBuilder |
withGuests(java.util.Map<User,java.lang.Integer> guests,
boolean register)
Creates the specified number of guests for the host under construction.
|
java.util.List<VirtualInstance> |
withOrphanedGuests(int numberOfGuests) |
HostBuilder |
withUnregisteredGuests(int numberOfGuests)
Creates the specified number of guests for the host under construction.
|
public HostBuilder(User theOwner)
public Server build()
The builder does not maintain a reference to a host once it is built; so, calling
build
successive times will simply return null
. One of the
create methods must be called before every invocation of this method.
public HostBuilder createVirtHost() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic HostBuilder createNonVirtHost() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic HostBuilder withGuests(int numberOfGuests) throws java.lang.Exception
numberOfGuests
- The number of guests to createjava.lang.Exception
- if an error occurspublic HostBuilder withUnregisteredGuests(int numberOfGuests) throws java.lang.Exception
numberOfGuests
- The number of guests to createjava.lang.Exception
- if an error occurspublic HostBuilder withGuests(java.util.Map<User,java.lang.Integer> guests, boolean register) throws java.lang.Exception
guests
- a map of users to the number of guests to create owned by that user.
This is useful when you want the guests to be in orgs different to
what the host .register
- should we registerjava.lang.Exception
- if an error occurspublic java.util.List<VirtualInstance> withOrphanedGuests(int numberOfGuests) throws java.lang.Exception
java.lang.Exception