Channel ch = computer.getChannel(); if (ch != null) { String cookie = event.getProperty(JnlpConnectionState.COOKIE_KEY);
final Channel channel = c.getChannel(); if (channel == null) { reportLauncherCreateError("The agent has not been fully initialized yet",
/** * If this factory is capable of creating a {@link SlaveInstaller} for the platform * of the given {@link SlaveComputer}, create one and return its {@link SlaveInstaller}. * * @param c * Agent that's online. */ // this method was the original abstraction in 1.0, which can be now implemented on top of createIfApplicable(Channel) public SlaveInstaller createIfApplicable(SlaveComputer c) throws IOException, InterruptedException { return createIfApplicable(c.getChannel()); }
/** * Registers bouncy castle on the slave JVM * * @param c the slave * @throws IOException if there is a problem registering bouncycastle * @throws InterruptedException if interrupted while trying to register * @throws SecurityException if the remote JVM has a security manager * @throws LinkageError if there was a classloading issue on the remote agent. */ public static void on(@Nonnull SlaveComputer c) throws IOException, InterruptedException { Channel channel = c.getChannel(); if (channel != null) { on(channel); } else { throw new IOException("Remote agent is off-line"); } } /**
@Override protected void _terminate(TaskListener listener) throws IOException, InterruptedException { LOGGER.info("Terminating slave " + name + " (uuid: " + uuid + ")"); if (getComputer() != null && getComputer().getChannel() != null) { LOGGER.info("Closing the SSH channel..."); getComputer().getChannel().close(); } LOGGER.info("Terminating OpenShift application..."); terminateApp(); }
return computer.getChannel(); } catch (AbortException e) { logw.println(e.getMessage());
return computer.getChannel(); } catch (AbortException e) { logw.println(e.getMessage());
return computer.getChannel(); } catch (AbortException e) { logw.println(e.getMessage());
return computer.getChannel(); } catch (AbortException e) { logw.println(e.getMessage());
/** * Handles JNLP slave agent connection request. */ private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { if(!getSecretKey().equals(in.readUTF())) { error(out, "Unauthorized access"); return; } final String nodeName = in.readUTF(); SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName); if(computer==null) { error(out, "No such slave: "+nodeName); return; } if(computer.getChannel()!=null) { error(out, nodeName+" is already connected to this master. Rejecting this connection."); return; } out.println(Engine.GREETING_SUCCESS); jnlpConnect(computer); }
/** * Handles JNLP slave agent connection request. */ private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { if (!getSecretKey().equals(in.readUTF())) { error(out, "Unauthorized access"); return; } final String nodeName = in.readUTF(); SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName, true); if (computer == null) { error(out, "No such slave: " + nodeName); return; } if (computer.getChannel() != null) { error(out, nodeName + " is already connected to this master. Rejecting this connection."); return; } out.println(Engine.GREETING_SUCCESS); jnlpConnect(computer); }
/** * Handles JNLP slave agent connection request. */ private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { if(!getSecretKey().equals(in.readUTF())) { error(out, "Unauthorized access"); return; } final String nodeName = in.readUTF(); SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName); if(computer==null) { error(out, "No such slave: "+nodeName); return; } if(computer.getChannel()!=null) { error(out, nodeName+" is already connected to this master. Rejecting this connection."); return; } out.println(Engine.GREETING_SUCCESS); jnlpConnect(computer); }
/** * Handles JNLP slave agent connection request. */ private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException { if(!getSecretKey().equals(in.readUTF())) { error(out, "Unauthorized access"); return; } final String nodeName = in.readUTF(); SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName); if(computer==null) { error(out, "No such slave: "+nodeName); return; } if(computer.getChannel()!=null) { error(out, nodeName+" is already connected to this master. Rejecting this connection."); return; } out.println(Engine.GREETING_SUCCESS); jnlpConnect(computer); }
public Launcher createLauncher(TaskListener listener) { SlaveComputer c = getComputer(); return new RemoteLauncher(listener, c.getChannel(), c.isUnix()).decorateFor(this); }
public Launcher createLauncher(TaskListener listener) { SlaveComputer c = getComputer(); return new RemoteLauncher(listener, c.getChannel(), c.isUnix()).decorateFor(this); }
public Launcher createLauncher(TaskListener listener) { SlaveComputer c = getComputer(); return new RemoteLauncher(listener, c.getChannel(), c.isUnix()).decorateFor(this); }
public Launcher createLauncher(TaskListener listener) { SlaveComputer c = getComputer(); return new RemoteLauncher(listener, c.getChannel(), c.isUnix()).decorateFor(this); }
Channel ch = computer.getChannel(); if(ch !=null) { String c = request.getProperty("Cookie");
public Void call() throws Exception { try { Channel ch = sc.getChannel(); Slave n = sc.getNode(); if (n==null || ch==null) return null; // defensive check
Channel ch = computer.getChannel(); if (ch != null) { String cookie = event.getProperty(JnlpConnectionState.COOKIE_KEY);