/** * Register a cluster node with the client * * <p>Manually register cluster node to this client - usually it's not needed to call this * directly as adapter should handle by sending registration request to Keycloak * * @param formParams */ @Path("nodes") @POST @Consumes(MediaType.APPLICATION_JSON) public void registerNode(Map<String, String> formParams) { auth.requireManage(); if (client == null) { throw new NotFoundException("Could not find client"); } String node = formParams.get("node"); if (node == null) { throw new BadRequestException("Node not found in params"); } if (logger.isDebugEnabled()) logger.debug("Register node: " + node); client.registerNode(node, Time.currentTime()); adminEvent .operation(OperationType.CREATE) .resource(ResourceType.CLUSTER_NODE) .resourcePath(uriInfo, node) .success(); }
@Override public void registerNode(String nodeHost, int registrationTime) { getDelegateForUpdate(); updated.registerNode(nodeHost, registrationTime); }