public class SocksProxyRequest extends ProxyRequest
Constructor and Description |
---|
SocksProxyRequest(byte protocolVersion,
byte commandCode,
java.net.InetSocketAddress endpointAddress,
java.lang.String userName)
Constructor used when building a SOCKS4 request.
|
SocksProxyRequest(byte commandCode,
java.lang.String host,
int port,
java.lang.String userName)
Constructor used when building a SOCKS4a request.
|
Modifier and Type | Method and Description |
---|---|
byte |
getCommandCode()
Return the command code.
|
java.lang.String |
getHost()
Return the server host name.
|
byte[] |
getIpAddress()
Returns the endpoint address resulting from the
ProxyRequest.getEndpointAddress() . |
java.lang.String |
getPassword()
Return the user password.
|
byte[] |
getPort()
Return the server port as a byte array.
|
byte |
getProtocolVersion()
Return the protocol version.
|
java.lang.String |
getServiceKerberosName()
Return the Kerberos service name.
|
java.lang.String |
getUserName()
Return the user name.
|
void |
setPassword(java.lang.String password)
Set the user password
|
void |
setServiceKerberosName(java.lang.String serviceKerberosName)
Set the Kerberos service name.
|
getEndpointAddress
public SocksProxyRequest(byte protocolVersion, byte commandCode, java.net.InetSocketAddress endpointAddress, java.lang.String userName)
protocolVersion
- the protocol versioncommandCode
- the command codeendpointAddress
- the endpoint addressuserName
- the user namepublic SocksProxyRequest(byte commandCode, java.lang.String host, int port, java.lang.String userName)
commandCode
- the command codehost
- the server host nameport
- the server portuserName
- the user namepublic byte[] getIpAddress()
ProxyRequest.getEndpointAddress()
.
If not set, it will return the SocksProxyConstants.FAKE_IP
constant
value which will be ignored in a SOCKS v4 request.public byte[] getPort()
public byte getCommandCode()
public byte getProtocolVersion()
public java.lang.String getUserName()
public final java.lang.String getHost()
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the user password valuepublic java.lang.String getServiceKerberosName()
public void setServiceKerberosName(java.lang.String serviceKerberosName)
serviceKerberosName
- the Kerberos service nameCopyright © 2004-2019 Apache MINA Project. All Rights Reserved.