Class FlowExecutionOwner

    • Constructor Detail

      • FlowExecutionOwner

        public FlowExecutionOwner()
    • Method Detail

      • getOrNull

        @CheckForNull
        public FlowExecution getOrNull()
        Same as get() but avoids throwing an exception or blocking.
        Returns:
        a valid flow execution, or null if not ready or invalid
      • getExecutable

        public abstract Queue.Executable getExecutable()
                                                throws IOException
        The executor slot running this flow, such as a Run. The conceptual "owner" of FlowExecution. (For anything that runs for a long enough time that demands flow, it better occupies an executor. So this type restriction should still enable scriptler to use this.)
        Returns:
        preferably an FlowExecutionOwner.Executable
        Throws:
        IOException
      • getUrl

        public abstract String getUrl()
                               throws IOException
        Returns the URL of the model object that owns FlowExecution, relative to the context root of Jenkins. This is usually not the same object as 'this'. This object must have the getExecution() method to bind FlowExecution to the URL space (or otherwise override getUrlOfExecution()).
        Returns:
        String like "job/foo/32/" with trailing slash but no leading slash.
        Throws:
        IOException
      • hashCode

        public abstract int hashCode()
        Needs to be overridden as the equals(Object) method is overridden.
        Overrides:
        hashCode in class Object
      • getListener

        @Nonnull
        public TaskListener getListener()
                                 throws IOException
        Gets a listener to which we may print general messages. Normally StepContext.get(java.lang.Class<T>) should be used, but in some cases there is no associated step.

        The listener should be remotable: if sent to an agent, messages printed to it should still appear in the log. The same will then apply to calls to StepContext.get(java.lang.Class<T>) on TaskListener.

        Throws:
        IOException
      • dummyOwner

        public static FlowExecutionOwner dummyOwner()
        A placeholder implementation for use in compatibility stubs.