public class DefaultAuthManager extends Object implements AuthManager
AuthManager
.Constructor and Description |
---|
DefaultAuthManager(Client client)
Constructs the AuthManager.
|
Modifier and Type | Method and Description |
---|---|
Optional<AuthProtocol> |
addProtocol(AuthProtocol protocol)
Adds a protocol to be handled by this manager.
|
Set<AuthProtocol> |
getProtocols()
Gets all protocols currently registered to the manager.
|
void |
removeProtocol(AuthProtocol protocol)
Removes a protocol if it was registered, unregistering event handlers
on it if registered.
|
String |
toString() |
@Nonnull public Optional<AuthProtocol> addProtocol(@Nonnull AuthProtocol protocol)
AuthManager
EventListening
and if a previously
set protocol of same class exists it will be removed.addProtocol
in interface AuthManager
protocol
- protocol to add@Nonnull public Set<AuthProtocol> getProtocols()
AuthManager
getProtocols
in interface AuthManager
public void removeProtocol(@Nonnull AuthProtocol protocol)
AuthManager
removeProtocol
in interface AuthManager
protocol
- protocol to removeCopyright © 2013–2019 Kitteh. All rights reserved.