public class DefaultFtpHandler extends Object implements FtpHandler
| Constructor and Description |
|---|
DefaultFtpHandler() |
| Modifier and Type | Method and Description |
|---|---|
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,
org.apache.ftpserver.ftplet.FtpRequest request)
Invoked when a message is received.
|
void |
messageSent(FtpIoSession session,
org.apache.ftpserver.ftplet.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.
|
public void init(FtpServerContext context, Listener listener)
init in interface FtpHandlerpublic void sessionCreated(FtpIoSession session) throws Exception
FtpHandlersessionCreated in interface FtpHandlerExceptionpublic void sessionOpened(FtpIoSession session) throws Exception
FtpHandlerFtpHandler.sessionCreated(FtpIoSession). The biggest difference from
FtpHandler.sessionCreated(FtpIoSession) is that it's invoked from other thread
than an I/O processor thread once thread modesl is configured properly.sessionOpened in interface FtpHandlerExceptionpublic void sessionClosed(FtpIoSession session) throws Exception
FtpHandlersessionClosed in interface FtpHandlerExceptionpublic void exceptionCaught(FtpIoSession session, Throwable cause) throws Exception
FtpHandlerIoHandler
implementation or by MINA. If cause is instanceof
IOException, MINA will close the connection automatically.exceptionCaught in interface FtpHandlerExceptionpublic void messageReceived(FtpIoSession session, org.apache.ftpserver.ftplet.FtpRequest request) throws Exception
FtpHandlermessageReceived in interface FtpHandlerExceptionpublic void sessionIdle(FtpIoSession session, org.apache.mina.core.session.IdleStatus status) throws Exception
FtpHandlerIdleStatus 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.sessionIdle in interface FtpHandlerExceptionpublic void messageSent(FtpIoSession session, org.apache.ftpserver.ftplet.FtpReply reply) throws Exception
FtpHandlerIoSession.write(Object) is sent
out.messageSent in interface FtpHandlerExceptionCopyright © 2003–2017 The Apache Software Foundation. All rights reserved.