Record Class PluginTaskOutcome
java.lang.Object
java.lang.Record
com.xebialabs.xlrelease.domain.tasks.plugin.PluginTaskOutcome
- Record Components:
kind- what to do with the taskmessage- failure message; only set whenkindisPluginTaskOutcome.Kind.FAILEDdelay- re-entry delay; only set whenkindisPluginTaskOutcome.Kind.SUSPEND_FORresults- output properties and status line to persist, whatever the kind
public record PluginTaskOutcome(PluginTaskOutcome.Kind kind, String message, Duration delay, PluginTaskResults results)
extends Record
The host-side translation of what a
TaskExecutorExtension returned, plus everything the
execution context collected while it ran.
Deliberately a separate type from the plugin-facing TaskExecutionResult: the worker must
hand a plain value back to processResult, and that value must not be an object graph
loaded from the plugin's bundle classloader - holding one across the result-processing boundary
would pin the bundle and defeat clean uninstall.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interfaceBuilds the results for a translated outcome. -
Constructor Summary
ConstructorsConstructorDescriptionPluginTaskOutcome(PluginTaskOutcome.Kind kind, String message, Duration delay, PluginTaskResults results) Creates an instance of aPluginTaskOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelay()Returns the value of thedelayrecord component.final booleanIndicates whether some other object is "equal to" this one.static PluginTaskOutcomefrom(com.xebialabs.xlrelease.osgi.api.tasks.TaskExecutionResult result, PluginTaskOutcome.ResultsFactory results) Translates a plugin-returned result, taking the results fromresultsso the suspension intent travels with the output properties - exactly asCustomScriptTaskResultscarriesnextScriptPath/intervalalongside its output variables.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.message()Returns the value of themessagerecord component.results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PluginTaskOutcome
public PluginTaskOutcome(PluginTaskOutcome.Kind kind, String message, Duration delay, PluginTaskResults results) Creates an instance of aPluginTaskOutcomerecord class.
-
-
Method Details
-
from
public static PluginTaskOutcome from(com.xebialabs.xlrelease.osgi.api.tasks.TaskExecutionResult result, PluginTaskOutcome.ResultsFactory results) Translates a plugin-returned result, taking the results fromresultsso the suspension intent travels with the output properties - exactly asCustomScriptTaskResultscarriesnextScriptPath/intervalalongside its output variables.- Parameters:
result- may be null if an extension misbehaves
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
delay
Returns the value of thedelayrecord component.- Returns:
- the value of the
delayrecord component
-
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-