Class AbstractAuthenticationHandler<ParameterType,TokenType>
- java.lang.Object
-
- org.eclipse.jgit.internal.transport.sshd.auth.AbstractAuthenticationHandler<ParameterType,TokenType>
-
- Type Parameters:
ParameterType- defining the parameter type for the authenticationTokenType- defining the token type for the authentication
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,AuthenticationHandler<ParameterType,TokenType>
- Direct Known Subclasses:
BasicAuthentication,GssApiAuthentication
public abstract class AbstractAuthenticationHandler<ParameterType,TokenType> extends java.lang.Object implements AuthenticationHandler<ParameterType,TokenType>
Abstract base class forAuthenticationHandlers encapsulating basic common things.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandoneA flag telling whether this authentication is done.protected ParameterTypeparamsThe last set parameters.protected java.net.InetSocketAddressproxyTheInetSocketAddressor the proxy to connect to.
-
Constructor Summary
Constructors Constructor Description AbstractAuthenticationHandler(java.net.InetSocketAddress proxy)Creates a newAbstractAuthenticationHandlerto authenticate with the givenproxy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDone()Tells whether is authentication mechanism is done (successfully or unsuccessfully).voidsetParams(ParameterType input)Sets the parameters for the next token generation viaAuthenticationHandler.start()orAuthenticationHandler.process().-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jgit.internal.transport.sshd.auth.AuthenticationHandler
close, getToken, process, start
-
-
-
-
Field Detail
-
proxy
protected java.net.InetSocketAddress proxy
TheInetSocketAddressor the proxy to connect to.
-
params
protected ParameterType params
The last set parameters.
-
done
protected boolean done
A flag telling whether this authentication is done.
-
-
Constructor Detail
-
AbstractAuthenticationHandler
public AbstractAuthenticationHandler(java.net.InetSocketAddress proxy)
Creates a newAbstractAuthenticationHandlerto authenticate with the givenproxy.- Parameters:
proxy- theInetSocketAddressof the proxy to connect to
-
-
Method Detail
-
setParams
public final void setParams(ParameterType input)
Description copied from interface:AuthenticationHandlerSets the parameters for the next token generation viaAuthenticationHandler.start()orAuthenticationHandler.process().- Specified by:
setParamsin interfaceAuthenticationHandler<ParameterType,TokenType>- Parameters:
input- to set, may benull
-
isDone
public final boolean isDone()
Description copied from interface:AuthenticationHandlerTells whether is authentication mechanism is done (successfully or unsuccessfully).- Specified by:
isDonein interfaceAuthenticationHandler<ParameterType,TokenType>- Returns:
- whether this authentication is done
-
-