ParameterType
- defining the parameter type for the authenticationTokenType
- defining the token type for the authenticationpublic abstract class AbstractAuthenticationHandler<ParameterType,TokenType> extends java.lang.Object implements AuthenticationHandler<ParameterType,TokenType>
AuthenticationHandler
s encapsulating basic
common things.Modifier and Type | Field and Description |
---|---|
protected boolean |
done
A flag telling whether this authentication is done.
|
protected ParameterType |
params
The last set parameters.
|
protected java.net.InetSocketAddress |
proxy
The
InetSocketAddress or the proxy to connect to. |
Constructor and Description |
---|
AbstractAuthenticationHandler(java.net.InetSocketAddress proxy)
Creates a new
AbstractAuthenticationHandler to authenticate with
the given proxy . |
Modifier and Type | Method and Description |
---|---|
boolean |
isDone()
Tells whether is authentication mechanism is done (successfully or
unsuccessfully).
|
void |
setParams(ParameterType input)
Sets the parameters for the next token generation via
AuthenticationHandler.start() or
AuthenticationHandler.process() . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getToken, process, start
protected java.net.InetSocketAddress proxy
InetSocketAddress
or the proxy to connect to.protected ParameterType params
protected boolean done
public AbstractAuthenticationHandler(java.net.InetSocketAddress proxy)
AbstractAuthenticationHandler
to authenticate with
the given proxy
.proxy
- the InetSocketAddress
of the proxy to connect topublic final void setParams(ParameterType input)
AuthenticationHandler
AuthenticationHandler.start()
or
AuthenticationHandler.process()
.setParams
in interface AuthenticationHandler<ParameterType,TokenType>
input
- to set, may be null
public final boolean isDone()
AuthenticationHandler
isDone
in interface AuthenticationHandler<ParameterType,TokenType>