Class EndpointUtil

java.lang.Object
com.vaadin.hilla.EndpointUtil
All Implemented Interfaces:
com.vaadin.flow.internal.hilla.EndpointRequestUtil, Serializable

@Component public class EndpointUtil extends Object implements com.vaadin.flow.internal.hilla.EndpointRequestUtil
A util class related to classes available to the browser.
See Also:
  • Field Summary

    Fields inherited from interface com.vaadin.flow.internal.hilla.EndpointRequestUtil

    HILLA_ENDPOINT_CLASS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAnonymousEndpoint(jakarta.servlet.http.HttpServletRequest request)
    Checks if the given request goes to an anonymous (public) endpoint.
    boolean
    isEndpointRequest(jakarta.servlet.http.HttpServletRequest request)
    Checks if the request is for an endpoint.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EndpointUtil

      public EndpointUtil()
  • Method Details

    • isEndpointRequest

      public boolean isEndpointRequest(jakarta.servlet.http.HttpServletRequest request)
      Checks if the request is for an endpoint.

      Note even if this method returns true, there is no guarantee that an endpoint method will actually be called, e.g. access might be denied.

      Specified by:
      isEndpointRequest in interface com.vaadin.flow.internal.hilla.EndpointRequestUtil
      Parameters:
      request - the HTTP request
      Returns:
      true if the request is for an endpoint, false otherwise
    • isAnonymousEndpoint

      public boolean isAnonymousEndpoint(jakarta.servlet.http.HttpServletRequest request)
      Checks if the given request goes to an anonymous (public) endpoint.
      Specified by:
      isAnonymousEndpoint in interface com.vaadin.flow.internal.hilla.EndpointRequestUtil
      Parameters:
      request - the HTTP request to check
      Returns:
      true if the request goes to an anonymous endpoint, false otherwise