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,
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.
|
public void init(FtpServerContext context, Listener listener)
init
in interface FtpHandler
public void sessionCreated(FtpIoSession session) throws Exception
FtpHandler
sessionCreated
in interface FtpHandler
Exception
public void sessionOpened(FtpIoSession session) throws Exception
FtpHandler
#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.sessionOpened
in interface FtpHandler
Exception
public void sessionClosed(FtpIoSession session) throws Exception
FtpHandler
sessionClosed
in interface FtpHandler
Exception
public void exceptionCaught(FtpIoSession session, Throwable cause) throws Exception
FtpHandler
IoHandler
implementation or by MINA. If cause
is instanceof
IOException
, MINA will close the connection automatically.exceptionCaught
in interface FtpHandler
Exception
public void messageReceived(FtpIoSession session, FtpRequest request) throws Exception
FtpHandler
messageReceived
in interface FtpHandler
Exception
public void sessionIdle(FtpIoSession session, org.apache.mina.core.session.IdleStatus status) throws Exception
FtpHandler
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.sessionIdle
in interface FtpHandler
Exception
public void messageSent(FtpIoSession session, FtpReply reply) throws Exception
FtpHandler
IoSession.write(Object)
is sent
out.messageSent
in interface FtpHandler
Exception
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.