/** * Creates a {@link Channel} from the given stream and sets that to this agent. * * Same as {@link #setChannel(InputStream, OutputStream, OutputStream, Channel.Listener)}, but for * {@link TaskListener}. */ public void setChannel(@Nonnull InputStream in, @Nonnull OutputStream out, @Nonnull TaskListener taskListener, @CheckForNull Channel.Listener listener) throws IOException, InterruptedException { setChannel(in,out,taskListener.getLogger(),listener); }
setChannel(channel, headerStream, listener);
setChannel(channel,launchLog,listener);
@Override public void afterChannel(@NonNull JnlpConnectionState event) { DefaultJnlpSlaveReceiver.State state = event.getStash(DefaultJnlpSlaveReceiver.State.class); final SlaveComputer computer = state.getNode(); try { computer.setChannel(event.getChannel(), state.getLog(), null); } catch (IOException | InterruptedException e) { PrintWriter logw = new PrintWriter(state.getLog(), true); Functions.printStackTrace(e, logw); try { event.getChannel().close(); } catch (IOException x) { LOGGER.log(Level.WARNING, null, x); } } }
public void setChannel(InputStream in, OutputStream out, TaskListener taskListener, Channel.Listener listener) throws IOException, InterruptedException { setChannel(in,out,taskListener.getLogger(),listener); }
public void setChannel(InputStream in, OutputStream out, TaskListener taskListener, Channel.Listener listener) throws IOException, InterruptedException { setChannel(in, out, taskListener.getLogger(), listener); }
public void setChannel(InputStream in, OutputStream out, TaskListener taskListener, Channel.Listener listener) throws IOException, InterruptedException { setChannel(in,out,taskListener.getLogger(),listener); }
public void setChannel(InputStream in, OutputStream out, TaskListener taskListener, Channel.Listener listener) throws IOException, InterruptedException { setChannel(in,out,taskListener.getLogger(),listener); }
public void setChannel(InputStream in, OutputStream out, TaskListener taskListener, Channel.Listener listener) throws IOException, InterruptedException { setChannel(in,out,taskListener.getLogger(),listener); }
computer.setChannel(new BufferedInputStream(this.s.getInputStream()), new BufferedOutputStream(this.s.getOutputStream()), log, new Listener() { @Override
computer.setChannel(new BufferedInputStream(this.s.getInputStream()), new BufferedOutputStream(this.s.getOutputStream()), log, new Listener() { @Override
computer.setChannel(new BufferedInputStream(this.s.getInputStream()), new BufferedOutputStream(this.s.getOutputStream()), log, new Listener() { @Override
computer.setChannel(new BufferedInputStream(this.s.getInputStream()), new BufferedOutputStream(this.s.getOutputStream()), log, new Listener() { @Override
computer.setChannel(proc.getInputStream(), proc.getOutputStream(), listener.getLogger(), new Channel.Listener() { @Override public void onClosed(Channel channel, IOException cause) {
computer.setChannel(demux, out, listener, new Channel.Listener() { @Override public void onClosed(Channel channel, IOException cause) {
proc.getErrorStream(), listener.getLogger()).start(); computer.setChannel(proc.getInputStream(), proc.getOutputStream(), listener.getLogger(), new Channel.Listener() { @Override public void onClosed(Channel channel, IOException cause) {
@Override public void afterChannel(@NonNull JnlpConnectionState event) { DefaultJnlpSlaveReceiver.State state = event.getStash(DefaultJnlpSlaveReceiver.State.class); final SlaveComputer computer = state.getNode(); try { computer.setChannel(event.getChannel(), state.getLog(), null); } catch (IOException | InterruptedException e) { PrintWriter logw = new PrintWriter(state.getLog(), true); Functions.printStackTrace(e, logw); try { event.getChannel().close(); } catch (IOException x) { LOGGER.log(Level.WARNING, null, x); } } }
computer.setChannel(session.getStdout(), session.getStdin(), listener.getLogger(), null); } catch (InterruptedException e) { session.close();
computer.setChannel(session.getStdout(), session.getStdin(), listener.getLogger(), null); } catch (InterruptedException e) { session.close();
/** * Creates a {@link Channel} from the given stream and sets that to this agent. * * @param in * Stream connected to the remote agent. It's the caller's responsibility to do * buffering on this stream, if that's necessary. * @param out * Stream connected to the remote peer. It's the caller's responsibility to do * buffering on this stream, if that's necessary. * @param launchLog * If non-null, receive the portion of data in <tt>is</tt> before * the data goes into the "binary mode". This is useful * when the established communication channel might include some data that might * be useful for debugging/trouble-shooting. * @param listener * Gets a notification when the channel closes, to perform clean up. Can be null. * By the time this method is called, the cause of the termination is reported to the user, * so the implementation of the listener doesn't need to do that again. */ public void setChannel(InputStream in, OutputStream out, OutputStream launchLog, Channel.Listener listener) throws IOException, InterruptedException { ChannelBuilder cb = new ChannelBuilder(nodeName,threadPoolForRemoting) .withMode(Channel.Mode.NEGOTIATE) .withHeaderStream(launchLog); for (ChannelConfigurator cc : ChannelConfigurator.all()) { cc.onChannelBuilding(cb,this); } Channel channel = cb.build(in,out); setChannel(channel,launchLog,listener); }