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) |
org.apache.mina.core.future.CloseFuture |
closeNow() |
org.apache.mina.core.future.CloseFuture |
closeOnFlush() |
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() |
org.apache.ftpserver.ftplet.DataType |
getDataType() |
int |
getFailedLogins() |
long |
getFileOffset() |
org.apache.ftpserver.ftplet.FileSystemView |
getFileSystemView() |
org.apache.mina.core.filterchain.IoFilterChain |
getFilterChain() |
org.apache.ftpserver.ftplet.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() |
org.apache.ftpserver.ftplet.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() |
org.apache.ftpserver.ftplet.FtpFile |
getRenameFrom() |
long |
getScheduledWriteBytes() |
int |
getScheduledWriteMessages() |
org.apache.mina.core.service.IoService |
getService() |
SocketAddress |
getServiceAddress() |
UUID |
getSessionId() |
org.apache.ftpserver.ftplet.Structure |
getStructure() |
org.apache.mina.core.service.TransportMetadata |
getTransportMetadata() |
org.apache.ftpserver.ftplet.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 |
isActive() |
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(org.apache.ftpserver.ftplet.DataType dataType) |
void |
setFileOffset(long fileOffset) |
void |
setLanguage(String language) |
void |
setListener(Listener listener) |
void |
setLogin(org.apache.ftpserver.ftplet.FileSystemView fsview) |
void |
setMaxIdleTime(int maxIdleTime) |
void |
setRenameFrom(org.apache.ftpserver.ftplet.FtpFile renFr) |
void |
setStructure(org.apache.ftpserver.ftplet.Structure structure) |
void |
setUser(org.apache.ftpserver.ftplet.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.IoSessionIoSession.close()public org.apache.mina.core.future.CloseFuture close(boolean immediately)
close in interface org.apache.mina.core.session.IoSessionIoSession.close(boolean)public org.apache.mina.core.future.CloseFuture closeNow()
closeNow in interface org.apache.mina.core.session.IoSessionIoSession.closeNow()public org.apache.mina.core.future.CloseFuture closeOnFlush()
closeOnFlush in interface org.apache.mina.core.session.IoSessionIoSession.closeOnFlush()public boolean containsAttribute(Object key)
containsAttribute in interface org.apache.mina.core.session.IoSessionIoSession.containsAttribute(Object)public Object getAttachment()
getAttachment in interface org.apache.mina.core.session.IoSessionIoSession.getAttachment()public Object getAttribute(Object key)
getAttribute in interface org.apache.mina.core.session.IoSessionIoSession.getAttribute(Object)public Object getAttribute(Object key, Object defaultValue)
getAttribute in interface org.apache.mina.core.session.IoSessionIoSession.getAttribute(Object, Object)public Set<Object> getAttributeKeys()
getAttributeKeys in interface org.apache.mina.core.session.IoSessionIoSession.getAttributeKeys()public int getBothIdleCount()
getBothIdleCount in interface org.apache.mina.core.session.IoSessionIoSession.getBothIdleCount()public org.apache.mina.core.future.CloseFuture getCloseFuture()
getCloseFuture in interface org.apache.mina.core.session.IoSessionIoSession.getCloseFuture()public org.apache.mina.core.session.IoSessionConfig getConfig()
getConfig in interface org.apache.mina.core.session.IoSessionIoSession.getConfig()public long getCreationTime()
getCreationTime in interface org.apache.mina.core.session.IoSessionIoSession.getCreationTime()public org.apache.mina.core.filterchain.IoFilterChain getFilterChain()
getFilterChain in interface org.apache.mina.core.session.IoSessionIoSession.getFilterChain()public org.apache.mina.core.service.IoHandler getHandler()
getHandler in interface org.apache.mina.core.session.IoSessionIoSession.getHandler()public long getId()
getId in interface org.apache.mina.core.session.IoSessionIoSession.getId()public int getIdleCount(org.apache.mina.core.session.IdleStatus status)
getIdleCount in interface org.apache.mina.core.session.IoSessionIoSession.getIdleCount(IdleStatus)public long getLastBothIdleTime()
getLastBothIdleTime in interface org.apache.mina.core.session.IoSessionIoSession.getLastBothIdleTime()public long getLastIdleTime(org.apache.mina.core.session.IdleStatus status)
getLastIdleTime in interface org.apache.mina.core.session.IoSessionIoSession.getLastIdleTime(IdleStatus)public long getLastIoTime()
getLastIoTime in interface org.apache.mina.core.session.IoSessionIoSession.getLastIoTime()public long getLastReadTime()
getLastReadTime in interface org.apache.mina.core.session.IoSessionIoSession.getLastReadTime()public long getLastReaderIdleTime()
getLastReaderIdleTime in interface org.apache.mina.core.session.IoSessionIoSession.getLastReaderIdleTime()public long getLastWriteTime()
getLastWriteTime in interface org.apache.mina.core.session.IoSessionIoSession.getLastWriteTime()public long getLastWriterIdleTime()
getLastWriterIdleTime in interface org.apache.mina.core.session.IoSessionIoSession.getLastWriterIdleTime()public SocketAddress getLocalAddress()
getLocalAddress in interface org.apache.mina.core.session.IoSessionIoSession.getLocalAddress()public long getReadBytes()
getReadBytes in interface org.apache.mina.core.session.IoSessionIoSession.getReadBytes()public double getReadBytesThroughput()
getReadBytesThroughput in interface org.apache.mina.core.session.IoSessionIoSession.getReadBytesThroughput()public long getReadMessages()
getReadMessages in interface org.apache.mina.core.session.IoSessionIoSession.getReadMessages()public double getReadMessagesThroughput()
getReadMessagesThroughput in interface org.apache.mina.core.session.IoSessionIoSession.getReadMessagesThroughput()public int getReaderIdleCount()
getReaderIdleCount in interface org.apache.mina.core.session.IoSessionIoSession.getReaderIdleCount()public SocketAddress getRemoteAddress()
getRemoteAddress in interface org.apache.mina.core.session.IoSessionIoSession.getRemoteAddress()public long getScheduledWriteBytes()
getScheduledWriteBytes in interface org.apache.mina.core.session.IoSessionIoSession.getScheduledWriteBytes()public int getScheduledWriteMessages()
getScheduledWriteMessages in interface org.apache.mina.core.session.IoSessionIoSession.getScheduledWriteMessages()public org.apache.mina.core.service.IoService getService()
getService in interface org.apache.mina.core.session.IoSessionIoSession.getService()public SocketAddress getServiceAddress()
getServiceAddress in interface org.apache.mina.core.session.IoSessionIoSession.getServiceAddress()public org.apache.mina.core.service.TransportMetadata getTransportMetadata()
getTransportMetadata in interface org.apache.mina.core.session.IoSessionIoSession.getTransportMetadata()public int getWriterIdleCount()
getWriterIdleCount in interface org.apache.mina.core.session.IoSessionIoSession.getWriterIdleCount()public long getWrittenBytes()
getWrittenBytes in interface org.apache.mina.core.session.IoSessionIoSession.getWrittenBytes()public double getWrittenBytesThroughput()
getWrittenBytesThroughput in interface org.apache.mina.core.session.IoSessionIoSession.getWrittenBytesThroughput()public long getWrittenMessages()
getWrittenMessages in interface org.apache.mina.core.session.IoSessionIoSession.getWrittenMessages()public double getWrittenMessagesThroughput()
getWrittenMessagesThroughput in interface org.apache.mina.core.session.IoSessionIoSession.getWrittenMessagesThroughput()public boolean isClosing()
isClosing in interface org.apache.mina.core.session.IoSessionIoSession.isClosing()public boolean isConnected()
isConnected in interface org.apache.mina.core.session.IoSessionIoSession.isConnected()public boolean isActive()
isActive in interface org.apache.mina.core.session.IoSessionIoSession.isActive()public boolean isIdle(org.apache.mina.core.session.IdleStatus status)
isIdle in interface org.apache.mina.core.session.IoSessionIoSession.isIdle(IdleStatus)public org.apache.mina.core.future.ReadFuture read()
read in interface org.apache.mina.core.session.IoSessionIoSession.read()public Object removeAttribute(Object key)
removeAttribute in interface org.apache.mina.core.session.IoSessionIoSession.removeAttribute(Object)public boolean removeAttribute(Object key, Object value)
removeAttribute in interface org.apache.mina.core.session.IoSessionIoSession.removeAttribute(Object, Object)public boolean replaceAttribute(Object key, Object oldValue, Object newValue)
replaceAttribute in interface org.apache.mina.core.session.IoSessionIoSession.replaceAttribute(Object, Object, Object)public void resumeRead()
resumeRead in interface org.apache.mina.core.session.IoSessionIoSession.resumeRead()public void resumeWrite()
resumeWrite in interface org.apache.mina.core.session.IoSessionIoSession.resumeWrite()public Object setAttachment(Object attachment)
setAttachment in interface org.apache.mina.core.session.IoSessionIoSession.setAttachment(Object)public Object setAttribute(Object key)
setAttribute in interface org.apache.mina.core.session.IoSessionIoSession.setAttribute(Object)public Object setAttribute(Object key, Object value)
setAttribute in interface org.apache.mina.core.session.IoSessionIoSession.setAttribute(Object, Object)public Object setAttributeIfAbsent(Object key)
setAttributeIfAbsent in interface org.apache.mina.core.session.IoSessionIoSession.setAttributeIfAbsent(Object)public Object setAttributeIfAbsent(Object key, Object value)
setAttributeIfAbsent in interface org.apache.mina.core.session.IoSessionIoSession.setAttributeIfAbsent(Object, Object)public void suspendRead()
suspendRead in interface org.apache.mina.core.session.IoSessionIoSession.suspendRead()public void suspendWrite()
suspendWrite in interface org.apache.mina.core.session.IoSessionIoSession.suspendWrite()public org.apache.mina.core.future.WriteFuture write(Object message)
write in interface org.apache.mina.core.session.IoSessionIoSession.write(Object)public org.apache.mina.core.future.WriteFuture write(Object message, SocketAddress destination)
write in interface org.apache.mina.core.session.IoSessionIoSession.write(Object, SocketAddress)public void resetState()
public ServerDataConnectionFactory getDataConnection()
public org.apache.ftpserver.ftplet.FileSystemView getFileSystemView()
public org.apache.ftpserver.ftplet.User getUser()
public boolean isLoggedIn()
public Listener getListener()
public void setListener(Listener listener)
public org.apache.ftpserver.ftplet.FtpSession getFtpletSession()
public String getLanguage()
public void setLanguage(String language)
public String getUserArgument()
public void setUser(org.apache.ftpserver.ftplet.User user)
public void setUserArgument(String userArgument)
public int getMaxIdleTime()
public void setMaxIdleTime(int maxIdleTime)
public void increaseFailedLogins()
public int getFailedLogins()
public void setLogin(org.apache.ftpserver.ftplet.FileSystemView fsview)
public void reinitialize()
public void logoutUser()
public void setFileOffset(long fileOffset)
public void setRenameFrom(org.apache.ftpserver.ftplet.FtpFile renFr)
public org.apache.ftpserver.ftplet.FtpFile getRenameFrom()
public long getFileOffset()
public void setStructure(org.apache.ftpserver.ftplet.Structure structure)
public void setDataType(org.apache.ftpserver.ftplet.DataType dataType)
public UUID getSessionId()
FtpSession.getSessionId()public org.apache.ftpserver.ftplet.Structure getStructure()
public org.apache.ftpserver.ftplet.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.IoSessionIoSession.getCurrentWriteMessage()public org.apache.mina.core.write.WriteRequest getCurrentWriteRequest()
getCurrentWriteRequest in interface org.apache.mina.core.session.IoSessionIoSession.getCurrentWriteRequest()public boolean isBothIdle()
isBothIdle in interface org.apache.mina.core.session.IoSessionIoSession.isBothIdle()public boolean isReaderIdle()
isReaderIdle in interface org.apache.mina.core.session.IoSessionIoSession.isReaderIdle()public boolean isWriterIdle()
isWriterIdle in interface org.apache.mina.core.session.IoSessionIoSession.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 org.apache.ftpserver.ftplet.FtpReply getLastReply()
public org.apache.mina.core.write.WriteRequestQueue getWriteRequestQueue()
getWriteRequestQueue in interface org.apache.mina.core.session.IoSessionIoSession.getWriteRequestQueue()public boolean isReadSuspended()
isReadSuspended in interface org.apache.mina.core.session.IoSessionIoSession.isReadSuspended()public boolean isWriteSuspended()
isWriteSuspended in interface org.apache.mina.core.session.IoSessionIoSession.isWriteSuspended()public void setCurrentWriteRequest(org.apache.mina.core.write.WriteRequest currentWriteRequest)
setCurrentWriteRequest in interface org.apache.mina.core.session.IoSessionIoSession.setCurrentWriteRequest(WriteRequest)public void updateThroughput(long currentTime,
boolean force)
updateThroughput in interface org.apache.mina.core.session.IoSessionIoSession.updateThroughput(long, boolean)public boolean isSecured()
isSecured in interface org.apache.mina.core.session.IoSessionCopyright © 2003–2017 The Apache Software Foundation. All rights reserved.