Resourceful

public interface Resourceful

An interface to be implemented by a machine such as a Host or Vm, that provides a polymorphic way to access a given resource like Ram, Bandwidth, Storage or Pe from a List containing such different resources.

Author:Manoel Campos da Silva Filho

Methods

getResource

ResourceManageable getResource(Class<? extends ResourceManageable> resourceClass)

Gets a given Machine Resource, such as Ram or Bandwidth, from the List of machine resources.

Parameters:
  • resourceClass – the class of resource to get
Returns:

the Resource corresponding to the given class

getResources

List<ResourceManageable> getResources()

Gets a read-only list of resources the machine has.

Returns:a read-only list of resources

See also: .getResource(Class)