org.apache.ftpserver.impl
Class DefaultFtpHandler

java.lang.Object
  extended by org.apache.ftpserver.impl.DefaultFtpHandler
All Implemented Interfaces:
FtpHandler

public class DefaultFtpHandler
extends Object
implements FtpHandler

Internal class, do not use directly.

Author:
Apache MINA Project *

Constructor Summary
DefaultFtpHandler()
           
 
Method Summary
 void exceptionCaught(FtpIoSession session, Throwable cause)
          Invoked when any exception is thrown by user IoHandler implementation or by MINA.
 void init(FtpServerContext context, Listener listener)
           
 void messageReceived(FtpIoSession session, FtpRequest request)
          Invoked when a message is received.
 void messageSent(FtpIoSession session, FtpReply reply)
          Invoked when a message written by IoSession.write(Object) is sent out.
 void sessionClosed(FtpIoSession session)
          Invoked when a connection is closed.
 void sessionCreated(FtpIoSession session)
          Invoked from an I/O processor thread when a new connection has been created.
 void sessionIdle(FtpIoSession session, org.apache.mina.core.session.IdleStatus status)
          Invoked with the related IdleStatus when a connection becomes idle.
 void sessionOpened(FtpIoSession session)
          Invoked when a connection has been opened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFtpHandler

public DefaultFtpHandler()
Method Detail

init

public void init(FtpServerContext context,
                 Listener listener)
Specified by:
init in interface FtpHandler

sessionCreated

public void sessionCreated(FtpIoSession session)
                    throws Exception
Description copied from interface: FtpHandler
Invoked from an I/O processor thread when a new connection has been created. Because this method is supposed to be called from the same thread that handles I/O of multiple sessions, please implement this method to perform tasks that consumes minimal amount of time such as socket parameter and user-defined session attribute initialization.

Specified by:
sessionCreated in interface FtpHandler
Throws:
Exception

sessionOpened

public void sessionOpened(FtpIoSession session)
                   throws Exception
Description copied from interface: FtpHandler
Invoked when a connection has been opened. This method is invoked after #sessionCreated(IoSession). The biggest difference from #sessionCreated(IoSession) is that it's invoked from other thread than an I/O processor thread once thread modesl is configured properly.

Specified by:
sessionOpened in interface FtpHandler
Throws:
Exception

sessionClosed

public void sessionClosed(FtpIoSession session)
                   throws Exception
Description copied from interface: FtpHandler
Invoked when a connection is closed.

Specified by:
sessionClosed in interface FtpHandler
Throws:
Exception

exceptionCaught

public void exceptionCaught(FtpIoSession session,
                            Throwable cause)
                     throws Exception
Description copied from interface: FtpHandler
Invoked when any exception is thrown by user IoHandler implementation or by MINA. If cause is instanceof IOException, MINA will close the connection automatically.

Specified by:
exceptionCaught in interface FtpHandler
Throws:
Exception

messageReceived

public void messageReceived(FtpIoSession session,
                            FtpRequest request)
                     throws Exception
Description copied from interface: FtpHandler
Invoked when a message is received.

Specified by:
messageReceived in interface FtpHandler
Throws:
Exception

sessionIdle

public void sessionIdle(FtpIoSession session,
                        org.apache.mina.core.session.IdleStatus status)
                 throws Exception
Description copied from interface: FtpHandler
Invoked with the related IdleStatus when a connection becomes idle. This method is not invoked if the transport type is UDP; it's a known bug, and will be fixed in 2.0.

Specified by:
sessionIdle in interface FtpHandler
Throws:
Exception

messageSent

public void messageSent(FtpIoSession session,
                        FtpReply reply)
                 throws Exception
Description copied from interface: FtpHandler
Invoked when a message written by IoSession.write(Object) is sent out.

Specified by:
messageSent in interface FtpHandler
Throws:
Exception


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