flux.agent
Class AgentProcessActionResult
java.lang.Object
flux.ProcessAction.ProcessActionResult
flux.agent.AgentProcessActionResult
- All Implemented Interfaces:
- AgentResult, java.io.Serializable, java.lang.Cloneable
public class AgentProcessActionResult
- extends ProcessAction.ProcessActionResult
- implements AgentResult
The result when a process finishes executing on an agent.
- Author:
- Copyright 2014 Flux Corporation. All rights reserved.
- See Also:
- Serialized Form
Method Summary |
java.util.Date |
getBeginning()
Returns the timestamp at which this process began executing. |
java.lang.String |
getCommand()
Returns the command line for the process. |
long |
getElapsedTime()
Returns the number of milliseconds that this process executed. |
java.util.Date |
getEnding()
Returns the timestamp at which this process began executing. |
java.lang.String |
getEngineName()
Returns the name of the engine which assigned this process to the agent. |
ErrorResultElement |
getError()
If this agent action ended with an error, returns the error that occurred when
the execution of an Action was attempted. |
java.lang.String |
getFlowChartName()
Returns the name of the flow chart which assigned this process to the
agent. |
AgentProcessCompletionState |
getProcessCompletionState()
Indicates how this process terminated: normally, with an error that occurred
when the execution of the process was attempted, after timing out but still
running to completion, after being destroyed due to a timeout, after being
destroyed when a signal was received, or after being destroyed due to the
process being interrupted. |
java.lang.Integer |
getResult()
If this process ran to completion, returns the process's exit code, as
returned by the operating system. |
java.lang.String |
getResultStderr()
If this process ran to completion, returns the standard error (stderr) from
the completed process. |
java.lang.String |
getResultStdout()
If this process ran to completion, returns the standard output (stdout)
from the completed process. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getBeginning
public java.util.Date getBeginning()
- Description copied from interface:
AgentResult
- Returns the timestamp at which this process began executing.
- Specified by:
getBeginning
in interface AgentResult
- Returns:
- The timestamp at which this process began executing.
getCommand
public java.lang.String getCommand()
- Returns the command line for the process.
- Returns:
- The command line for the process.
getResult
public java.lang.Integer getResult()
- If this process ran to completion, returns the process's exit code, as
returned by the operating system. Returns null if the process has not
completed yet or did not run to completion.
- Returns:
- The process's exit code, as returned by the operating system, if
this process ran normally. Returns null if the process has not
completed yet or did not run to completion.
- See Also:
AgentProcessCompletionState.NORMAL
,
AgentProcessCompletionState.TIMEOUT
getResultStderr
public java.lang.String getResultStderr()
- If this process ran to completion, returns the standard error (stderr) from
the completed process. Returns null if the process has not completed yet or
did not run to completion.
Furthermore, so as not to use all available memory, this variable holds at
most 500 KB of standard error. After the first 500 KB of stderr is written,
the stdout variable is cleared, and it begins collecting the next 500 KB of
stderr. This behavior repeats as necessary.
- Returns:
- The standard error (stderr) from the completed process, if this
process ran to completion. Returns null if the process has not
completed yet or did not run to completion.
- See Also:
AgentProcessCompletionState.NORMAL
,
AgentProcessCompletionState.TIMEOUT
getResultStdout
public java.lang.String getResultStdout()
- If this process ran to completion, returns the standard output (stdout)
from the completed process. Returns null if the process has not completed
yet or did not run to completion.
Furthermore, so as not to use all available memory, this variable holds at
most 500 KB of standard output. After the first 500 KB of stdout is
written, the stdout variable is cleared, and it begins collecting the next
500 KB of stdout. This behavior repeats as necessary.
- Returns:
- The standard output (stdout) from the completed process, if this
process ran normally. Returns null if the process has not completed
yet or did not run to completion.
- See Also:
AgentProcessCompletionState.NORMAL
,
AgentProcessCompletionState.TIMEOUT
getElapsedTime
public long getElapsedTime()
- Description copied from interface:
AgentResult
- Returns the number of milliseconds that this process executed. Returns 0 if
this process is not finished yet or did not run to completion.
- Specified by:
getElapsedTime
in interface AgentResult
- Returns:
- The number of milliseconds that this process executed. Returns 0 if
this process is not finished yet or did not run to completion.
- See Also:
AgentProcessCompletionState.NORMAL
,
AgentProcessCompletionState.TIMEOUT
getEnding
public java.util.Date getEnding()
- Description copied from interface:
AgentResult
- Returns the timestamp at which this process began executing. Returns null
if this process is not finished yet or did not run to completion.
- Specified by:
getEnding
in interface AgentResult
- Returns:
- The timestamp at which this process began executing. Returns null
if this process is not finished yet or did not run to completion.
- See Also:
AgentProcessCompletionState.NORMAL
,
AgentProcessCompletionState.TIMEOUT
getEngineName
public java.lang.String getEngineName()
- Description copied from interface:
AgentResult
- Returns the name of the engine which assigned this process to the agent.
- Specified by:
getEngineName
in interface AgentResult
- Returns:
- The name of the engine which assigned this process to the agent.
getError
public ErrorResultElement getError()
- Description copied from interface:
AgentResult
- If this agent action ended with an error, returns the error that occurred when
the execution of an Action was attempted. Returns null if this
action did not end with an error.
- Specified by:
getError
in interface AgentResult
- Returns:
- If this agent action ended with an error, returns the error that occurred
when the execution of an Action was attempted. Returns null
if this action ended normally.
- See Also:
AgentProcessCompletionState.ERROR
getFlowChartName
public java.lang.String getFlowChartName()
- Description copied from interface:
AgentResult
- Returns the name of the flow chart which assigned this process to the
agent.
- Specified by:
getFlowChartName
in interface AgentResult
- Returns:
- The name of the flow chart which assigned this process to the
agent.
getProcessCompletionState
public AgentProcessCompletionState getProcessCompletionState()
- Description copied from interface:
AgentResult
- Indicates how this process terminated: normally, with an error that occurred
when the execution of the process was attempted, after timing out but still
running to completion, after being destroyed due to a timeout, after being
destroyed when a signal was received, or after being destroyed due to the
process being interrupted.
- Specified by:
getProcessCompletionState
in interface AgentResult
- Returns:
- How this process terminated.
© 2014 Flux Corporation. All rights reserved.