Class CommandInvocation

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class CommandInvocation
    extends Object
    implements Serializable, Cloneable

    An invocation is copy of a command sent to a specific instance. A command can apply to one or more instances. A command invocation applies to one instance. For example, if a user executes SendCommand against three instances, then a command invocation is created for each requested instance ID. A command invocation returns status and detail information about a command you executed.

    See Also:
    Serialized Form
    • Constructor Detail

      • CommandInvocation

        public CommandInvocation()
    • Method Detail

      • setCommandId

        public void setCommandId​(String commandId)

        The command against which this invocation was requested.

        Parameters:
        commandId - The command against which this invocation was requested.
      • getCommandId

        public String getCommandId()

        The command against which this invocation was requested.

        Returns:
        The command against which this invocation was requested.
      • withCommandId

        public CommandInvocation withCommandId​(String commandId)

        The command against which this invocation was requested.

        Parameters:
        commandId - The command against which this invocation was requested.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setInstanceId

        public void setInstanceId​(String instanceId)

        The instance ID in which this invocation was requested.

        Parameters:
        instanceId - The instance ID in which this invocation was requested.
      • getInstanceId

        public String getInstanceId()

        The instance ID in which this invocation was requested.

        Returns:
        The instance ID in which this invocation was requested.
      • withInstanceId

        public CommandInvocation withInstanceId​(String instanceId)

        The instance ID in which this invocation was requested.

        Parameters:
        instanceId - The instance ID in which this invocation was requested.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setComment

        public void setComment​(String comment)

        User-specified information about the command, such as a brief description of what the command should do.

        Parameters:
        comment - User-specified information about the command, such as a brief description of what the command should do.
      • getComment

        public String getComment()

        User-specified information about the command, such as a brief description of what the command should do.

        Returns:
        User-specified information about the command, such as a brief description of what the command should do.
      • withComment

        public CommandInvocation withComment​(String comment)

        User-specified information about the command, such as a brief description of what the command should do.

        Parameters:
        comment - User-specified information about the command, such as a brief description of what the command should do.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setDocumentName

        public void setDocumentName​(String documentName)

        The document name that was requested for execution.

        Parameters:
        documentName - The document name that was requested for execution.
      • getDocumentName

        public String getDocumentName()

        The document name that was requested for execution.

        Returns:
        The document name that was requested for execution.
      • withDocumentName

        public CommandInvocation withDocumentName​(String documentName)

        The document name that was requested for execution.

        Parameters:
        documentName - The document name that was requested for execution.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setRequestedDateTime

        public void setRequestedDateTime​(Date requestedDateTime)

        The time and date the request was sent to this instance.

        Parameters:
        requestedDateTime - The time and date the request was sent to this instance.
      • getRequestedDateTime

        public Date getRequestedDateTime()

        The time and date the request was sent to this instance.

        Returns:
        The time and date the request was sent to this instance.
      • withRequestedDateTime

        public CommandInvocation withRequestedDateTime​(Date requestedDateTime)

        The time and date the request was sent to this instance.

        Parameters:
        requestedDateTime - The time and date the request was sent to this instance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setStatus

        public void setStatus​(String status)

        Whether or not the invocation succeeded, failed, or is pending.

        Parameters:
        status - Whether or not the invocation succeeded, failed, or is pending.
        See Also:
        CommandInvocationStatus
      • getStatus

        public String getStatus()

        Whether or not the invocation succeeded, failed, or is pending.

        Returns:
        Whether or not the invocation succeeded, failed, or is pending.
        See Also:
        CommandInvocationStatus
      • withStatus

        public CommandInvocation withStatus​(String status)

        Whether or not the invocation succeeded, failed, or is pending.

        Parameters:
        status - Whether or not the invocation succeeded, failed, or is pending.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        CommandInvocationStatus
      • setStatus

        public void setStatus​(CommandInvocationStatus status)

        Whether or not the invocation succeeded, failed, or is pending.

        Parameters:
        status - Whether or not the invocation succeeded, failed, or is pending.
        See Also:
        CommandInvocationStatus
      • withStatus

        public CommandInvocation withStatus​(CommandInvocationStatus status)

        Whether or not the invocation succeeded, failed, or is pending.

        Parameters:
        status - Whether or not the invocation succeeded, failed, or is pending.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        CommandInvocationStatus
      • setTraceOutput

        public void setTraceOutput​(String traceOutput)

        Gets the trace output sent by the agent.

        Parameters:
        traceOutput - Gets the trace output sent by the agent.
      • getTraceOutput

        public String getTraceOutput()

        Gets the trace output sent by the agent.

        Returns:
        Gets the trace output sent by the agent.
      • withTraceOutput

        public CommandInvocation withTraceOutput​(String traceOutput)

        Gets the trace output sent by the agent.

        Parameters:
        traceOutput - Gets the trace output sent by the agent.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setCommandPlugins

        public void setCommandPlugins​(Collection<CommandPlugin> commandPlugins)
        Parameters:
        commandPlugins -
      • withCommandPlugins

        public CommandInvocation withCommandPlugins​(Collection<CommandPlugin> commandPlugins)
        Parameters:
        commandPlugins -
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object