org.finj
Class FTPClientAdapter

java.lang.Object
  extended by org.finj.FTPClientAdapter
All Implemented Interfaces:
java.util.EventListener, FTPClientObserver

public class FTPClientAdapter
extends java.lang.Object
implements FTPClientObserver

An adapter class for receiving FTPClient observations. The methods in this class are empty. This class exists as convenience for creating observer objects. Extend this class to create a FTPClientObserver and override the methods for the events of interest. (If you implement the FTPClientObserver interface directly, you have to define all of the methods in it. This class defines null methods for them all, so you only have to define methods for observations you care about.)

Copyright (C) 2000-2008 Javier Iglesias.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Version:
$Id: FTPClientAdapter.java 47 2008-01-11 23:09:46Z jiglesias $
Author:
Javier Iglesias -- jiglesias@users.sourceforge.net
See Also:
FTPClientObserver

Constructor Summary
FTPClientAdapter()
          Constructs a new instance of this class.
 
Method Summary
 void commandSent(java.lang.String command)
          Method called when a command has been sent to the FTP server.
 void controlConnectionClosed()
          Method called whenever a new connection is closed with a server.
 void controlConnectionOpened()
          Method called whenever a new connection is opened with a server.
 void dataReceived(int bytes)
          Method called whenever data is received from the FTP server.
 void dataSent(int bytes)
          Method called whenever data is sent to the FTP server.
 void isObserving(boolean isIt)
          Method called by an FTPClient when this is added or removed as an observer.
 void responseReceived(FTPResponse response)
          Method called when a response is received from the FTP server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTPClientAdapter

public FTPClientAdapter()
Constructs a new instance of this class.

Since:
v1.0
Method Detail

isObserving

public void isObserving(boolean isIt)
Method called by an FTPClient when this is added or removed as an observer.

Specified by:
isObserving in interface FTPClientObserver
Parameters:
isIt - true when this is a new observer of a FTPClient, false when removed.
Since:
v1.0

controlConnectionOpened

public void controlConnectionOpened()
Method called whenever a new connection is opened with a server.

Specified by:
controlConnectionOpened in interface FTPClientObserver
Since:
v1.0

controlConnectionClosed

public void controlConnectionClosed()
Method called whenever a new connection is closed with a server.

Specified by:
controlConnectionClosed in interface FTPClientObserver
Since:
v1.0

commandSent

public void commandSent(java.lang.String command)
Method called when a command has been sent to the FTP server.

Specified by:
commandSent in interface FTPClientObserver
Since:
v1.0

responseReceived

public void responseReceived(FTPResponse response)
Method called when a response is received from the FTP server.

Specified by:
responseReceived in interface FTPClientObserver
Since:
v1.0

dataReceived

public void dataReceived(int bytes)
Method called whenever data is received from the FTP server. This is a convenient way to monitor the work of the FTPClient.

Specified by:
dataReceived in interface FTPClientObserver
Parameters:
bytes - number of bytes of data received from the server.
Since:
v1.0

dataSent

public void dataSent(int bytes)
Method called whenever data is sent to the FTP server. This is a convenient way to monitor the work of the FTPClient.

Specified by:
dataSent in interface FTPClientObserver
Parameters:
bytes - number of bytes of data sent to the server.
Since:
v1.0


Copyright © 2009. All Rights Reserved.