public class UsernamePasswordMethod extends AbstractSocksMethod
UsernamePasswordMethod
represents the method that need USERNAME/PASSWORD
authentication.Constructor and Description |
---|
UsernamePasswordMethod()
Constructs an instance of
UsernamePasswordMethod . |
UsernamePasswordMethod(UsernamePasswordAuthenticator authenticator)
Constructs an instance of
UsernamePasswordMethod with
UsernamePasswordAuthenticator . |
Modifier and Type | Method and Description |
---|---|
void |
doMethod(Session session)
Do method job.
|
void |
doMethod(SocksProxy socksProxy)
Do authentication.
|
UsernamePasswordAuthenticator |
getAuthenticator() |
int |
getByte()
method byte.
|
String |
getMethodName()
Gets method's name.
|
void |
setAuthenticator(UsernamePasswordAuthenticator authenticator) |
equals, hashCode
public UsernamePasswordMethod()
UsernamePasswordMethod
.public UsernamePasswordMethod(UsernamePasswordAuthenticator authenticator)
UsernamePasswordMethod
with
UsernamePasswordAuthenticator
.authenticator
- Authenticator.public final int getByte()
SocksMethod
public void doMethod(SocksProxy socksProxy) throws SocksException, IOException
socksProxy
- SocksProxy instance.SocksException
- If there are any errors about SOCKS protocol.IOException
- if there are any IO errors.public void doMethod(Session session) throws SocksException, IOException
SocksMethod
session
- Session.SocksException
- TODOIOException
- TODOpublic String getMethodName()
SocksMethod
public UsernamePasswordAuthenticator getAuthenticator()
public void setAuthenticator(UsernamePasswordAuthenticator authenticator)
Copyright © 2015. All rights reserved.