Class DefaultExecResult<T extends Resource>
java.lang.Object
org.jdrupes.builder.core.ResourceObject
org.jdrupes.builder.core.DefaultExecResult<T>
- Type Parameters:
T- the generic type
- All Implemented Interfaces:
ExecResult<T>, FaultAware, Proxyable, Resource
Default implementation of a test result.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultExecResult(ResourceProvider provider, String name, int exitValue) Initializes a new default exec result. -
Method Summary
Modifier and TypeMethodDescriptionasOf()The instant at which this resource was created or last modified.Sets the instant to be returned byResource.asOf().intThe exit value.booleanisFaulty()Checks if the resource is faulty.provider()Returns theResourceProviderthat generated this result.Returns the stream of resources produced by the execution.Sets the resources associated with this result.Sets the faulty state.toString()Methods inherited from interface Resource
asOfLocalized, cleanup, isNewerThan, name, type
-
Constructor Details
-
DefaultExecResult
Initializes a new default exec result. Note that anexitValuedifferent from 0 does not automatically mark the result as faulty.- Parameters:
provider- the providername- the nameexitValue- the exit value
-
-
Method Details
-
provider
Returns theResourceProviderthat generated this result.- Returns:
- the resource provider
-
exitValue
Description copied from interface:ExecResultThe exit value.- Specified by:
exitValuein interfaceExecResult<T extends Resource>- Returns:
- the exit value
-
isFaulty
Description copied from interface:FaultAwareChecks if the resource is faulty.- Specified by:
isFaultyin interfaceFaultAware- Returns:
- true, if is faulty
-
setFaulty
Description copied from interface:FaultAwareSets the faulty state.- Specified by:
setFaultyin interfaceFaultAware- Returns:
- the fault aware
-
resources
Description copied from interface:ExecResultReturns the stream of resources produced by the execution. Each invocation of this method must return a new stream.- Specified by:
resourcesin interfaceExecResult<T extends Resource>- Returns:
- the stream
-
resources
Sets the resources associated with this result.- Parameters:
resources- the resources- Returns:
- the default exec result
-
asOf
Description copied from interface:ExecResultSets the instant to be returned byResource.asOf().- Specified by:
asOfin interfaceExecResult<T extends Resource>- Parameters:
asOf- the as of- Returns:
- the exec result
-
asOf
-
toString
- Overrides:
toStringin classResourceObject
-