/*
 * @(#)SshListener.java
 *
 * Copyright (c) 2001-2002 JScape
 * 1147 S. 53rd Pl., Mesa, Arizona, 85206, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JScape. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JScape.
 */
package com.jscape.inet.ssh;

/**
 * Implements methods for capturing events sourced from Ssh class. Typicaly
 * your application will implement this interface to capture the following
 * events :
 * <p/>
 * <p/>
 * <code>SshConnectedEvent</code><br>
 * <code>SshDisconnectedEvent</code><br>
 * <code>SshDataReceivedEvent</code>
 * </p>
 * <p/>
 * <p/>
 * In addition to implementing this interface your application should register
 * itself as an EventListener which may look somewhat like this:<br>
 * <pre>
 * public class Application ... implements SshListener
 * {
 *  ...
 *  public ... initMethod(...)
 *  {
 *    Ssh ssh = new Ssh(hostname,username,password);
 *    ssh.addSshListener(this);
 *  }
 *  ...
 * }
 * </pre>
 * </p>
 *
 * @author vglass
 * @version 1.0
 */
public interface SshListener {

    /**
     * Invoked when SSH connection is established.
     *
     * @param event a SshConnectedEvent
     *
     * @see SshConnectedEvent
     */
    void connected(SshConnectedEvent event);

    /**
     * Invoked when SSH connection is released.
     *
     * @param event a SshDisconnectedEvent
     *
     * @see SshDisconnectedEvent
     */
    void disconnected(SshDisconnectedEvent event);

    /**
     * Invoked when data is received from SSH server.
     *
     * @param event a SshDataReceivedEvent
     */
    void dataReceived(SshDataReceivedEvent event);

}
