|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FtpSession
Defines an client session with the FTP server. The session is born when the
client connects and dies when the client disconnects. Ftplet methods will
always get the same session for one user and one connection. So the
attributes set by setAttribute()
will be always available later
unless that attribute is removed or the client disconnects.
Method Summary | |
---|---|
Object |
getAttribute(String name)
Returns the value of the named attribute as an Object. |
InetSocketAddress |
getClientAddress()
Returns the IP address of the client that sent the request. |
Certificate[] |
getClientCertificates()
Retrieve the certificates for the client, if running over SSL and with client authentication |
Date |
getConnectionTime()
Get connection time. |
DataConnectionFactory |
getDataConnection()
Get FTP data connection factory, used to transfer data to and from the client. |
DataType |
getDataType()
Get the data type. |
int |
getFailedLogins()
Get the number of failed logins. |
long |
getFileOffset()
Get file upload/download offset. |
FileSystemView |
getFileSystemView()
Get user file system view. |
String |
getLanguage()
Get the requested language. |
Date |
getLastAccessTime()
Get last access time. |
Date |
getLoginTime()
Get the login time. |
int |
getMaxIdleTime()
Returns maximum idle time. |
FtpFile |
getRenameFrom()
Get rename from file object. |
InetSocketAddress |
getServerAddress()
Returns the IP address of the server |
UUID |
getSessionId()
Get the unique ID for this session. |
Structure |
getStructure()
Get structure. |
User |
getUser()
Get user object. |
String |
getUserArgument()
Returns user name entered in USER command |
boolean |
isLoggedIn()
Is the user logged in? |
boolean |
isSecure()
Indicates whether the control socket for this session is secure, that is, running over SSL/TLS |
void |
removeAttribute(String name)
Removes an attribute from this request. |
void |
setAttribute(String name,
Object value)
Stores an attribute in this request. |
void |
setMaxIdleTime(int maxIdleTimeSec)
Set maximum idle time in seconds. |
void |
write(FtpReply reply)
Write a reply to the client |
Method Detail |
---|
InetSocketAddress getClientAddress()
InetAddress
InetSocketAddress getServerAddress()
InetAddress
DataConnectionFactory getDataConnection()
DataConnectionFactory
Certificate[] getClientCertificates()
Date getConnectionTime()
Date getLoginTime()
int getFailedLogins()
Date getLastAccessTime()
int getMaxIdleTime()
ConnectionManagerImpl#getDefaultIdleSec()
until user login, and
User.getMaxIdleTime()
after user login.
void setMaxIdleTime(int maxIdleTimeSec)
ConnectionManagerImpl#getDefaultIdleSec()
until user login, and
User.getMaxIdleTime()
after user login.
maxIdleTimeSec
- The number of seconds the client is allowed to be idle before disconnected.User getUser()
User
String getUserArgument()
String getLanguage()
boolean isLoggedIn()
FileSystemView getFileSystemView()
FileSystemView
for this session/userlong getFileOffset()
FtpFile getRenameFrom()
DataType getDataType()
DataType
for this sessionStructure getStructure()
Structure
for this sessionObject getAttribute(String name)
name
- The attribute name
void setAttribute(String name, Object value)
name
- The attribute namevalue
- The attribute valuevoid removeAttribute(String name)
name
- The attribute namevoid write(FtpReply reply) throws FtpException
reply
- The reply that will be sent to the client
FtpException
boolean isSecure()
UUID getSessionId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |