本文整理了Java中hudson.remoting.Channel.flushPipe()
方法的一些代码示例,展示了Channel.flushPipe()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Channel.flushPipe()
方法的具体详情如下:
包路径:hudson.remoting.Channel
类名称:Channel
方法名:flushPipe
暂无
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public Void invoke(File f, VirtualChannel channel) throws IOException {
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
Util.copyStream(fis,out);
try {
if (Channel.current() != null){
Channel.current().flushPipe();
}
} catch (InterruptedException ex) {
Logger.getLogger(FilePath.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
} finally {
IOUtils.closeQuietly(fis);
IOUtils.closeQuietly(out);
}
}
});
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public Void invoke(File f, VirtualChannel channel) throws IOException {
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
Util.copyStream(fis,out);
try {
if (Channel.current() != null){
Channel.current().flushPipe();
}
} catch (InterruptedException ex) {
Logger.getLogger(FilePath.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
} finally {
IOUtils.closeQuietly(fis);
IOUtils.closeQuietly(out);
}
}
});
代码示例来源:origin: org.eclipse.hudson/hudson-core
public Void invoke(File f, VirtualChannel channel) throws IOException {
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
Util.copyStream(fis, out);
try {
if (Channel.current() != null) {
Channel.current().flushPipe();
}
} catch (InterruptedException ex) {
Logger.getLogger(FilePath.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
} finally {
IOUtils.closeQuietly(fis);
IOUtils.closeQuietly(out);
}
}
});
代码示例来源:origin: hudson/hudson-2.x
public Void invoke(File f, VirtualChannel channel) throws IOException {
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
Util.copyStream(fis,out);
try {
if (Channel.current() != null){
Channel.current().flushPipe();
}
} catch (InterruptedException ex) {
Logger.getLogger(FilePath.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
} finally {
IOUtils.closeQuietly(fis);
IOUtils.closeQuietly(out);
}
}
});
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public Integer call() throws IOException {
Launcher.ProcStarter ps = new LocalLauncher(listener).launch();
ps.cmds(cmd).masks(masks).envs(env).stdin(in).stdout(out).stderr(err);
if(workDir!=null) ps.pwd(workDir);
Proc p = ps.start();
try {
return p.join();
} catch (InterruptedException e) {
return -1;
} finally{
try {
// Fix: http://issues.hudson-ci.org/browse/HUDSON-7809
// This call should not return immediately after the
// process is done. The pipe associated with the channel
// may be still transmitting data.
// Get the channel associated with this thread and flush
// its IO pipe
Channel.current().flushPipe();
} catch (InterruptedException ex) {
Logger.getLogger(Launcher.class.getName()).log(Level.INFO, null, ex);
}
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public Integer call() throws IOException {
Launcher.ProcStarter ps = new LocalLauncher(listener).launch();
ps.cmds(cmd).masks(masks).envs(env).stdin(in).stdout(out).stderr(err);
if(workDir!=null) ps.pwd(workDir);
Proc p = ps.start();
try {
return p.join();
} catch (InterruptedException e) {
return -1;
} finally{
try {
// Fix: http://issues.hudson-ci.org/browse/HUDSON-7809
// This call should not return immediately after the
// process is done. The pipe associated with the channel
// may be still transmitting data.
// Get the channel associated with this thread and flush
// its IO pipe
Channel.current().flushPipe();
} catch (InterruptedException ex) {
Logger.getLogger(Launcher.class.getName()).log(Level.INFO, null, ex);
}
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public Integer call() throws IOException {
Launcher.ProcStarter ps = new LocalLauncher(listener).launch();
ps.cmds(cmd).masks(masks).envs(env).stdin(in).stdout(out).stderr(err);
if (workDir != null) {
ps.pwd(workDir);
}
Proc p = ps.start();
try {
return p.join();
} catch (InterruptedException e) {
return -1;
} finally {
try {
// Fix: http://issues.hudson-ci.org/browse/HUDSON-7809
// This call should not return immediately after the
// process is done. The pipe associated with the channel
// may be still transmitting data.
// Get the channel associated with this thread and flush
// its IO pipe
Channel.current().flushPipe();
} catch (InterruptedException ex) {
Logger.getLogger(Launcher.class.getName()).log(Level.INFO, null, ex);
}
}
}
private static final long serialVersionUID = 1L;
代码示例来源:origin: hudson/hudson-2.x
public Integer call() throws IOException {
Launcher.ProcStarter ps = new LocalLauncher(listener).launch();
ps.cmds(cmd).masks(masks).envs(env).stdin(in).stdout(out).stderr(err);
if(workDir!=null) ps.pwd(workDir);
Proc p = ps.start();
try {
return p.join();
} catch (InterruptedException e) {
return -1;
} finally{
try {
// Fix: http://issues.hudson-ci.org/browse/HUDSON-7809
// This call should not return immediately after the
// process is done. The pipe associated with the channel
// may be still transmitting data.
// Get the channel associated with this thread and flush
// its IO pipe
Channel.current().flushPipe();
} catch (InterruptedException ex) {
Logger.getLogger(Launcher.class.getName()).log(Level.INFO, null, ex);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!