Class ProxyConnectionManager
- java.lang.Object
-
- org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager
-
public class ProxyConnectionManager extends Object
Manages the connections to the proxy server. The connections go through two stages before file transfer begins. The first stage is when the file transfer target initiates a connection to this manager. Stage two is when the initiator connects, the manager will then match the two connections using the unique SHA-1 hash defined in the SOCKS5 protocol.- Author:
- Alexander Wenckus
-
-
Field Summary
Fields Modifier and Type Field Description static SystemProperty<Integer>
EXECUTOR_CORE_POOL_SIZE
The number of threads to keep in the thread pool that powers proxy (SOCKS5) connections, even if they are idle.static SystemProperty<Integer>
EXECUTOR_MAX_POOL_SIZE
The maximum number of threads to allow in the thread pool that powers proxy (SOCKS5) connections.static SystemProperty<Duration>
EXECUTOR_POOL_KEEP_ALIVE
The number of threads in the thread pool that powers proxy (SOCKS5) connections is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
-
Constructor Summary
Constructors Constructor Description ProxyConnectionManager(FileTransferManager manager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
createDigest(String sessionID, org.xmpp.packet.JID initiator, org.xmpp.packet.JID target)
Creates the digest needed for a byte stream.void
disable()
int
getProxyPort()
boolean
isRunning()
-
-
-
Field Detail
-
EXECUTOR_CORE_POOL_SIZE
public static final SystemProperty<Integer> EXECUTOR_CORE_POOL_SIZE
The number of threads to keep in the thread pool that powers proxy (SOCKS5) connections, even if they are idle.
-
EXECUTOR_MAX_POOL_SIZE
public static final SystemProperty<Integer> EXECUTOR_MAX_POOL_SIZE
The maximum number of threads to allow in the thread pool that powers proxy (SOCKS5) connections.
-
EXECUTOR_POOL_KEEP_ALIVE
public static final SystemProperty<Duration> EXECUTOR_POOL_KEEP_ALIVE
The number of threads in the thread pool that powers proxy (SOCKS5) connections is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
-
-
Constructor Detail
-
ProxyConnectionManager
public ProxyConnectionManager(FileTransferManager manager)
-
-
Method Detail
-
getProxyPort
public int getProxyPort()
-
createDigest
public static String createDigest(String sessionID, org.xmpp.packet.JID initiator, org.xmpp.packet.JID target)
Creates the digest needed for a byte stream. It is the SHA1(sessionID + initiator + target).- Parameters:
sessionID
- The sessionID of the stream negotiationinitiator
- The initiator of the stream negotiationtarget
- The target of the stream negotiation- Returns:
- SHA-1 hash of the three parameters
-
isRunning
public boolean isRunning()
-
disable
public void disable()
-
-