hudson.FilePath.actAsync()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中hudson.FilePath.actAsync()方法的一些代码示例,展示了FilePath.actAsync()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FilePath.actAsync()方法的具体详情如下:
包路径:hudson.FilePath
类名称:FilePath
方法名:actAsync

FilePath.actAsync介绍

[英]Executes some program on the machine that this FilePath exists, so that one can perform local file operations.
[中]在存在此文件路径的计算机上执行某些程序,以便可以执行本地文件操作。

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * Reads this file.
 */
public InputStream read() throws IOException, InterruptedException {
  if(channel==null) {
    return Files.newInputStream(fileToPath(reading(new File(remote))));
  }
  final Pipe p = Pipe.createRemoteToLocal();
  actAsync(new Read(p));
  return p.getIn();
}
private class Read extends SecureFileCallable<Void> {

代码示例来源:origin: jenkinsci/jenkins

actAsync(new SecureFileCallable<Void>() {
  private static final long serialVersionUID = 1L;

代码示例来源:origin: jenkinsci/jenkins

Future<Void> future = target.actAsync(new ReadToTar(pipe, description));
Future<Integer> future2 = actAsync(new WriteToTar(scanner, pipe));
try {
Future<Integer> future = actAsync(new CopyRecursiveRemoteToLocal(pipe, scanner));
try {
  readFromTar(remote + '/' + description,new File(target.remote),TarCompression.GZIP.extract(pipe.getIn()));

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Reads this file.
 */
public InputStream read() throws IOException, InterruptedException {
  if(channel==null) {
    try {
      return Files.newInputStream(reading(new File(remote)).toPath());
    } catch (InvalidPathException e) {
      throw new IOException(e);
    }
  }
  final Pipe p = Pipe.createRemoteToLocal();
  actAsync(new SecureFileCallable<Void>() {
    private static final long serialVersionUID = 1L;
    @Override
    public Void invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
      try (InputStream fis = Files.newInputStream(reading(f).toPath());
         OutputStream out = p.getOut()) {
        org.apache.commons.io.IOUtils.copy(fis, out);
      } catch (InvalidPathException e) {
        p.error(new IOException(e));
      } catch (Exception x) {
        p.error(x);
      }
      return null;
    }
  });
  return p.getIn();
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

actAsync(new SecureFileCallable<Void>() {
  private static final long serialVersionUID = 1L;

代码示例来源:origin: openshift/jenkins-client-plugin

remoteOCProcessFuture = filePath.actAsync(new OcCallable(command, envVars, new RemoteOutputStream(stdout), new RemoteOutputStream(stderr)));

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

Future<Void> future = target.actAsync(new SecureFileCallable<Void>() {
  private static final long serialVersionUID = 1L;
  public Void invoke(File f, VirtualChannel channel) throws IOException {
Future<Integer> future2 = actAsync(new SecureFileCallable<Integer>() {
  private static final long serialVersionUID = 1L;
  @Override public Integer invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
Future<Integer> future = actAsync(new SecureFileCallable<Integer>() {
  private static final long serialVersionUID = 1L;
  public Integer invoke(File f, VirtualChannel channel) throws IOException {

代码示例来源:origin: org.hudsonci.plugins/cvs

Future<Void> task = modulePath.actAsync(new StickyDateCleanUpTask());

代码示例来源:origin: org.jvnet.hudson.plugins/cvs

Future<Void> task = workspace.actAsync(new StickyDateCleanUpTask());
parseUpdateOutput("", baos, changedFileNames);
join(task);
  Future<Void> task = modulePath.actAsync(new StickyDateCleanUpTask());

代码示例来源:origin: org.hudsonci.plugins/cvs

Future<Void> task = workspace.actAsync(new StickyDateCleanUpTask());
parseUpdateOutput("", baos, changedFileNames);
join(task);

代码示例来源:origin: org.jenkins-ci.plugins/copy-to-slave

Future<Void> future = target.actAsync(new FileCallable<Void>() {
  private static final long serialVersionUID = 1; // HUDSON-8274

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

Future<Void> future = target.actAsync(new FileCallable<Void>() {
  public Void invoke(File f, VirtualChannel channel) throws IOException {
    try {
Future<Integer> future = actAsync(new FileCallable<Integer>() {
  public Integer invoke(File f, VirtualChannel channel) throws IOException {
    try {

代码示例来源:origin: hudson/hudson-2.x

Future<Void> future = target.actAsync(new FileCallable<Void>() {
  public Void invoke(File f, VirtualChannel channel) throws IOException {
    try {
Future<Integer> future = actAsync(new FileCallable<Integer>() {
  public Integer invoke(File f, VirtualChannel channel) throws IOException {
    try {

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

Future<Void> future = target.actAsync(new FileCallable<Void>() {
  public Void invoke(File f, VirtualChannel channel) throws IOException {
    try {
Future<Integer> future = actAsync(new FileCallable<Integer>() {
  public Integer invoke(File f, VirtualChannel channel) throws IOException {
    try {

代码示例来源:origin: org.eclipse.hudson/hudson-core

Future<Void> future = target.actAsync(new FileCallable<Void>() {
  public Void invoke(File f, VirtualChannel channel) throws IOException {
    try {
Future<Integer> future = actAsync(new FileCallable<Integer>() {
  public Integer invoke(File f, VirtualChannel channel) throws IOException {
    try {

相关文章