RSE
Release 3.2

org.eclipse.rse.services.shells
Class HostShellProcessAdapter

java.lang.Object
  extended by java.lang.Process
      extended by org.eclipse.rse.services.shells.HostShellProcessAdapter
All Implemented Interfaces:
IHostShellOutputListener

public class HostShellProcessAdapter
extends Process
implements IHostShellOutputListener

This class represents a host shell process. It does not represent one process running in the shell. This means that the output of multiple shell commands will be returned until the shell exits.


Constructor Summary
HostShellProcessAdapter(IHostShell hostShell)
          Constructor.
 
Method Summary
 void destroy()
          Exits the shell.
 int exitValue()
          There is no relevant exit value to return when the shell exits.
 InputStream getErrorStream()
          Returns the error stream of the shell.
 InputStream getInputStream()
          Returns the input stream for the shell.
 OutputStream getOutputStream()
          Returns the output stream for the shell.
 void shellOutputChanged(IHostShellChangeEvent event)
          Process an RSE Shell event, by writing the lines of text contained in the event into the adapter's streams.
 int waitFor()
          Waits for the shell to exit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostShellProcessAdapter

public HostShellProcessAdapter(IHostShell hostShell)
                        throws IOException
Constructor.

Parameters:
hostShell - An instance of the IHostShell class.
Throws:
IOException
Method Detail

destroy

public void destroy()
Exits the shell.

Specified by:
destroy in class Process
See Also:
Process.destroy()

exitValue

public int exitValue()
There is no relevant exit value to return when the shell exits. This always returns 0.

Specified by:
exitValue in class Process

getErrorStream

public InputStream getErrorStream()
Returns the error stream of the shell.

Specified by:
getErrorStream in class Process
See Also:
Process.getErrorStream()

getInputStream

public InputStream getInputStream()
Returns the input stream for the shell.

Specified by:
getInputStream in class Process
See Also:
Process.getInputStream()

getOutputStream

public OutputStream getOutputStream()
Returns the output stream for the shell.

Specified by:
getOutputStream in class Process
See Also:
Process.getOutputStream()

waitFor

public int waitFor()
            throws InterruptedException
Waits for the shell to exit.

Specified by:
waitFor in class Process
Throws:
InterruptedException
See Also:
Process.waitFor()

shellOutputChanged

public void shellOutputChanged(IHostShellChangeEvent event)
Process an RSE Shell event, by writing the lines of text contained in the event into the adapter's streams.

Specified by:
shellOutputChanged in interface IHostShellOutputListener
See Also:
IHostShellOutputListener.shellOutputChanged(org.eclipse.rse.services.shells.IHostShellChangeEvent)

RSE
Release 3.2

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