hudson.ivy
Interface IvyBuildProxy

All Known Subinterfaces:
IvyBuildProxy2
All Known Implementing Classes:
IvyBuildProxy.Filter, IvyBuildProxy2.Filter

public interface IvyBuildProxy

Remoting proxy interface for IvyReporters to talk to IvyBuild during the build.

Author:
Timothy Bingaman

Nested Class Summary
static interface IvyBuildProxy.BuildCallable<V,T extends java.lang.Throwable>
           
static class IvyBuildProxy.Filter<CORE extends IvyBuildProxy>
          Filter for IvyBuildProxy.
 
Method Summary
<V,T extends java.lang.Throwable>
V
execute(IvyBuildProxy.BuildCallable<V,T> program)
          Executes the given IvyBuildProxy.BuildCallable on the master, where one has access to IvyBuild and all the other Hudson objects.
 void executeAsync(IvyBuildProxy.BuildCallable<?,?> program)
          Executes the given IvyBuildProxy.BuildCallable asynchronously on the master.
 hudson.FilePath getArtifactsDir()
           
 long getMilliSecsSinceBuildStart()
          # of milliseconds elapsed since getTimestamp().
 hudson.FilePath getModuleSetRootDir()
          Root directory of the owner IvyModuleSet
 hudson.FilePath getProjectRootDir()
          Root directory of the parent of this build.
 hudson.FilePath getRootDir()
          Root directory of the build.
 java.util.Calendar getTimestamp()
           
 boolean isArchivingDisabled()
          If true, artifacts will not actually be archived to master.
 void registerAsAggregatedProjectAction(IvyReporter reporter)
          Nominates that the reporter will contribute a project action for this build by using IvyReporter.getAggregatedProjectAction(IvyModuleSet).
 void registerAsProjectAction(IvyReporter reporter)
          Nominates that the reporter will contribute a project action for this build by using IvyReporter.getProjectAction(IvyModule).
 void setResult(hudson.model.Result result)
           
 

Method Detail

execute

<V,T extends java.lang.Throwable> V execute(IvyBuildProxy.BuildCallable<V,T> program)
          throws T extends java.lang.Throwable,
                 java.io.IOException,
                 java.lang.InterruptedException
Executes the given IvyBuildProxy.BuildCallable on the master, where one has access to IvyBuild and all the other Hudson objects.

The parameter, return value, and exception are all transfered by using Java serialization.

Returns:
the value that IvyBuildProxy.BuildCallable returned.
Throws:
T - if IvyBuildProxy.BuildCallable throws this exception.
java.io.IOException - if the remoting failed.
java.lang.InterruptedException - if the remote execution is aborted.
T extends java.lang.Throwable
See Also:
executeAsync(BuildCallable)

executeAsync

void executeAsync(IvyBuildProxy.BuildCallable<?,?> program)
                  throws java.io.IOException
Executes the given IvyBuildProxy.BuildCallable asynchronously on the master.

This method works like execute(BuildCallable) except that the method returns immediately and doesn't wait for the completion of the program.

The completions of asynchronous executions are accounted for before the build completes. If they throw exceptions, they'll be reported and the build will be marked as a failure.

Throws:
java.io.IOException

getRootDir

hudson.FilePath getRootDir()
Root directory of the build.

See Also:
Run.getRootDir()

getProjectRootDir

hudson.FilePath getProjectRootDir()
Root directory of the parent of this build.


getModuleSetRootDir

hudson.FilePath getModuleSetRootDir()
Root directory of the owner IvyModuleSet


getArtifactsDir

hudson.FilePath getArtifactsDir()
See Also:
Run.getArtifactsDir()

setResult

void setResult(hudson.model.Result result)
See Also:
Run.setResult(Result)

getTimestamp

java.util.Calendar getTimestamp()
See Also:
Run.getTimestamp()

getMilliSecsSinceBuildStart

long getMilliSecsSinceBuildStart()
# of milliseconds elapsed since getTimestamp(). Where the clock skew is involved between the master and the Ivy JVM, comparing current time on Ivy JVM with getTimestamp() could be problematic, but this value is more robust.


isArchivingDisabled

boolean isArchivingDisabled()
If true, artifacts will not actually be archived to master. Calls IvyModuleSet.isArchivingDisabled().


registerAsProjectAction

void registerAsProjectAction(IvyReporter reporter)
Nominates that the reporter will contribute a project action for this build by using IvyReporter.getProjectAction(IvyModule).

The specified IvyReporter object will be transfered to the master and will become a persisted part of the IvyBuild.


registerAsAggregatedProjectAction

void registerAsAggregatedProjectAction(IvyReporter reporter)
Nominates that the reporter will contribute a project action for this build by using IvyReporter.getAggregatedProjectAction(IvyModuleSet).

The specified IvyReporter object will be transfered to the master and will become a persisted part of the IvyModuleSetBuild.



Copyright © 2010. All Rights Reserved.