java.lang.Object
org.jgrapes.core.internal.EventBase<List<GetVms.VmData>>
org.jgrapes.core.Event<List<GetVms.VmData>>
org.jdrupes.vmoperator.manager.events.GetVms
All Implemented Interfaces:
Future<List<GetVms.VmData>>, org.jgrapes.core.Associator, org.jgrapes.core.Eligible

public class GetVms extends org.jgrapes.core.Event<List<GetVms.VmData>>
Gets the known VMs’ definitions and channels.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Return tuple.

    Nested classes/interfaces inherited from interface java.util.concurrent.Future

    Future.State
  • Field Summary

    Fields inherited from class org.jgrapes.core.internal.EventBase

    completed, completionEvents, invokedFor
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Return only VmDefinitions that are accessible by the given user or roles.
    Return only VmDefinitions that are assigned from the given pool.
    Return only VmDefinitions that are assigned to the given user.
    Returns the pool filter criterion, if set.
    Returns the name filter criterion, if set.
    Returns the roles criterion.
    Returns the user filter criterion, if set.
    Returns the user filter criterion, if set.
    Return only the VMs with the given name.

    Methods inherited from class org.jgrapes.core.Event

    addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handled, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, resumeHandling, setAssociated, setChannels, setRequiresResult, setResult, stop, suspendHandling, suspendHandling, tieTo, toString

    Methods inherited from class org.jgrapes.core.internal.EventBase

    disableTracking, enqueued, firstResultAssigned, isTracked, onCompletion

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.jgrapes.core.Associator

    associated, associated, associated, associatedGet

    Methods inherited from interface java.util.concurrent.Future

    exceptionNow, resultNow, state
  • Constructor Details

  • Method Details

    • withName

      public GetVms withName(String name)
      Return only the VMs with the given name.
      Parameters:
      name - the name
      Returns:
      the returns the vms
    • accessibleFor

      public GetVms accessibleFor(String user, List<String> roles)
      Return only VmDefinitions that are accessible by the given user or roles.
      Parameters:
      user - the user
      roles - the roles
      Returns:
      the event
    • assignedFrom

      public GetVms assignedFrom(String pool)
      Return only VmDefinitions that are assigned from the given pool.
      Parameters:
      pool - the pool
      Returns:
      the returns the vms
    • assignedTo

      public GetVms assignedTo(String user)
      Return only VmDefinitions that are assigned to the given user.
      Parameters:
      user - the user
      Returns:
      the returns the vms
    • name

      public Optional<String> name()
      Returns the name filter criterion, if set.
      Returns:
      the optional
    • user

      public Optional<String> user()
      Returns the user filter criterion, if set.
      Returns:
      the optional
    • roles

      public List<String> roles()
      Returns the roles criterion.
      Returns:
      the list
    • fromPool

      Returns the pool filter criterion, if set.
      Returns:
      the optional
    • toUser

      public Optional<String> toUser()
      Returns the user filter criterion, if set.
      Returns:
      the optional