public class FtpSessionReference extends Object
InetAddress
of the remote client and the InetSocketAddress
of
the server for Passive and
reverse for Active connections. This is particularly useful for Passive mode
connection since there is no
way to pass the session to the connected channel without this reference.Modifier and Type | Class and Description |
---|---|
static class |
FtpSessionReference.P2PAddress
Index of FtpSession References
|
Constructor and Description |
---|
FtpSessionReference()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(InetAddress ipOnly,
InetSocketAddress fullIp)
Test if the couple of addresses is already in the hashmap (only for
Active)
|
void |
delFtpSession(InetAddress ipOnly,
InetSocketAddress fullIp)
Remove the FtpSession from couple of addresses
|
FtpSession |
getActiveFtpSession(io.netty.channel.Channel channel,
boolean remove)
Return and remove the FtpSession
|
FtpSession |
getPassiveFtpSession(io.netty.channel.Channel channel,
boolean remove)
Return and remove the FtpSession
|
int |
sessionsNumber() |
void |
setNewFtpSession(InetAddress ipOnly,
InetSocketAddress fullIp,
FtpSession session)
Add a session from a couple of addresses
|
public void setNewFtpSession(InetAddress ipOnly, InetSocketAddress fullIp, FtpSession session)
ipOnly
- fullIp
- session
- public FtpSession getActiveFtpSession(io.netty.channel.Channel channel, boolean remove)
channel
- public FtpSession getPassiveFtpSession(io.netty.channel.Channel channel, boolean remove)
channel
- public void delFtpSession(InetAddress ipOnly, InetSocketAddress fullIp)
ipOnly
- fullIp
- public boolean contains(InetAddress ipOnly, InetSocketAddress fullIp)
ipOnly
- fullIp
- public int sessionsNumber()
Copyright © 2009–2020 Waarp. All rights reserved.