public class DefaultAuthManager extends Object implements AuthManager
AuthManager
.Constructor and Description |
---|
DefaultAuthManager(@NonNull Client client)
Constructs the AuthManager.
|
Modifier and Type | Method and Description |
---|---|
@NonNull Optional<AuthProtocol> |
addProtocol(@NonNull AuthProtocol protocol)
Adds a protocol to be handled by this manager.
|
@NonNull Set<AuthProtocol> |
getProtocols()
Gets all protocols currently registered to the manager.
|
void |
removeProtocol(@NonNull AuthProtocol protocol)
Removes a protocol if it was registered, unregistering event handlers
on it if registered.
|
@NonNull String |
toString() |
public DefaultAuthManager(@NonNull Client client)
client
- client for which this manager will operatepublic @NonNull 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 addpublic @NonNull Set<AuthProtocol> getProtocols()
AuthManager
getProtocols
in interface AuthManager
public void removeProtocol(@NonNull AuthProtocol protocol)
AuthManager
removeProtocol
in interface AuthManager
protocol
- protocol to removeCopyright © 2013–2021 Kitteh. All rights reserved.