Package org.wildfly.security.http.oidc
Class NodesRegistrationManagement
- java.lang.Object
-
- org.wildfly.security.http.oidc.NodesRegistrationManagement
-
public class NodesRegistrationManagement extends Object
Used for clustering with Keycloak.- Author:
- Marek Posolda, Farah Juma
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodesRegistrationManagement.NodeRegistrationContext
-
Field Summary
Fields Modifier and Type Field Description private ExecutorServiceexecutorprivate Map<String,NodesRegistrationManagement.NodeRegistrationContext>nodeRegistrations
-
Constructor Summary
Constructors Constructor Description NodesRegistrationManagement()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static StringgetHostName()private static StringgetHostNameImpl()private static InetAddressgetLocalHost()Methods returns InetAddress for localhostprivate booleanneedRefreshRegistration(String registrationUri, OidcClientConfiguration resolvedDeployment)protected voidsendRegistrationEvent(OidcClientConfiguration deployment)protected booleansendUnregistrationEvent(OidcClientConfiguration deployment)voidstop()Called during undeployment or server stop.voidtryRegister(OidcClientConfiguration resolvedDeployment)
-
-
-
Field Detail
-
nodeRegistrations
private final Map<String,NodesRegistrationManagement.NodeRegistrationContext> nodeRegistrations
-
executor
private final ExecutorService executor
-
-
Method Detail
-
tryRegister
public void tryRegister(OidcClientConfiguration resolvedDeployment)
-
needRefreshRegistration
private boolean needRefreshRegistration(String registrationUri, OidcClientConfiguration resolvedDeployment)
-
stop
public void stop()
Called during undeployment or server stop. De-register from all previously registered deployments
-
sendRegistrationEvent
protected void sendRegistrationEvent(OidcClientConfiguration deployment)
-
sendUnregistrationEvent
protected boolean sendUnregistrationEvent(OidcClientConfiguration deployment)
-
getHostName
private static String getHostName()
-
getHostNameImpl
private static String getHostNameImpl()
-
getLocalHost
private static InetAddress getLocalHost() throws UnknownHostException
Methods returns InetAddress for localhost- Returns:
- InetAddress of the localhost
- Throws:
UnknownHostException- if localhost could not be resolved
-
-