/*
 * @(#)IpClientListener.java
 *
 * Copyright (c) 2003 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.ipclient;

import java.util.EventListener;

/**
 * Implements methods for capturing connected and disconnected events from
 * IpClient class. Your application should implement this interface to capture
 * these events.
 * <p/>
 * <pre>
 * public class Application ... implements IpClientListener
 * {
 *  ...
 *  public ... initMethod(...)
 *  {
 *      IpClient client = new IpClient(hostname,port);
 *      client.addIpClientListener(this);
 *  }
 *  ...
 * }
 * </pre>
 */
public interface IpClientListener
        extends EventListener {

    /**
     * Invoked when connection to server is established.
     *
     * @param event a <code>IpClientConnectedEvent</code>
     *
     * @see IpClientConnectedEvent
     */
    void connected(IpClientConnectedEvent event);

    /**
     * Invoked when connection to server is closed.
     *
     * @param event a <code>IpClientDisconnectedEvent</code>
     *
     * @see IpClientDisconnectedEvent
     */
    void disconnected(IpClientDisconnectedEvent event);
}
