/*
 * @(#)SshAdapter.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 extending this class your application should register
 * itself as an EventListener which may look somewhat like this:<br>
 * <pre>
 * public class Application ... extends SshAdapter
 * {
 *  ...
 *  public ... initMethod(...)
 *  {
 *    Ssh ssh = new Ssh(hostname,username,password);
 *    ssh.addSshListener(this);
 *  }
 *  ...
 * }
 * </pre>
 * </p>
 *
 * @author vglass
 */
public class SshAdapter
        implements SshListener {

    /**
     * Invoked when SSH connection is established.
     *
     * @param event a SshConnectedEvent
     *
     * @see SshConnectedEvent
     * @see Ssh#connect
     */
    public void connected(SshConnectedEvent event) {
    }

    /**
     * Invoked when SSH connection is released.
     * DisconnectReasons can occur in many circumstances including IOException during socket
     * read/write or manually invoking the <code>Ssh#disconnect</code> method.
     *
     * @param event a SshDisconnectedEvent
     *
     * @see SshDisconnectedEvent
     * @see Ssh#disconnect
     */
    public void disconnected(SshDisconnectedEvent event) {
    }

    /**
     * Invoked when data is received from Telnet server.
     *
     * @param event a <code>SshDataReceivedEvent</code>
     *
     * @see SshDataReceivedEvent
     */
    public void dataReceived(SshDataReceivedEvent event) {
    }
}
