If the slave agent is launched successfully, {@link SlaveComputer#setChannel(InputStream,OutputStream,TaskListener,Channel.Listener)}should be invoked in the end to notify Hudson of the established connection. The operation could also fail, in which case there's no need to make any callback notification, (except to notify the user of the failure through {@link StreamTaskListener}.) Also note that the normal return of this method call does not necessarily signify a successful launch. If someone programmatically calls this method and wants to find out if the launch was a success, use {@link SlaveComputer#isOnline()} at the end.
This method must operate synchronously. Asynchrony is provided by {@link Computer#connect(boolean)} andits correct operation depends on this. @param listener The progress of the launch, as well as any error, should be sent to this listener. @throws IOException if the method throws an {@link IOException} or {@link InterruptedException}, the launch was considered a failure and the stack trace is reported into the listener. This handling is just so that the implementation of this method doesn't have to dilligently catch those exceptions.
|
|