hudson.remoting.Channel.terminate()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(211)

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

Channel.terminate介绍

[英]Aborts the connection in response to an error.
[中]中断连接以响应错误。

代码示例

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

/**
 * Kill the process when the channel is severed.
 */
@Override
public synchronized void terminate(IOException e) {
  super.terminate(e);
  ProcessTree pt = ProcessTree.get();
  try {
    pt.killAll(proc,cookie);
  } catch (InterruptedException x) {
    LOGGER.log(Level.INFO, "Interrupted", x);
  }
}

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

public void terminate(IOException e) {
    Channel.this.terminate(e);
  }
});

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  proc.destroy();
  // the stderr copier should exit by itself
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  proc.destroy();
  // the stderr copier should exit by itself
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  proc.destroy();
  // the stderr copier should exit by itself
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  proc.destroy();
  // the stderr copier should exit by itself
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  try {
    proc.kill();
  } catch (IOException x) {
    // we are already in the error recovery mode, so just record it and move on
    LOGGER.log(Level.INFO, "Failed to terminate the severed connection", x);
  } catch (InterruptedException x) {
    // process the interrupt later
    Thread.currentThread().interrupt();
  }
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  try {
    proc.kill();
  } catch (IOException x) {
    // we are already in the error recovery mode, so just record it and move on
    LOGGER.log(Level.INFO, "Failed to terminate the severed connection",x);
  } catch (InterruptedException x) {
    // process the interrupt later
    Thread.currentThread().interrupt();
  }
}

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

protected void execute(Channel channel) {
  try {
    channel.close();
    channel.terminate(new OrderlyShutdown(createdAt));
  } catch (IOException e) {
    logger.log(Level.SEVERE,"close command failed on "+channel.name,e);
    logger.log(Level.INFO,"close command created at",createdAt);
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
public void onReadClosed(IOException cause) throws IOException {
  if (futureChannel.isDone()) {
    if (channel != null) {
      channel.terminate(cause == null ? new ClosedChannelException() : cause);
    }
  } else {
    futureChannel.setException(cause == null ? new ClosedChannelException() : cause);
  }
}

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

public ReaderThread(CommandReceiver receiver) {
  super("Channel reader thread: "+channel.getName());
  this.receiver = receiver;
  setUncaughtExceptionHandler((t, e) -> {
    LOGGER.log(Level.SEVERE, "Uncaught exception in SynchronousCommandTransport.ReaderThread " + t, e);
    channel.terminate(new IOException("Unexpected reader termination", e));
  });
}

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

protected void execute(Channel channel) {
  try {
    channel.close();
    channel.terminate(new OrderlyShutdown(createdAt));
  } catch (IOException e) {
    logger.log(Level.SEVERE, "close command failed on " + channel.name, e);
    logger.log(Level.INFO, "close command created at", createdAt);
  }
}

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

protected void execute(Channel channel) {
  try {
    channel.close();
    channel.terminate(new OrderlyShutdown(createdAt));
  } catch (IOException e) {
    logger.log(Level.SEVERE, "close command failed on " + channel.name, e);
    logger.log(Level.INFO, "close command created at", createdAt);
  }
}

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

protected void execute(Channel channel) {
  try {
    channel.close();
    channel.terminate(new OrderlyShutdown(createdAt));
  } catch (IOException e) {
    logger.log(Level.SEVERE, "close command failed on " + channel.name, e);
    logger.log(Level.INFO, "close command created at", createdAt);
  }
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  ProcessTree pt = ProcessTree.get();
  try {
    pt.killAll(proc,cookie);
  } catch (InterruptedException x) {
    LOGGER.log(Level.INFO, "Interrupted", x);
  }
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
public synchronized void terminate(IOException e) {
  super.terminate(e);
  ProcessTree pt = ProcessTree.get();
  try {
    pt.killAll(proc,cookie);
  } catch (InterruptedException x) {
    LOGGER.log(Level.INFO, "Interrupted", x);
  }
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  ProcessTree pt = ProcessTree.get(nativeUtils);
  try {
    pt.killAll(proc,cookie);
  } catch (InterruptedException x) {
    LOGGER.log(Level.INFO, "Interrupted", x);
  }
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  ProcessTree pt = ProcessTree.get(nativeUtils);
  try {
    pt.killAll(proc, cookie);
  } catch (InterruptedException x) {
    LOGGER.log(Level.INFO, "Interrupted", x);
  }
}

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

/**
 * Kill the process when the channel is severed.
 */
@Override
protected synchronized void terminate(IOException e) {
  super.terminate(e);
  ProcessTree pt = ProcessTree.get();
  try {
    pt.killAll(proc,cookie);
  } catch (InterruptedException x) {
    LOGGER.log(Level.INFO, "Interrupted", x);
  }
}

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

@Override
  public void run() {
    // if this EOF is unexpected, report an error.
    if (!t.getChannel().isInClosed()) {
      t.getChannel().terminate(new IOException("Unexpected EOF while receiving the data from the channel. "
          + "FIFO buffer has been already closed", t.rb.getCloseCause()));
    }
  }
});

相关文章