Class Command

java.lang.Object
org.yamcs.client.Command
All Implemented Interfaces:
Comparable<Command>

public class Command extends Object implements Comparable<Command>
  • Constructor Details

  • Method Details

    • getId

      public String getId()
    • getGenerationTime

      public Instant getGenerationTime()
    • getName

      public String getName()
      Fully qualified command name
    • getName

      public String getName(String namespace)
      Alias under the specified namespace. Returns null if this command has no such alias.
    • getAssignments

      public List<Commanding.CommandAssignment> getAssignments()
    • getOrigin

      public String getOrigin()
    • getSequenceNumber

      public int getSequenceNumber()
    • getUsername

      public String getUsername()
      Username of the issuer
    • getQueue

      public String getQueue()
      The assigned command queue
    • getSource

      public String getSource()
      String representation of the command
    • getUnprocessedBinary

      public byte[] getUnprocessedBinary()
      Unprocessed binary representation of the command (prior to postprocessing).
    • getBinary

      public byte[] getBinary()
      Binary representation of the command
    • getAttribute

      public <T> T getAttribute(String key)
    • isComplete

      public boolean isComplete()
      Returns whether this command is complete. A command can be complete, yet still failed.
    • isSuccess

      public boolean isSuccess()
      Returns true if this command has completed successfully
    • isFailure

      public boolean isFailure()
      Returns true if this command failed
    • getError

      public String getError()
      Error message in case this command failed
    • getComment

      public String getComment()
    • getAttributes

      public Map<String,Object> getAttributes()
      Returns all attributes of this commands.
    • merge

      public void merge(Commanding.CommandHistoryEntry entry)
    • merge

      public void merge(Command other)
    • getExtraAttributes

      public LinkedHashMap<String,Object> getExtraAttributes()
      Returns non-standard attributes
    • getAcknowledgments

      public LinkedHashMap<String,Acknowledgment> getAcknowledgments()
      All acknowledgments by name
    • getQueuedAcknowledgment

      public Acknowledgment getQueuedAcknowledgment()
    • getReleasedAcknowledgment

      public Acknowledgment getReleasedAcknowledgment()
    • getSentAcknowledgment

      public Acknowledgment getSentAcknowledgment()
    • getAcknowledgment

      public Acknowledgment getAcknowledgment(String name)
    • getCascadedRecords

      public Map<String,Command> getCascadedRecords()
      Returns command records that capture state of upstream (cascaded) servers.

      The returned map is keyed by the cascading prefix, for example: yamcs<SERVER1>_ when the information is cascaded from SERVER1, or yamcs<SERVER2>_yamcs<SERVER1>_ when the information is cascaded from SERVER 1 over SERVER2.

    • compareTo

      public int compareTo(Command other)
      Specified by:
      compareTo in interface Comparable<Command>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object