org.mariadb.jdbc.internal.protocol.authentication
Class AuthenticationProviderHolder

java.lang.Object
  extended by org.mariadb.jdbc.internal.protocol.authentication.AuthenticationProviderHolder

public class AuthenticationProviderHolder
extends Object

Provider to handle plugin authentication. This can allow library users to override our default Authentication provider.


Nested Class Summary
static interface AuthenticationProviderHolder.AuthenticationProvider
          Provider to handle authentication.
 
Field Summary
static AuthenticationProviderHolder.AuthenticationProvider DEFAULT_PROVIDER
          The default provider will construct a new pool on every request.
 
Constructor Summary
AuthenticationProviderHolder()
           
 
Method Summary
static AuthenticationProviderHolder.AuthenticationProvider getAuthenticationProvider()
          Get the currently set AuthenticationProviderHolder.AuthenticationProvider from set invocations via setAuthenticationProvider(AuthenticationProvider).
static void setAuthenticationProvider(AuthenticationProviderHolder.AuthenticationProvider newProvider)
          Change the current set authentication provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROVIDER

public static AuthenticationProviderHolder.AuthenticationProvider DEFAULT_PROVIDER
The default provider will construct a new pool on every request.

Constructor Detail

AuthenticationProviderHolder

public AuthenticationProviderHolder()
Method Detail

getAuthenticationProvider

public static AuthenticationProviderHolder.AuthenticationProvider getAuthenticationProvider()
Get the currently set AuthenticationProviderHolder.AuthenticationProvider from set invocations via setAuthenticationProvider(AuthenticationProvider). If none has been set a default provider will be provided (never a null result).

Returns:
Provider to get an AuthenticationProvider

setAuthenticationProvider

public static void setAuthenticationProvider(AuthenticationProviderHolder.AuthenticationProvider newProvider)
Change the current set authentication provider. This provider will be provided in future requests to getAuthenticationProvider().

Parameters:
newProvider - New provider to use, or null to use the default provider


Copyright © 2017. All rights reserved.