public class FtpIoSession extends Object implements org.apache.mina.core.session.IoSession
Modifier and Type | Field and Description |
---|---|
static String |
ATTRIBUTE_PREFIX
Contains user name between USER and PASS commands
|
Constructor and Description |
---|
FtpIoSession(org.apache.mina.core.session.IoSession wrappedSession,
FtpServerContext context) |
Modifier and Type | Method and Description |
---|---|
org.apache.mina.core.future.CloseFuture |
close() |
org.apache.mina.core.future.CloseFuture |
close(boolean immediately) |
boolean |
containsAttribute(Object key) |
Object |
getAttachment() |
Object |
getAttribute(Object key) |
Object |
getAttribute(Object key,
Object defaultValue) |
Set<Object> |
getAttributeKeys() |
int |
getBothIdleCount() |
Certificate[] |
getClientCertificates() |
org.apache.mina.core.future.CloseFuture |
getCloseFuture() |
org.apache.mina.core.session.IoSessionConfig |
getConfig() |
long |
getCreationTime() |
Object |
getCurrentWriteMessage() |
org.apache.mina.core.write.WriteRequest |
getCurrentWriteRequest() |
ServerDataConnectionFactory |
getDataConnection() |
DataType |
getDataType() |
int |
getFailedLogins() |
long |
getFileOffset() |
FileSystemView |
getFileSystemView() |
org.apache.mina.core.filterchain.IoFilterChain |
getFilterChain() |
FtpSession |
getFtpletSession() |
org.apache.mina.core.service.IoHandler |
getHandler() |
long |
getId() |
int |
getIdleCount(org.apache.mina.core.session.IdleStatus status) |
String |
getLanguage() |
Date |
getLastAccessTime() |
long |
getLastBothIdleTime() |
long |
getLastIdleTime(org.apache.mina.core.session.IdleStatus status) |
long |
getLastIoTime() |
long |
getLastReaderIdleTime() |
long |
getLastReadTime() |
FtpReply |
getLastReply()
Returns the last reply that was sent to the client.
|
long |
getLastWriterIdleTime() |
long |
getLastWriteTime() |
Listener |
getListener() |
SocketAddress |
getLocalAddress() |
Date |
getLoginTime() |
int |
getMaxIdleTime() |
long |
getReadBytes() |
double |
getReadBytesThroughput() |
int |
getReaderIdleCount() |
long |
getReadMessages() |
double |
getReadMessagesThroughput() |
SocketAddress |
getRemoteAddress() |
FtpFile |
getRenameFrom() |
long |
getScheduledWriteBytes() |
int |
getScheduledWriteMessages() |
org.apache.mina.core.service.IoService |
getService() |
SocketAddress |
getServiceAddress() |
UUID |
getSessionId() |
Structure |
getStructure() |
org.apache.mina.core.service.TransportMetadata |
getTransportMetadata() |
User |
getUser() |
String |
getUserArgument() |
org.apache.mina.core.write.WriteRequestQueue |
getWriteRequestQueue() |
int |
getWriterIdleCount() |
long |
getWrittenBytes() |
double |
getWrittenBytesThroughput() |
long |
getWrittenMessages() |
double |
getWrittenMessagesThroughput() |
void |
increaseFailedLogins() |
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 |
isBothIdle() |
boolean |
isClosing() |
boolean |
isConnected() |
boolean |
isIdle(org.apache.mina.core.session.IdleStatus status) |
boolean |
isLoggedIn()
Is logged-in
|
boolean |
isReaderIdle() |
boolean |
isReadSuspended() |
boolean |
isSecure()
Indicates whether the control socket for this session is secure, that is,
running over SSL/TLS
|
boolean |
isSecured() |
boolean |
isWriterIdle() |
boolean |
isWriteSuspended() |
void |
logoutUser() |
org.apache.mina.core.future.ReadFuture |
read() |
void |
reinitialize() |
Object |
removeAttribute(Object key) |
boolean |
removeAttribute(Object key,
Object value) |
boolean |
replaceAttribute(Object key,
Object oldValue,
Object newValue) |
void |
resetState() |
void |
resumeRead() |
void |
resumeWrite() |
Object |
setAttachment(Object attachment) |
Object |
setAttribute(Object key) |
Object |
setAttribute(Object key,
Object value) |
Object |
setAttributeIfAbsent(Object key) |
Object |
setAttributeIfAbsent(Object key,
Object value) |
void |
setCurrentWriteRequest(org.apache.mina.core.write.WriteRequest currentWriteRequest) |
void |
setDataType(DataType dataType) |
void |
setFileOffset(long fileOffset) |
void |
setLanguage(String language) |
void |
setListener(Listener listener) |
void |
setLogin(FileSystemView fsview) |
void |
setMaxIdleTime(int maxIdleTime) |
void |
setRenameFrom(FtpFile renFr) |
void |
setStructure(Structure structure) |
void |
setUser(User user) |
void |
setUserArgument(String userArgument) |
void |
suspendRead() |
void |
suspendWrite() |
void |
updateLastAccessTime() |
void |
updateThroughput(long currentTime,
boolean force) |
org.apache.mina.core.future.WriteFuture |
write(Object message) |
org.apache.mina.core.future.WriteFuture |
write(Object message,
SocketAddress destination) |
public static final String ATTRIBUTE_PREFIX
public FtpIoSession(org.apache.mina.core.session.IoSession wrappedSession, FtpServerContext context)
public org.apache.mina.core.future.CloseFuture close()
close
in interface org.apache.mina.core.session.IoSession
IoSession.close()
public org.apache.mina.core.future.CloseFuture close(boolean immediately)
close
in interface org.apache.mina.core.session.IoSession
IoSession.close(boolean)
public boolean containsAttribute(Object key)
containsAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.containsAttribute(Object)
public Object getAttachment()
getAttachment
in interface org.apache.mina.core.session.IoSession
IoSession.getAttachment()
public Object getAttribute(Object key)
getAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.getAttribute(Object)
public Object getAttribute(Object key, Object defaultValue)
getAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.getAttribute(Object, Object)
public Set<Object> getAttributeKeys()
getAttributeKeys
in interface org.apache.mina.core.session.IoSession
IoSession.getAttributeKeys()
public int getBothIdleCount()
getBothIdleCount
in interface org.apache.mina.core.session.IoSession
IoSession.getBothIdleCount()
public org.apache.mina.core.future.CloseFuture getCloseFuture()
getCloseFuture
in interface org.apache.mina.core.session.IoSession
IoSession.getCloseFuture()
public org.apache.mina.core.session.IoSessionConfig getConfig()
getConfig
in interface org.apache.mina.core.session.IoSession
IoSession.getConfig()
public long getCreationTime()
getCreationTime
in interface org.apache.mina.core.session.IoSession
IoSession.getCreationTime()
public org.apache.mina.core.filterchain.IoFilterChain getFilterChain()
getFilterChain
in interface org.apache.mina.core.session.IoSession
IoSession.getFilterChain()
public org.apache.mina.core.service.IoHandler getHandler()
getHandler
in interface org.apache.mina.core.session.IoSession
IoSession.getHandler()
public long getId()
getId
in interface org.apache.mina.core.session.IoSession
IoSession.getId()
public int getIdleCount(org.apache.mina.core.session.IdleStatus status)
getIdleCount
in interface org.apache.mina.core.session.IoSession
IoSession.getIdleCount(IdleStatus)
public long getLastBothIdleTime()
getLastBothIdleTime
in interface org.apache.mina.core.session.IoSession
IoSession.getLastBothIdleTime()
public long getLastIdleTime(org.apache.mina.core.session.IdleStatus status)
getLastIdleTime
in interface org.apache.mina.core.session.IoSession
IoSession.getLastIdleTime(IdleStatus)
public long getLastIoTime()
getLastIoTime
in interface org.apache.mina.core.session.IoSession
IoSession.getLastIoTime()
public long getLastReadTime()
getLastReadTime
in interface org.apache.mina.core.session.IoSession
IoSession.getLastReadTime()
public long getLastReaderIdleTime()
getLastReaderIdleTime
in interface org.apache.mina.core.session.IoSession
IoSession.getLastReaderIdleTime()
public long getLastWriteTime()
getLastWriteTime
in interface org.apache.mina.core.session.IoSession
IoSession.getLastWriteTime()
public long getLastWriterIdleTime()
getLastWriterIdleTime
in interface org.apache.mina.core.session.IoSession
IoSession.getLastWriterIdleTime()
public SocketAddress getLocalAddress()
getLocalAddress
in interface org.apache.mina.core.session.IoSession
IoSession.getLocalAddress()
public long getReadBytes()
getReadBytes
in interface org.apache.mina.core.session.IoSession
IoSession.getReadBytes()
public double getReadBytesThroughput()
getReadBytesThroughput
in interface org.apache.mina.core.session.IoSession
IoSession.getReadBytesThroughput()
public long getReadMessages()
getReadMessages
in interface org.apache.mina.core.session.IoSession
IoSession.getReadMessages()
public double getReadMessagesThroughput()
getReadMessagesThroughput
in interface org.apache.mina.core.session.IoSession
IoSession.getReadMessagesThroughput()
public int getReaderIdleCount()
getReaderIdleCount
in interface org.apache.mina.core.session.IoSession
IoSession.getReaderIdleCount()
public SocketAddress getRemoteAddress()
getRemoteAddress
in interface org.apache.mina.core.session.IoSession
IoSession.getRemoteAddress()
public long getScheduledWriteBytes()
getScheduledWriteBytes
in interface org.apache.mina.core.session.IoSession
IoSession.getScheduledWriteBytes()
public int getScheduledWriteMessages()
getScheduledWriteMessages
in interface org.apache.mina.core.session.IoSession
IoSession.getScheduledWriteMessages()
public org.apache.mina.core.service.IoService getService()
getService
in interface org.apache.mina.core.session.IoSession
IoSession.getService()
public SocketAddress getServiceAddress()
getServiceAddress
in interface org.apache.mina.core.session.IoSession
IoSession.getServiceAddress()
public org.apache.mina.core.service.TransportMetadata getTransportMetadata()
getTransportMetadata
in interface org.apache.mina.core.session.IoSession
IoSession.getTransportMetadata()
public int getWriterIdleCount()
getWriterIdleCount
in interface org.apache.mina.core.session.IoSession
IoSession.getWriterIdleCount()
public long getWrittenBytes()
getWrittenBytes
in interface org.apache.mina.core.session.IoSession
IoSession.getWrittenBytes()
public double getWrittenBytesThroughput()
getWrittenBytesThroughput
in interface org.apache.mina.core.session.IoSession
IoSession.getWrittenBytesThroughput()
public long getWrittenMessages()
getWrittenMessages
in interface org.apache.mina.core.session.IoSession
IoSession.getWrittenMessages()
public double getWrittenMessagesThroughput()
getWrittenMessagesThroughput
in interface org.apache.mina.core.session.IoSession
IoSession.getWrittenMessagesThroughput()
public boolean isClosing()
isClosing
in interface org.apache.mina.core.session.IoSession
IoSession.isClosing()
public boolean isConnected()
isConnected
in interface org.apache.mina.core.session.IoSession
IoSession.isConnected()
public boolean isIdle(org.apache.mina.core.session.IdleStatus status)
isIdle
in interface org.apache.mina.core.session.IoSession
IoSession.isIdle(IdleStatus)
public org.apache.mina.core.future.ReadFuture read()
read
in interface org.apache.mina.core.session.IoSession
IoSession.read()
public Object removeAttribute(Object key)
removeAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.removeAttribute(Object)
public boolean removeAttribute(Object key, Object value)
removeAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.removeAttribute(Object, Object)
public boolean replaceAttribute(Object key, Object oldValue, Object newValue)
replaceAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.replaceAttribute(Object, Object, Object)
public void resumeRead()
resumeRead
in interface org.apache.mina.core.session.IoSession
IoSession.resumeRead()
public void resumeWrite()
resumeWrite
in interface org.apache.mina.core.session.IoSession
IoSession.resumeWrite()
public Object setAttachment(Object attachment)
setAttachment
in interface org.apache.mina.core.session.IoSession
IoSession.setAttachment(Object)
public Object setAttribute(Object key)
setAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.setAttribute(Object)
public Object setAttribute(Object key, Object value)
setAttribute
in interface org.apache.mina.core.session.IoSession
IoSession.setAttribute(Object, Object)
public Object setAttributeIfAbsent(Object key)
setAttributeIfAbsent
in interface org.apache.mina.core.session.IoSession
IoSession.setAttributeIfAbsent(Object)
public Object setAttributeIfAbsent(Object key, Object value)
setAttributeIfAbsent
in interface org.apache.mina.core.session.IoSession
IoSession.setAttributeIfAbsent(Object, Object)
public void suspendRead()
suspendRead
in interface org.apache.mina.core.session.IoSession
IoSession.suspendRead()
public void suspendWrite()
suspendWrite
in interface org.apache.mina.core.session.IoSession
IoSession.suspendWrite()
public org.apache.mina.core.future.WriteFuture write(Object message)
write
in interface org.apache.mina.core.session.IoSession
IoSession.write(Object)
public org.apache.mina.core.future.WriteFuture write(Object message, SocketAddress destination)
write
in interface org.apache.mina.core.session.IoSession
IoSession.write(Object, SocketAddress)
public void resetState()
public ServerDataConnectionFactory getDataConnection()
public FileSystemView getFileSystemView()
public User getUser()
public boolean isLoggedIn()
public Listener getListener()
public void setListener(Listener listener)
public FtpSession getFtpletSession()
public String getLanguage()
public void setLanguage(String language)
public String getUserArgument()
public void setUser(User user)
public void setUserArgument(String userArgument)
public int getMaxIdleTime()
public void setMaxIdleTime(int maxIdleTime)
public void increaseFailedLogins()
public int getFailedLogins()
public void setLogin(FileSystemView fsview)
public void reinitialize()
public void logoutUser()
public void setFileOffset(long fileOffset)
public void setRenameFrom(FtpFile renFr)
public FtpFile getRenameFrom()
public long getFileOffset()
public void setStructure(Structure structure)
public void setDataType(DataType dataType)
public UUID getSessionId()
FtpSession.getSessionId()
public Structure getStructure()
public DataType getDataType()
public Date getLoginTime()
public Date getLastAccessTime()
public Certificate[] getClientCertificates()
public void updateLastAccessTime()
public Object getCurrentWriteMessage()
getCurrentWriteMessage
in interface org.apache.mina.core.session.IoSession
IoSession.getCurrentWriteMessage()
public org.apache.mina.core.write.WriteRequest getCurrentWriteRequest()
getCurrentWriteRequest
in interface org.apache.mina.core.session.IoSession
IoSession.getCurrentWriteRequest()
public boolean isBothIdle()
isBothIdle
in interface org.apache.mina.core.session.IoSession
IoSession.isBothIdle()
public boolean isReaderIdle()
isReaderIdle
in interface org.apache.mina.core.session.IoSession
IoSession.isReaderIdle()
public boolean isWriterIdle()
isWriterIdle
in interface org.apache.mina.core.session.IoSession
IoSession.isWriterIdle()
public boolean isSecure()
public void increaseWrittenDataBytes(int increment)
increment
- The number of bytes writtenpublic void increaseReadDataBytes(int increment)
increment
- The number of bytes writtenpublic FtpReply getLastReply()
public org.apache.mina.core.write.WriteRequestQueue getWriteRequestQueue()
getWriteRequestQueue
in interface org.apache.mina.core.session.IoSession
IoSession.getWriteRequestQueue()
public boolean isReadSuspended()
isReadSuspended
in interface org.apache.mina.core.session.IoSession
IoSession.isReadSuspended()
public boolean isWriteSuspended()
isWriteSuspended
in interface org.apache.mina.core.session.IoSession
IoSession.isWriteSuspended()
public void setCurrentWriteRequest(org.apache.mina.core.write.WriteRequest currentWriteRequest)
setCurrentWriteRequest
in interface org.apache.mina.core.session.IoSession
IoSession.setCurrentWriteRequest(WriteRequest)
public void updateThroughput(long currentTime, boolean force)
updateThroughput
in interface org.apache.mina.core.session.IoSession
IoSession.updateThroughput(long, boolean)
public boolean isSecured()
isSecured
in interface org.apache.mina.core.session.IoSession
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.