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

import java.util.EventObject;

/**
 * Fired by Telnet instance when Telnet server sends data to client.
 */
public class TelnetDataReceivedEvent
        extends EventObject {
    private String data;

    /**
     * Creates a new TelnetDataReceivedEvent instance.
     *
     * @param source the source of the event
     * @param data   the data received from the Telnet server
     */
    public TelnetDataReceivedEvent(Object source, String data) {
        super(source);
        if (data != null) {
            this.data = data;
        }
    }

    /**
     * Gets data received from the Telnet server as a string.
     *
     * @return the data received
     */
    public String getData() {
        return data;
    }

}
