Package 

Enum HandlerType

  • All Implemented Interfaces:
    java.io.Serializable , kotlin.Comparable

    
    public enum HandlerType
    extends Enum<HandlerType>
                        

    The possible Handler types one can use in Javalin. This includes all standard HTTM methods (e.g.: GET, POST, …), as well as Javalin specific operations.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class HandlerType.Companion
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      GET

      The HTTP GET method requests a representation of the specified resource.

      POST

      The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.

      PUT

      The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.

      The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), whereas successive identical POST requests may have additional effects, akin to placing an order several times.

      PATCH

      The HTTP PATCH request method applies partial modifications to a resource.

      PATCH is somewhat analogous to the "update" concept found in CRUD (in general, HTTP is different than CRUD, and the two should not be confused).

      DELETE

      The HTTP DELETE request method deletes the specified resource.

      HEAD

      The HTTP HEAD method requests the headers that would be returned if the HEAD request's URL was instead requested with the HTTP GET method.

      TRACE

      The HTTP TRACE method performs a message loop-back test along the path to the target resource, providing a useful debugging mechanism.

      CONNECT

      The HTTP CONNECT method starts two-way communications with the requested resource. It can be used to open a tunnel.

      OPTIONS

      The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, or an asterisk (*) to refer to the entire server.

      BEFORE

      Javalin Specific: Before-handlers are matched before every request (including static files).

      BEFORE_MATCHED

      Javalin specific: BeforeMatched-handlers run before a request finds a matching handler

      AFTER_MATCHED

      Javalin specific: AfterMatched-handlers run after a request which found a matching handler

      WEBSOCKET_BEFORE_UPGRADE

      Javalin specific: handler ran before an http request is upgraded to websocket

      WEBSOCKET_AFTER_UPGRADE

      Javalin specific: handler ran after an http request is upgraded to websocket

      AFTER

      Javalin specific: After-handlers run after every request (even if an exception occurred)

      INVALID

      Javalin specific: this corresponds to a handler that is not recognized using the findByName method.

    • Method Summary

      Modifier and Type Method Description
      final Boolean isHttpMethod()
      • Methods inherited from class kotlin.Enum

        getName, getOrdinal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait