hudson.maven
Class MavenBuildProxy.Filter<CORE extends MavenBuildProxy>

java.lang.Object
  extended by hudson.maven.MavenBuildProxy.Filter<CORE>
All Implemented Interfaces:
MavenBuildProxy, Serializable
Direct Known Subclasses:
MavenBuildProxy2.Filter
Enclosing interface:
MavenBuildProxy

public abstract static class MavenBuildProxy.Filter<CORE extends MavenBuildProxy>
extends Object
implements MavenBuildProxy, Serializable

Filter for MavenBuildProxy. Meant to be useful as the base class for other filters.

See Also:
Serialized Form

Nested Class Summary
protected static class MavenBuildProxy.Filter.AsyncInvoker
          Callable for invoking MavenBuildProxy.BuildCallable asynchronously.
 
Nested classes/interfaces inherited from interface hudson.maven.MavenBuildProxy
MavenBuildProxy.BuildCallable<V,T extends Throwable>, MavenBuildProxy.Filter<CORE extends MavenBuildProxy>
 
Field Summary
protected  CORE core
           
 
Constructor Summary
protected MavenBuildProxy.Filter(CORE core)
           
 
Method Summary
<V,T extends Throwable>
V
execute(MavenBuildProxy.BuildCallable<V,T> program)
          Executes the given MavenBuildProxy.BuildCallable on the master, where one has access to MavenBuild and all the other Hudson objects.
 void executeAsync(MavenBuildProxy.BuildCallable<?,?> program)
          Executes the given MavenBuildProxy.BuildCallable asynchronously on the master.
 FilePath getArtifactsDir()
           
 MavenBuildInformation getMavenBuildInformation()
           
 long getMilliSecsSinceBuildStart()
          # of milliseconds elapsed since MavenBuildProxy.getTimestamp().
 FilePath getModuleSetRootDir()
          Root directory of the owner MavenModuleSet
 FilePath getProjectRootDir()
          Root directory of the parent of this build.
 FilePath getRootDir()
          Root directory of the build.
 Calendar getTimestamp()
           
 boolean isArchivingDisabled()
          If true, artifacts will not actually be archived to master.
 void registerAsAggregatedProjectAction(MavenReporter reporter)
          Nominates that the reporter will contribute a project action for this build by using MavenReporter.getAggregatedProjectAction(MavenModuleSet).
 void registerAsProjectAction(MavenProjectActionBuilder builder)
          Nominates that the reporter will contribute a project action for this build by using MavenReporter.getProjectActions(MavenModule).
 void registerAsProjectAction(MavenReporter reporter)
          Nominates that the reporter will contribute a project action for this build by using MavenReporter.getProjectActions(MavenModule).
 void setExecutedMojos(List<ExecutedMojo> executedMojos)
          Called at the end of the build to record what mojos are executed.
 void setResult(Result result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

core

protected final CORE extends MavenBuildProxy core
Constructor Detail

MavenBuildProxy.Filter

protected MavenBuildProxy.Filter(CORE core)
Method Detail

execute

public <V,T extends Throwable> V execute(MavenBuildProxy.BuildCallable<V,T> program)
          throws T extends Throwable,
                 IOException,
                 InterruptedException
Description copied from interface: MavenBuildProxy
Executes the given MavenBuildProxy.BuildCallable on the master, where one has access to MavenBuild and all the other Hudson objects.

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

Specified by:
execute in interface MavenBuildProxy
Returns:
the value that MavenBuildProxy.BuildCallable returned.
Throws:
T - if MavenBuildProxy.BuildCallable throws this exception.
IOException - if the remoting failed.
InterruptedException - if the remote execution is aborted.
T extends Throwable
See Also:
MavenBuildProxy.executeAsync(BuildCallable)

executeAsync

public void executeAsync(MavenBuildProxy.BuildCallable<?,?> program)
                  throws IOException
Description copied from interface: MavenBuildProxy
Executes the given MavenBuildProxy.BuildCallable asynchronously on the master.

This method works like MavenBuildProxy.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.

Specified by:
executeAsync in interface MavenBuildProxy
Throws:
IOException

getRootDir

public FilePath getRootDir()
Description copied from interface: MavenBuildProxy
Root directory of the build.

Specified by:
getRootDir in interface MavenBuildProxy
See Also:
Run.getRootDir()

getProjectRootDir

public FilePath getProjectRootDir()
Description copied from interface: MavenBuildProxy
Root directory of the parent of this build.

Specified by:
getProjectRootDir in interface MavenBuildProxy

getModuleSetRootDir

public FilePath getModuleSetRootDir()
Description copied from interface: MavenBuildProxy
Root directory of the owner MavenModuleSet

Specified by:
getModuleSetRootDir in interface MavenBuildProxy

getArtifactsDir

public FilePath getArtifactsDir()
Specified by:
getArtifactsDir in interface MavenBuildProxy
See Also:
Run.getArtifactsDir()

setResult

public void setResult(Result result)
Specified by:
setResult in interface MavenBuildProxy
See Also:
Run.setResult(Result)

getTimestamp

public Calendar getTimestamp()
Specified by:
getTimestamp in interface MavenBuildProxy
See Also:
Run.getTimestamp()

getMilliSecsSinceBuildStart

public long getMilliSecsSinceBuildStart()
Description copied from interface: MavenBuildProxy
# of milliseconds elapsed since MavenBuildProxy.getTimestamp(). Where the clock skew is involved between the master and the Maven JVM, comparing current time on Maven JVM with MavenBuildProxy.getTimestamp() could be problematic, but this value is more robust.

Specified by:
getMilliSecsSinceBuildStart in interface MavenBuildProxy

isArchivingDisabled

public boolean isArchivingDisabled()
Description copied from interface: MavenBuildProxy
If true, artifacts will not actually be archived to master. Calls MavenModuleSet.isArchivingDisabled().

Specified by:
isArchivingDisabled in interface MavenBuildProxy

registerAsProjectAction

public void registerAsProjectAction(MavenReporter reporter)
Description copied from interface: MavenBuildProxy
Nominates that the reporter will contribute a project action for this build by using MavenReporter.getProjectActions(MavenModule).

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

Specified by:
registerAsProjectAction in interface MavenBuildProxy

registerAsProjectAction

public void registerAsProjectAction(MavenProjectActionBuilder builder)
Description copied from interface: MavenBuildProxy
Nominates that the reporter will contribute a project action for this build by using MavenReporter.getProjectActions(MavenModule).

The specified MavenReporter object will be transferred to the master and will become a persisted part of the MavenBuild.

Specified by:
registerAsProjectAction in interface MavenBuildProxy

registerAsAggregatedProjectAction

public void registerAsAggregatedProjectAction(MavenReporter reporter)
Description copied from interface: MavenBuildProxy
Nominates that the reporter will contribute a project action for this build by using MavenReporter.getAggregatedProjectAction(MavenModuleSet).

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

Specified by:
registerAsAggregatedProjectAction in interface MavenBuildProxy

setExecutedMojos

public void setExecutedMojos(List<ExecutedMojo> executedMojos)
Description copied from interface: MavenBuildProxy
Called at the end of the build to record what mojos are executed.

Specified by:
setExecutedMojos in interface MavenBuildProxy

getMavenBuildInformation

public MavenBuildInformation getMavenBuildInformation()
Specified by:
getMavenBuildInformation in interface MavenBuildProxy


Copyright © 2004-2013. All Rights Reserved.