Interface Resolver

All Known Subinterfaces:
NoAuthResolver
All Known Implementing Classes:
CompositeResolver, ErrorsJSONResolver, ErrorsPageResolver, FiltersJSONResolver, GraphsJSONResolver, LoginPageResolver, LoginResolver, LogoutResolver, NetworkPerformanceJSONResolver, NetworkTabJSONResolver, PlayerJSONResolver, PlayerKillsJSONResolver, PlayerPageResolver, PlayersPageResolver, PlayersTableJSONResolver, QueryJSONResolver, QueryPageResolver, RegisterPageResolver, RegisterResolver, RootPageResolver, ServerPageResolver, ServerTabJSONResolver, SessionsJSONResolver, StaticResourceResolver

public interface Resolver
Interface for resolving requests of Plan webserver.
See Also:
if resource is always accessible regardless of user.
  • Method Details

    • canAccess

      boolean canAccess(Request request)
      Implement access control if authorization is enabled.

      Is not called when access control is not active.

      Parameters:
      request - HTTP request, contains all information necessary to check access.
      Returns:
      true if allowed or invalid target, false if response should be 403 (forbidden)
      See Also:
      for that has access permissions.
    • resolve

      Optional<Response> resolve(Request request)
      Implement request resolution.
      Parameters:
      request - HTTP request, contains all information necessary to resolve the request.
      Returns:
      Response or empty if the response should be 404 (not found).
      See Also:
      for return value, for path /example/path etc, for parameters ?param=value etc
    • newResponseBuilder

      default ResponseBuilder newResponseBuilder()
    • requiresAuth

      default boolean requiresAuth(Request request)