public class Socks4ProxyHandler extends AbstractSocksProxyHandler
Constructor and Description |
---|
Socks4ProxyHandler(InetSocketAddress address,
Socks4Command command,
String username)
Constructs a SOCKS4 proxy connection handler with the specified destination
address, SOCKS4 command, user's name and the default (10 seconds) connection
timeout.
|
Socks4ProxyHandler(InetSocketAddress address,
Socks4Command command,
String username,
ISessionConfig config)
Constructs a SOCKS4 proxy connection handler with the specified destination
address, SOCKS4 command, user's name, the default (10 seconds) connection
timeout and configuration.
|
Socks4ProxyHandler(InetSocketAddress address,
Socks4Command command,
String username,
ISessionConfig config,
ISessionStructureFactory factory)
Constructs a SOCKS4 proxy connection handler with the specified destination
address, SOCKS4 command, user's name, the default (10 seconds) connection
timeout, configuration and factory.
|
Socks4ProxyHandler(InetSocketAddress address,
String username)
Constructs a SOCKS4 proxy connection handler with the specified destination
address, the default (
CONNECT ) command, user's
name and the default (10 seconds) connection timeout. |
Socks4ProxyHandler(InetSocketAddress address,
String username,
ISessionConfig config)
Constructs a SOCKS4 proxy connection handler with the specified destination
address, the default (
CONNECT ) command, user's
name, the default (10 seconds) connection timeout and configuration. |
Socks4ProxyHandler(InetSocketAddress address,
String username,
ISessionConfig config,
ISessionStructureFactory factory)
Constructs a SOCKS4 proxy connection handler with the specified destination
address, the default (
CONNECT ) command, user's
name, the default (10 seconds) connection timeout, configuration and factory. |
Modifier and Type | Method and Description |
---|---|
Socks4ProxyHandler |
connectionTimeout(long connectionTimeout)
Configures the proxy connection timeout.
|
addReplyListener, available, available, event, getAddress, getReplies, handleReady, read, read, read
getFactory, timer
getSession, setSession
event, exception, getConfig, getName, incident, timer
public Socks4ProxyHandler(InetSocketAddress address, String username)
CONNECT
) command, user's
name and the default (10 seconds) connection timeout.
NOTE: The connection timeout will have no effect if the associated session does not support a session timer.
address
- the destination address to the host to which the
connection should be proxiedusername
- the user's name, or null
for an empty nameIllegalArgumentException
- if the address is nullpublic Socks4ProxyHandler(InetSocketAddress address, String username, ISessionConfig config)
CONNECT
) command, user's
name, the default (10 seconds) connection timeout and configuration.
NOTE: The connection timeout will have no effect if the associated session does not support a session timer.
address
- the destination address to the host to which the
connection should be proxiedusername
- the user's name, or null
for an empty nameconfig
- the session configuration object, or null
to
use the default configurationIllegalArgumentException
- if the address is nullpublic Socks4ProxyHandler(InetSocketAddress address, String username, ISessionConfig config, ISessionStructureFactory factory)
CONNECT
) command, user's
name, the default (10 seconds) connection timeout, configuration and factory.
NOTE: The connection timeout will have no effect if the associated session does not support a session timer.
address
- the destination address to the host to which the
connection should be proxiedusername
- the user's name, or null
for an empty nameconfig
- the session configuration object, or null
to
use the default configurationfactory
- the factory that will be used to configure the
internal structure of the associated session, or
null
to use the default factoryIllegalArgumentException
- if the address is nullpublic Socks4ProxyHandler(InetSocketAddress address, Socks4Command command, String username)
NOTE: The connection timeout will have no effect if the associated session does not support a session timer.
address
- the destination address to the host to which the connection
should be proxiedcommand
- the SCOCS4 commandusername
- the user's name, or null
for an empty nameIllegalArgumentException
- if the address or the command is nullpublic Socks4ProxyHandler(InetSocketAddress address, Socks4Command command, String username, ISessionConfig config)
NOTE: The connection timeout will have no effect if the associated session does not support a session timer.
address
- the destination address to the host to which the connection
should be proxiedcommand
- the SCOCS4 commandusername
- the user's name, or null
for an empty nameconfig
- the session configuration object, or null
to use the
default configurationIllegalArgumentException
- if the address or the command is nullpublic Socks4ProxyHandler(InetSocketAddress address, Socks4Command command, String username, ISessionConfig config, ISessionStructureFactory factory)
NOTE: The connection timeout will have no effect if the associated session does not support a session timer.
address
- the destination address to the host to which the connection
should be proxiedcommand
- the SCOCS4 commandusername
- the user's name, or null
for an empty nameconfig
- the session configuration object, or null
to use the
default configurationfactory
- the factory that will be used to configure the internal
structure of the associated session, or null
to use
the default factoryIllegalArgumentException
- if the address or the command is nullpublic Socks4ProxyHandler connectionTimeout(long connectionTimeout)
NOTE: The connection timeout will have no effect if the associated session does not support a session timer.
connectionTimeout
in class AbstractProxyHandler
connectionTimeout
- the proxy connection timeout in milliseconds, or 0
to wait an infinite amount of time for establishing
the HTTP tunnelIllegalArgumentException
- if the connection timeout is negativeCopyright © 2017–2022 SNF4J.ORG. All rights reserved.