public interface FtpSession
setAttribute()
will be always available later
unless that attribute is removed or the client disconnects.Modifier and Type | Method and Description |
---|---|
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
|
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.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 namevoid 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 clientFtpException
boolean isSecure()
UUID getSessionId()
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.