|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.finj.FTPClientAdapter
public class FTPClientAdapter
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
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 |
---|
public FTPClientAdapter()
Method Detail |
---|
public void isObserving(boolean isIt)
FTPClient
when
this
is added or removed as an observer.
isObserving
in interface FTPClientObserver
isIt
- true
when this
is
a new observer of a FTPClient
,
false
when removed.public void controlConnectionOpened()
controlConnectionOpened
in interface FTPClientObserver
public void controlConnectionClosed()
controlConnectionClosed
in interface FTPClientObserver
public void commandSent(java.lang.String command)
commandSent
in interface FTPClientObserver
public void responseReceived(FTPResponse response)
responseReceived
in interface FTPClientObserver
public void dataReceived(int bytes)
FTPClient
.
dataReceived
in interface FTPClientObserver
bytes
- number of bytes of data received from the server.public void dataSent(int bytes)
FTPClient
.
dataSent
in interface FTPClientObserver
bytes
- number of bytes of data sent to the server.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |