Interface ByMethodSpec

    • Method Detail

      • get

        ByMethodSpec get​(Block block)
        Defines the action to to take if the request has a HTTP method of GET.
        Parameters:
        block - the code to invoke if the request method matches
        Returns:
        this
      • get

        ByMethodSpec get​(Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of GET.
        Parameters:
        clazz - a handler class
        Returns:
        this
        Since:
        1.5
      • get

        ByMethodSpec get​(Handler handler)
        Inserts the handler to chain if the request has a HTTP method of GET.
        Parameters:
        handler - the handler to delegate to
        Returns:
        this
        Since:
        1.5
      • post

        ByMethodSpec post​(Block block)
        Defines the action to to take if the request has a HTTP method of POST.
        Parameters:
        block - the code to invoke if the request method matches
        Returns:
        this
      • post

        ByMethodSpec post​(Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of POST.
        Parameters:
        clazz - a handler class
        Returns:
        this
        Since:
        1.5
      • post

        ByMethodSpec post​(Handler handler)
        Inserts the handler to chain if the request has a HTTP method of POST.
        Parameters:
        handler - the handler to delegate to
        Returns:
        this
        Since:
        1.5
      • put

        ByMethodSpec put​(Block block)
        Defines the action to to take if the request has a HTTP method of PUT.
        Parameters:
        block - the code to invoke if the request method matches
        Returns:
        this
      • put

        ByMethodSpec put​(Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of PUT.
        Parameters:
        clazz - a handler class
        Returns:
        this
        Since:
        1.5
      • put

        ByMethodSpec put​(Handler handler)
        Inserts the handler to chain if the request has a HTTP method of PUT.
        Parameters:
        handler - the handler to delegate to
        Returns:
        this
        Since:
        1.5
      • patch

        ByMethodSpec patch​(Block block)
        Defines the action to to take if the request has a HTTP method of PATCH.
        Parameters:
        block - the code to invoke if the request method matches
        Returns:
        this
      • patch

        ByMethodSpec patch​(Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of PATCH.
        Parameters:
        clazz - a handler class
        Returns:
        this
        Since:
        1.5
      • patch

        ByMethodSpec patch​(Handler handler)
        Inserts the handler to chain if the request has a HTTP method of PATCH.
        Parameters:
        handler - the handler to delegate to
        Returns:
        this
        Since:
        1.5
      • options

        ByMethodSpec options​(Block block)
        Defines the action to to take if the request has a HTTP method of OPTIONS.
        Parameters:
        block - the code to invoke if the request method matches
        Returns:
        this
        Since:
        1.1
      • options

        ByMethodSpec options​(Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of OPTIONS.
        Parameters:
        clazz - a handler class
        Returns:
        this
        Since:
        1.5
      • options

        ByMethodSpec options​(Handler handler)
        Inserts the handler to chain if the request has a HTTP method of OPTIONS.
        Parameters:
        handler - the handler to delegate to
        Returns:
        this
        Since:
        1.5
      • delete

        ByMethodSpec delete​(Block block)
        Defines the action to to take if the request has a HTTP method of DELETE.
        Parameters:
        block - the code to invoke if the request method matches
        Returns:
        this
      • delete

        ByMethodSpec delete​(Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of DELETE.
        Parameters:
        clazz - a handler class
        Returns:
        this
        Since:
        1.5
      • delete

        ByMethodSpec delete​(Handler handler)
        Inserts the handler to chain if the request has a HTTP method of DELETE.
        Parameters:
        handler - the handler to delegate to
        Returns:
        this
        Since:
        1.5
      • named

        ByMethodSpec named​(String methodName,
                           Block block)
        Defines the action to to take if the request has a HTTP method of methodName.

        The method name is case insensitive.

        Parameters:
        methodName - The HTTP method to map the given action to
        block - the code to invoke if the request method matches
        Returns:
        this
      • named

        ByMethodSpec named​(String methodName,
                           Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of methodName.

        The method name is case insensitive.

        Parameters:
        methodName - The HTTP method to map the given action to
        clazz - a handler class
        Returns:
        this
        Since:
        1.5
      • named

        ByMethodSpec named​(String methodName,
                           Handler handler)
        Inserts the handler to chain if the request has a HTTP method of methodName.

        The method name is case insensitive.

        Parameters:
        methodName - The HTTP method to map the given action to
        handler - the handler to delegate to
        Returns:
        this
        Since:
        1.5