Interface LoginModuleMonitor
-
- All Superinterfaces:
Monitor<LoginModuleMonitor>
- All Known Implementing Classes:
LoginModuleStats
@ProviderType public interface LoginModuleMonitor extends Monitor<LoginModuleMonitor>
-
-
Field Summary
Fields Modifier and Type Field Description static LoginModuleMonitor
NOOP
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NotNull java.lang.Class<LoginModuleMonitor>
getMonitorClass()
default @NotNull java.util.Map<java.lang.Object,java.lang.Object>
getMonitorProperties()
void
loginError()
Event to be called in the case there is an error in the login chain.default void
loginFailed(@NotNull javax.security.auth.login.LoginException loginException, @Nullable Credentials credentials)
Marks a failed login attempt for the givenCredentials
that resulted in the givenLoginException
.default void
principalsCollected(long timeTakenNanos, int numberOfPrincipals)
Record the time taken to collect the given number of principals during the commit phase of a givenLoginModule
.
-
-
-
Field Detail
-
NOOP
static final LoginModuleMonitor NOOP
-
-
Method Detail
-
loginError
void loginError()
Event to be called in the case there is an error in the login chain. This is not covering failed logins, but actual operational errors that probably need to be investigated. Any triggered event should have a corresponding error logged to make this investigation possible.- See Also:
loginFailed(LoginException, Credentials)
-
loginFailed
default void loginFailed(@NotNull @NotNull javax.security.auth.login.LoginException loginException, @Nullable @Nullable Credentials credentials)
Marks a failed login attempt for the givenCredentials
that resulted in the givenLoginException
.- Parameters:
loginException
- TheLoginException
raised by the failed login attempt.credentials
- The credentials used for login.
-
principalsCollected
default void principalsCollected(long timeTakenNanos, int numberOfPrincipals)
Record the time taken to collect the given number of principals during the commit phase of a givenLoginModule
.- Parameters:
timeTakenNanos
- The time in nanosecondsnumberOfPrincipals
- The number of principals that were collected.
-
getMonitorClass
@NotNull default @NotNull java.lang.Class<LoginModuleMonitor> getMonitorClass()
- Specified by:
getMonitorClass
in interfaceMonitor<LoginModuleMonitor>
- Returns:
- The type to be passed to
Whiteboard.register(Class, Object, Map)
-
getMonitorProperties
@NotNull default @NotNull java.util.Map<java.lang.Object,java.lang.Object> getMonitorProperties()
- Specified by:
getMonitorProperties
in interfaceMonitor<LoginModuleMonitor>
- Returns:
- The properties to be passed to
Whiteboard.register(Class, Object, Map)
-
-