/*
 * @(#)IpClientDisconnectedEvent.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.EventObject;

/**
 * Fired when connection with server is closed.
 */
public class IpClientDisconnectedEvent
        extends EventObject {

    private String hostname;
    private int port;

    /**
     * Creates a new IpClientDisconnectedEvent instance.
     *
     * @param source   the source of this event
     * @param hostname the server hostname
     * @param port     the server port
     */
    public IpClientDisconnectedEvent(Object source, String hostname, int port) {
        super(source);
        this.hostname = hostname;
        this.port = port;
    }

    /**
     * Gets server hostname.
     *
     * @return server hostname
     */
    public String getHostname() {
        return hostname;
    }

    /**
     * Gets server port.
     *
     * @return server port
     */
    public int getPort() {
        return port;
    }
}
