org.apache.ftpserver.impl
Class IODataConnection

java.lang.Object
  extended by org.apache.ftpserver.impl.IODataConnection
All Implemented Interfaces:
DataConnection

public class IODataConnection
extends Object
implements DataConnection

Internal class, do not use directly. An active open data connection, used for transfering data over the data connection.

Author:
Apache MINA Project

Constructor Summary
IODataConnection(Socket socket, FtpIoSession session, ServerDataConnectionFactory factory)
           
 
Method Summary
protected  void notifyObserver()
          Notify connection manager observer.
 long transferFromClient(FtpSession session, OutputStream out)
          Transfer data from the client (e.g.
 long transferToClient(FtpSession session, InputStream in)
          Transfer data to the client (e.g.
 void transferToClient(FtpSession session, String str)
          Transfer a string to the client, e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IODataConnection

public IODataConnection(Socket socket,
                        FtpIoSession session,
                        ServerDataConnectionFactory factory)
Method Detail

transferFromClient

public final long transferFromClient(FtpSession session,
                                     OutputStream out)
                              throws IOException
Description copied from interface: DataConnection
Transfer data from the client (e.g. STOR).

Specified by:
transferFromClient in interface DataConnection
Parameters:
session - The current FtpSession
out - The OutputStream containing the destination of the data from the client.
Returns:
The length of the transferred data
Throws:
IOException

transferToClient

public final long transferToClient(FtpSession session,
                                   InputStream in)
                            throws IOException
Description copied from interface: DataConnection
Transfer data to the client (e.g. RETR).

Specified by:
transferToClient in interface DataConnection
Parameters:
session - The current FtpSession
in - Data to be transfered to the client
Returns:
The length of the transferred data
Throws:
IOException

transferToClient

public final void transferToClient(FtpSession session,
                                   String str)
                            throws IOException
Description copied from interface: DataConnection
Transfer a string to the client, e.g. during LIST

Specified by:
transferToClient in interface DataConnection
Parameters:
session - The current FtpSession
str - The string to transfer
Throws:
IOException

notifyObserver

protected void notifyObserver()
Notify connection manager observer.



Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.