net.java.dev.vcc.api
Interface Computer

All Superinterfaces:
ManagedObject<Computer>
All Known Implementing Classes:
AbstractComputer

public interface Computer
extends ManagedObject<Computer>

Represents a Virtual Computer.


Method Summary
 java.util.Set<Host> getAllowedHosts()
          Gets the hosts that this computer can be migrated to.
 java.util.concurrent.Future<Host> getFutureHost()
          If isHostChanging() is true then this method returns a Future for the Host that the computer is migrating to, otherwise this method will return a completed Future for the current Host.
 java.util.concurrent.Future<PowerState> getFutureState()
          If isStateChanging() is true then this method returns a Future for the state that the computer is transitioning into, otherwise this method will return a completed Future for the current state.
 Host getHost()
          Gets the host that this computer is currently attached to.
 java.util.Set<ComputerSnapshot> getSnapshots()
          Gets the snapshots of this computer that are currently available.
 PowerState getState()
          Gets the power state of this computer.
 boolean isHostChanging()
          Returns true if the host of this computer is currently changing.
 boolean isStateChanging()
          Returns true if the state of this computer is currently changing.
 
Methods inherited from interface net.java.dev.vcc.api.ManagedObject
execute, getCommands, getDescription, getId, getName
 

Method Detail

getHost

Host getHost()
Gets the host that this computer is currently attached to.

Returns:
the host that this computer is currently attached to.

isHostChanging

boolean isHostChanging()
Returns true if the host of this computer is currently changing.

Returns:
true if the host of this computer is currently changing.

getFutureHost

java.util.concurrent.Future<Host> getFutureHost()
If isHostChanging() is true then this method returns a Future for the Host that the computer is migrating to, otherwise this method will return a completed Future for the current Host. When the host is changing, the future will be completed when the host migration has completed, thus allowing a consumer of the API to be notified when a host migration has completed.

Returns:
Either a completed Future for the current host, or a Future that will complete when the computer has finished migrating to a new host.

getState

PowerState getState()
Gets the power state of this computer.

Returns:
the power state of this computer.

isStateChanging

boolean isStateChanging()
Returns true if the state of this computer is currently changing.

Returns:
true if the state of this computer is currently changing.

getFutureState

java.util.concurrent.Future<PowerState> getFutureState()
If isStateChanging() is true then this method returns a Future for the state that the computer is transitioning into, otherwise this method will return a completed Future for the current state. When the state is changing, the future will be completed when the state transition has completed, thus allowing a consumer of the API to be notified when a power state change has completed.

Returns:
Either a completed Future for the current state, or a Future that will complete when the state has finished changing.

getSnapshots

java.util.Set<ComputerSnapshot> getSnapshots()
Gets the snapshots of this computer that are currently available.

Returns:
the snapshots of this computer that are currently available.

getAllowedHosts

java.util.Set<Host> getAllowedHosts()
Gets the hosts that this computer can be migrated to.

Returns:
the hosts that this computer can be migrated to.


Copyright © 2009. All Rights Reserved.