Interface Invocation


  • public interface Invocation
    Defines an invocation to a REST resource.
    Since:
    10.0
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean anonymous()  
      java.lang.String getAction()
      Returns the associated action (request parameter) or null.
      default java.lang.String getName()
      The user friendly name of the invocation
      java.util.function.Function<RestRequest,​java.util.concurrent.CompletionStage<RestResponse>> handler()
      Return the function to execute the invocation.
      java.util.Set<Method> methods()
      Returns one or more methods supported.
      java.util.Set<java.lang.String> paths()
      Returns one or more paths associated with the invocation.
    • Method Detail

      • methods

        java.util.Set<Method> methods()
        Returns one or more methods supported.
      • getAction

        java.lang.String getAction()
        Returns the associated action (request parameter) or null.
      • paths

        java.util.Set<java.lang.String> paths()
        Returns one or more paths associated with the invocation. Paths can be constant, e.g. /a/b/c or use variables such as /a/{var1}/{var2}.
      • getName

        default java.lang.String getName()
        The user friendly name of the invocation
      • handler

        java.util.function.Function<RestRequest,​java.util.concurrent.CompletionStage<RestResponse>> handler()
        Return the function to execute the invocation.
      • anonymous

        boolean anonymous()
        Returns:
        true whether the invocation can be done anonymously (without auth)