expectj
Class AbstractSpawnable

java.lang.Object
  extended by expectj.AbstractSpawnable
All Implemented Interfaces:
Spawnable
Direct Known Subclasses:
ProcessSpawn, SshSpawn

public abstract class AbstractSpawnable
extends Object
implements Spawnable

Base class for spawnables providing an onClose() method that should be called on close.

Author:
johan.walles@gmail.com

Nested Class Summary
 
Nested classes/interfaces inherited from interface expectj.Spawnable
Spawnable.CloseListener
 
Constructor Summary
AbstractSpawnable()
           
 
Method Summary
protected  void onClose()
          Call the close listener if we have one.
 void setCloseListener(Spawnable.CloseListener closeListener)
          Register a listener that will be called when this spawnable closes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface expectj.Spawnable
getExitValue, getStderr, getStdin, getStdout, isClosed, start, stop
 

Constructor Detail

AbstractSpawnable

public AbstractSpawnable()
Method Detail

setCloseListener

public void setCloseListener(Spawnable.CloseListener closeListener)
Description copied from interface: Spawnable
Register a listener that will be called when this spawnable closes.

Specified by:
setCloseListener in interface Spawnable
Parameters:
closeListener - The listener that will be notified when this spawnable closes.

onClose

protected final void onClose()
Call the close listener if we have one.



Copyright © 2010. All Rights Reserved.