RSE
Release 1.0

org.eclipse.rse.services.ssh.shell
Class SshShellWriterThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.eclipse.rse.services.ssh.shell.SshShellWriterThread
All Implemented Interfaces:
Runnable

public class SshShellWriterThread
extends Thread

The SshShellWriterThread is a Thread used to print commands into a running ssh shell channel. A separate Thread is needed because the PipedInputStream used by ssh requirs that the writing end of the Pipe be a Thread that remains alive during the entire lifetime of the shell.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SshShellWriterThread(PrintWriter outputWriter)
          constructor for ssh shell writer thread
 
Method Summary
 boolean isDone()
           
 void run()
           
 boolean sendCommand(String command)
          Write command to remote side.
 void stopThread()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SshShellWriterThread

public SshShellWriterThread(PrintWriter outputWriter)
constructor for ssh shell writer thread

Parameters:
outputWriter - PrintWriter to write to in separate Thread
Method Detail

isDone

public boolean isDone()

stopThread

public void stopThread()

sendCommand

public boolean sendCommand(String command)
Write command to remote side. Wait until the thread takes the command (no queueing).

Parameters:
command - to send
Returns:
boolean true if command was sent ok

run

public void run()

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.