public class SocksMethodSelector extends Object implements MethodSelector
SocksMethodSelector
implements the MethodSelector
.Constructor and Description |
---|
SocksMethodSelector()
Constructs an instance of
SocksMethodSelector . |
Modifier and Type | Method and Description |
---|---|
void |
addSupportMethod(SocksMethod socksMethod)
Adds a method into a support method list.
|
void |
clearAllSupportMethods()
Clears all methods that server supported.
|
Set<SocksMethod> |
getSupportMethods()
Gets methods that server supported.
|
void |
removeSupportMethod(SocksMethod socksMethod)
Removes the method from the sets.
|
SocksMethod |
select(MethodSelectionMessage message)
Selects a method form
MethodSelectionMessage . |
void |
setSupportMethod(SocksMethod... methods)
Sets support methods.
|
void |
setSupportMethods(Set<SocksMethod> supportMethods)
Sets methods that server supported.
|
public SocksMethodSelector()
SocksMethodSelector
.public SocksMethod select(MethodSelectionMessage message)
MethodSelector
MethodSelectionMessage
.select
in interface MethodSelector
message
- the message from client.public Set<SocksMethod> getSupportMethods()
MethodSelector
getSupportMethods
in interface MethodSelector
public void setSupportMethods(Set<SocksMethod> supportMethods)
MethodSelector
setSupportMethods
in interface MethodSelector
supportMethods
- methods that server supported.public void removeSupportMethod(SocksMethod socksMethod)
MethodSelector
removeSupportMethod
in interface MethodSelector
socksMethod
- The method which will be removed.public void clearAllSupportMethods()
MethodSelector
clearAllSupportMethods
in interface MethodSelector
public void addSupportMethod(SocksMethod socksMethod)
MethodSelector
addSupportMethod
in interface MethodSelector
socksMethod
- The method which will be supported.public void setSupportMethod(SocksMethod... methods)
MethodSelector
setSupportMethod
in interface MethodSelector
methods
- Methods supported.Copyright © 2015. All rights reserved.