Package org.apache.felix.hc.core.impl.executor

## Class ExecutionResult

- java.lang.Object
- - org.apache.felix.hc.core.impl.executor.ExecutionResult

All Implemented Interfaces:
  `Comparable<ExecutionResult>`, `org.apache.felix.hc.api.execution.HealthCheckExecutionResult`

    public class ExecutionResult
    extends Object
    implements Comparable<ExecutionResult>, org.apache.felix.hc.api.execution.HealthCheckExecutionResult

The result of executing a `HealthCheck`.

### Constructor Summary

Constructors
`ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata, org.apache.felix.hc.api.Result.Status status, String errorMessage, long elapsedTime, boolean timedOut)` Shortcut constructor to create error/timed out result.
`ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata, org.apache.felix.hc.api.Result simpleResult, long elapsedTimeInMs)` Shortcut constructor for a result
`ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata, org.apache.felix.hc.api.Result simpleResult, long elapsedTimeInMs, boolean timedout)`
`ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata, org.apache.felix.hc.api.Result simpleResult, Date finishedAt, long elapsedTimeInMs, boolean timedout)` Full constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo​(ExecutionResult otherResult)` Natural order of results (failed results are sorted before ok results).
`long` `getElapsedTimeInMs()`
`Date` `getFinishedAt()`
`org.apache.felix.hc.api.execution.HealthCheckMetadata` `getHealthCheckMetadata()`
`org.apache.felix.hc.api.Result` `getHealthCheckResult()`
`boolean` `hasTimedOut()`
`String` `toString()`

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### ExecutionResult

    public ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata,
                           org.apache.felix.hc.api.Result simpleResult,
                           long elapsedTimeInMs,
                           boolean timedout)

#### ExecutionResult

    public ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata,
                           org.apache.felix.hc.api.Result simpleResult,
                           Date finishedAt,
                           long elapsedTimeInMs,
                           boolean timedout)

Full constructor

#### ExecutionResult

    public ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata,
                           org.apache.felix.hc.api.Result simpleResult,
                           long elapsedTimeInMs)

Shortcut constructor for a result

#### ExecutionResult

    public ExecutionResult​(org.apache.felix.hc.api.execution.HealthCheckMetadata metadata,
                           org.apache.felix.hc.api.Result.Status status,
                           String errorMessage,
                           long elapsedTime,
                           boolean timedOut)

Shortcut constructor to create error/timed out result.

### Method Detail

#### getHealthCheckResult

    public org.apache.felix.hc.api.Result getHealthCheckResult()

Specified by:
  `getHealthCheckResult` in interface `org.apache.felix.hc.api.execution.HealthCheckExecutionResult`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### getElapsedTimeInMs

    public long getElapsedTimeInMs()

Specified by:
  `getElapsedTimeInMs` in interface `org.apache.felix.hc.api.execution.HealthCheckExecutionResult`

#### getHealthCheckMetadata

    public org.apache.felix.hc.api.execution.HealthCheckMetadata getHealthCheckMetadata()

Specified by:
  `getHealthCheckMetadata` in interface `org.apache.felix.hc.api.execution.HealthCheckExecutionResult`

#### getFinishedAt

    public Date getFinishedAt()

Specified by:
  `getFinishedAt` in interface `org.apache.felix.hc.api.execution.HealthCheckExecutionResult`

#### hasTimedOut

    public boolean hasTimedOut()

Specified by:
  `hasTimedOut` in interface `org.apache.felix.hc.api.execution.HealthCheckExecutionResult`

#### compareTo

    public int compareTo​(ExecutionResult otherResult)

Natural order of results (failed results are sorted before ok results).

Specified by:
  `compareTo` in interface `Comparable<ExecutionResult>`