|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ftpserver.BaseFtpConnection
This is a generic ftp connection handler. It delegates the request to appropriate methods in subclasses.
Field Summary | |
protected boolean |
mbStopRequest
|
protected FtpConfig |
mConfig
|
protected java.net.Socket |
mControlSocket
|
protected org.apache.ftpserver.FtpDataConnection |
mDataConnection
|
protected static java.lang.Class[] |
METHOD_INPUT_SIG
|
protected FtpStatus |
mFtpStatus
|
protected FtpConnectionObserver |
mObserver
|
protected SpyConnectionInterface |
mSpy
|
protected FtpUser |
mUser
|
protected FtpWriter |
mWriter
|
Constructor Summary | |
BaseFtpConnection(FtpConfig ftpConfig)
Set configuration file and the control socket. |
Method Summary | |
void |
dataTransferred(int sz)
This method tracks data transfer. |
FtpConfig |
getConfig()
Get config object |
FtpConnectionObserver |
getObserver()
Get observer |
SpyConnectionInterface |
getSpyObject()
Get connection spy object |
FtpStatus |
getStatus()
Get status object |
FtpUser |
getUser()
Get user object |
void |
handleConnection(java.net.Socket socket)
Server one FTP connection. |
protected boolean |
hasPermission(FtpRequest request)
Check permission - default implementation - does nothing. |
boolean |
isClosed()
Is the connection closed? |
void |
notifyObserver()
Notify observer. |
void |
service(FtpRequest request,
FtpWriter writer)
Execute the ftp command. |
void |
setObserver(FtpConnectionObserver obsr)
Set observer |
void |
setSpyObject(SpyConnectionInterface spy)
Set spy object |
protected void |
spyRequest(java.lang.String str)
Monitor the user request. |
void |
stop()
User logout and stop this thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.Class[] METHOD_INPUT_SIG
protected FtpConfig mConfig
protected FtpStatus mFtpStatus
protected org.apache.ftpserver.FtpDataConnection mDataConnection
protected FtpUser mUser
protected SpyConnectionInterface mSpy
protected FtpConnectionObserver mObserver
protected java.net.Socket mControlSocket
protected FtpWriter mWriter
protected boolean mbStopRequest
Constructor Detail |
public BaseFtpConnection(FtpConfig ftpConfig)
Method Detail |
public void handleConnection(java.net.Socket socket)
handleConnection
in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandler
public void service(FtpRequest request, FtpWriter writer) throws java.io.IOException
java.io.IOException
protected boolean hasPermission(FtpRequest request)
public void stop()
public boolean isClosed()
protected void spyRequest(java.lang.String str)
public FtpUser getUser()
public SpyConnectionInterface getSpyObject()
public void setSpyObject(SpyConnectionInterface spy)
public FtpConnectionObserver getObserver()
public void setObserver(FtpConnectionObserver obsr)
public void notifyObserver()
public void dataTransferred(int sz)
dataTransferred
in interface StreamConnectorObserver
public FtpConfig getConfig()
public FtpStatus getStatus()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |