org.apache.ftpserver.impl
Class DefaultFtpSession

java.lang.Object
  extended by org.apache.ftpserver.impl.DefaultFtpSession
All Implemented Interfaces:
FtpSession

public class DefaultFtpSession
extends java.lang.Object
implements FtpSession

Internal class, do not use directly. FTP session

Author:
Apache MINA Project

Constructor Summary
DefaultFtpSession(FtpIoSession ioSession)
          Default constructor.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Get attribute
 java.net.InetSocketAddress getClientAddress()
          Get remote address
 java.security.cert.Certificate[] getClientCertificates()
           
 java.util.Date getConnectionTime()
          Get connection time.
 DataConnectionFactory getDataConnection()
          Get FTP data connection.
 DataType getDataType()
          Get the data type.
 int getFailedLogins()
           
 long getFileOffset()
          Get file offset.
 FileSystemView getFileSystemView()
          Get file system view.
 java.lang.String getLanguage()
          Get language.
 java.util.Date getLastAccessTime()
          Get last access time.
 java.util.Date getLoginTime()
          Get the login time.
 int getMaxIdleTime()
           
 FtpFile getRenameFrom()
          Get rename from file object.
 java.net.InetSocketAddress getServerAddress()
           
 java.util.UUID getSessionId()
          
 Structure getStructure()
          Get structure.
 User getUser()
          Get user.
 java.lang.String getUserArgument()
          Returns user name entered in USER command
 void increaseReadDataBytes(int increment)
          Increase the number of bytes read on the data connection
 void increaseWrittenDataBytes(int increment)
          Increase the number of bytes written on the data connection
 boolean isLoggedIn()
          Is logged-in
 boolean isSecure()
           
 void removeAttribute(java.lang.String name)
           
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set attribute.
 void setMaxIdleTime(int maxIdleTime)
           
 void write(FtpReply reply)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFtpSession

public DefaultFtpSession(FtpIoSession ioSession)
Default constructor.

Method Detail

isLoggedIn

public boolean isLoggedIn()
Is logged-in

Specified by:
isLoggedIn in interface FtpSession

getDataConnection

public DataConnectionFactory getDataConnection()
Get FTP data connection.

Specified by:
getDataConnection in interface FtpSession

getFileSystemView

public FileSystemView getFileSystemView()
Get file system view.

Specified by:
getFileSystemView in interface FtpSession

getConnectionTime

public java.util.Date getConnectionTime()
Get connection time.

Specified by:
getConnectionTime in interface FtpSession

getLoginTime

public java.util.Date getLoginTime()
Get the login time.

Specified by:
getLoginTime in interface FtpSession

getLastAccessTime

public java.util.Date getLastAccessTime()
Get last access time.

Specified by:
getLastAccessTime in interface FtpSession

getFileOffset

public long getFileOffset()
Get file offset.

Specified by:
getFileOffset in interface FtpSession

getRenameFrom

public FtpFile getRenameFrom()
Get rename from file object.

Specified by:
getRenameFrom in interface FtpSession

getUserArgument

public java.lang.String getUserArgument()
Returns user name entered in USER command

Specified by:
getUserArgument in interface FtpSession
Returns:
user name entered in USER command

getLanguage

public java.lang.String getLanguage()
Get language.

Specified by:
getLanguage in interface FtpSession

getUser

public User getUser()
Get user.

Specified by:
getUser in interface FtpSession

getClientAddress

public java.net.InetSocketAddress getClientAddress()
Get remote address

Specified by:
getClientAddress in interface FtpSession

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Get attribute

Specified by:
getAttribute in interface FtpSession

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set attribute.

Specified by:
setAttribute in interface FtpSession

getMaxIdleTime

public int getMaxIdleTime()
Specified by:
getMaxIdleTime in interface FtpSession

setMaxIdleTime

public void setMaxIdleTime(int maxIdleTime)
Specified by:
setMaxIdleTime in interface FtpSession

getDataType

public DataType getDataType()
Get the data type.

Specified by:
getDataType in interface FtpSession

getStructure

public Structure getStructure()
Get structure.

Specified by:
getStructure in interface FtpSession

getClientCertificates

public java.security.cert.Certificate[] getClientCertificates()
Specified by:
getClientCertificates in interface FtpSession

getServerAddress

public java.net.InetSocketAddress getServerAddress()
Specified by:
getServerAddress in interface FtpSession

getFailedLogins

public int getFailedLogins()
Specified by:
getFailedLogins in interface FtpSession

removeAttribute

public void removeAttribute(java.lang.String name)
Specified by:
removeAttribute in interface FtpSession

write

public void write(FtpReply reply)
           throws FtpException
Specified by:
write in interface FtpSession
Throws:
FtpException

isSecure

public boolean isSecure()
Specified by:
isSecure in interface FtpSession

increaseWrittenDataBytes

public void increaseWrittenDataBytes(int increment)
Increase the number of bytes written on the data connection

Parameters:
increment - The number of bytes written

increaseReadDataBytes

public void increaseReadDataBytes(int increment)
Increase the number of bytes read on the data connection

Parameters:
increment - The number of bytes written

getSessionId

public java.util.UUID getSessionId()

Specified by:
getSessionId in interface FtpSession


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