Class ActionExecutionContext
- java.lang.Object
-
- com.facebook.buck.core.rules.actions.ActionExecutionContext
-
public abstract class ActionExecutionContext extends Object
Holds the informationAction
s can use for itsAction.execute(ActionExecutionContext)
-
-
Constructor Summary
Constructors Constructor Description ActionExecutionContext()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ArtifactFilesystem
getArtifactFilesystem()
protected abstract BuckEventBus
getBuckEventBus()
abstract Map<String,String>
getEnvironment()
abstract ProcessExecutor
getProcessExecutor()
abstract Path
getWorkingDirectory()
void
logError(Throwable e, String msg, Object... formatArgs)
Logs an errorstatic ActionExecutionContext
of(BuckEventBus buckEventBus, ArtifactFilesystem artifactFilesystem, ProcessExecutor processExecutor, Map<String,? extends String> environment, Path workingDirectory)
void
postEvent(BuckEvent event)
posts the given event to the global event bus
-
-
-
Method Detail
-
getBuckEventBus
protected abstract BuckEventBus getBuckEventBus()
-
getArtifactFilesystem
public abstract ArtifactFilesystem getArtifactFilesystem()
- Returns:
- an
ArtifactFilesystem
theAction
can access for it's execution. This is a filesystem that operates onArtifact
s without requiring actions to be aware of the actual underlying paths.
-
postEvent
public void postEvent(BuckEvent event)
posts the given event to the global event bus
-
getProcessExecutor
public abstract ProcessExecutor getProcessExecutor()
- Returns:
- The executor to run processes in
-
getEnvironment
public abstract Map<String,String> getEnvironment()
- Returns:
- The environment of the current context
-
getWorkingDirectory
public abstract Path getWorkingDirectory()
- Returns:
- The working directory for the current context
-
of
public static ActionExecutionContext of(BuckEventBus buckEventBus, ArtifactFilesystem artifactFilesystem, ProcessExecutor processExecutor, Map<String,? extends String> environment, Path workingDirectory)
-
-