private List<String> commands = new ArrayList<String>();
private String command;
- public void run() {
- Session session = openSession();
+ public void run(Session session) {
if (command != null) {
if (commands.size() != 0)
throw new SlcException(
remoteExec(session, cmd);
}
}
- session.disconnect();
}
protected void remoteExec(Session session, String command) {
InputStream in = channel.getInputStream();
if (log.isDebugEnabled())
- log.debug("Exec '" + command + "' on " + getSshTarget() + "...");
+ log
+ .debug("Exec '" + command + "' on " + getSshTarget()
+ + "...");
channel.connect();