SSH Factory

com.jscape.inet.ssh
Interface SshScriptListener


public interface SshScriptListener

Implements methods for capturing events sourced from SshScript class. Typicaly your application will implement this interface to capture the following events :

SshTaskStartEvent
SshTaskEndEvent
SshTaskFailedEvent

In addition to implementing this interface your application should register itself as an EventListener which may look somewhat like this:

 public class Application ... implements SshScriptListener
 {
  ...
  public ... initMethod(...)
  {
    Ssh ssh = new Ssh(hostname,username,password);
    SshScript script = new SshScript(ssh);
    script.addSshScriptListener(this);
  }
  ...
 }
 


Method Summary
 void taskEnd(SshTaskEndEvent event)
          Invoked when command for a SshTask completes execution.
 void taskFailed(SshTaskFailedEvent event)
          Invoked when command for a SshTask fails execution.
 void taskStart(SshTaskStartEvent event)
          Invoked when command for a SshTask begins execution.
 void taskTimeout(SshTaskTimeoutEvent event)
          Invoked when a SshTask exceeds timeout waiting for end prompt.
 

Method Detail

taskStart

void taskStart(SshTaskStartEvent event)
Invoked when command for a SshTask begins execution.

Parameters:
event - a SshTaskStartEvent
See Also:
SshTaskStartEvent

taskEnd

void taskEnd(SshTaskEndEvent event)
Invoked when command for a SshTask completes execution.

Parameters:
event - a SshTaskEndEvent
See Also:
SshTaskEndEvent

taskFailed

void taskFailed(SshTaskFailedEvent event)
Invoked when command for a SshTask fails execution.

Parameters:
event - a SshTaskFailedEvent
See Also:
SshTaskFailedEvent

taskTimeout

void taskTimeout(SshTaskTimeoutEvent event)
Invoked when a SshTask exceeds timeout waiting for end prompt.

Parameters:
event - a SshTaskTimeoutEvent
See Also:
SshTaskTimeoutEvent

SSH Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved