org.apache.ftpserver.ftpletcontainer.impl
Class DefaultFtpletContainer

java.lang.Object
  extended by org.apache.ftpserver.ftpletcontainer.impl.DefaultFtpletContainer
All Implemented Interfaces:
Ftplet, FtpletContainer

public class DefaultFtpletContainer
extends java.lang.Object
implements FtpletContainer

Internal class, do not use directly. This ftplet calls other ftplet methods and returns appropriate return value. Internal class, do not use directly.

Author:
Apache MINA Project

Constructor Summary
DefaultFtpletContainer()
           
DefaultFtpletContainer(java.util.Map<java.lang.String,Ftplet> ftplets)
           
 
Method Summary
 FtpletResult afterCommand(FtpSession session, FtpRequest request, FtpReply reply)
           
 FtpletResult beforeCommand(FtpSession session, FtpRequest request)
           
 void destroy()
          Destroy all ftplets.
 Ftplet getFtplet(java.lang.String name)
          Get Ftplet for the given name.
 java.util.Map<java.lang.String,Ftplet> getFtplets()
          Retrive all Ftplets registered with this container
 void init(FtpletContext ftpletContext)
           
 FtpletResult onConnect(FtpSession session)
          Call ftplet onConnect.
 FtpletResult onDisconnect(FtpSession session)
          Call ftplet onDisconnect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFtpletContainer

public DefaultFtpletContainer()

DefaultFtpletContainer

public DefaultFtpletContainer(java.util.Map<java.lang.String,Ftplet> ftplets)
Method Detail

getFtplet

public Ftplet getFtplet(java.lang.String name)
Get Ftplet for the given name.

Specified by:
getFtplet in interface FtpletContainer
Parameters:
name - The name of the Ftplet to retrive
Returns:
The Ftplet if found, or null if the name is unknown to the container.

init

public void init(FtpletContext ftpletContext)
          throws FtpException
Specified by:
init in interface Ftplet
Throws:
FtpException

getFtplets

public java.util.Map<java.lang.String,Ftplet> getFtplets()
Description copied from interface: FtpletContainer
Retrive all Ftplets registered with this container

Specified by:
getFtplets in interface FtpletContainer
Returns:
A map of all Ftplets with their name as the key
See Also:
FtpletContainer.getFtplets()

destroy

public void destroy()
Destroy all ftplets.

Specified by:
destroy in interface Ftplet

onConnect

public FtpletResult onConnect(FtpSession session)
                       throws FtpException,
                              java.io.IOException
Call ftplet onConnect.

Specified by:
onConnect in interface Ftplet
Throws:
FtpException
java.io.IOException

onDisconnect

public FtpletResult onDisconnect(FtpSession session)
                          throws FtpException,
                                 java.io.IOException
Call ftplet onDisconnect.

Specified by:
onDisconnect in interface Ftplet
Throws:
FtpException
java.io.IOException

afterCommand

public FtpletResult afterCommand(FtpSession session,
                                 FtpRequest request,
                                 FtpReply reply)
                          throws FtpException,
                                 java.io.IOException
Specified by:
afterCommand in interface Ftplet
Throws:
FtpException
java.io.IOException

beforeCommand

public FtpletResult beforeCommand(FtpSession session,
                                  FtpRequest request)
                           throws FtpException,
                                  java.io.IOException
Specified by:
beforeCommand in interface Ftplet
Throws:
FtpException
java.io.IOException


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