Interface GroovyByMethodSpec

    • Method Detail

      • get

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

        GroovyByMethodSpec get​(java.lang.Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of GET.
        Specified by:
        get in interface ByMethodSpec
        Parameters:
        clazz - a handler class
        Returns:
        this
      • get

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

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

        GroovyByMethodSpec post​(java.lang.Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of POST.
        Specified by:
        post in interface ByMethodSpec
        Parameters:
        clazz - a handler class
        Returns:
        this
      • post

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

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

        GroovyByMethodSpec put​(java.lang.Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of PUT.
        Specified by:
        put in interface ByMethodSpec
        Parameters:
        clazz - a handler class
        Returns:
        this
      • put

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

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

        GroovyByMethodSpec patch​(java.lang.Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of PATCH.
        Specified by:
        patch in interface ByMethodSpec
        Parameters:
        clazz - a handler class
        Returns:
        this
      • patch

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

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

        GroovyByMethodSpec options​(java.lang.Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of OPTIONS.
        Specified by:
        options in interface ByMethodSpec
        Parameters:
        clazz - a handler class
        Returns:
        this
      • options

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

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

        GroovyByMethodSpec delete​(java.lang.Class<? extends Handler> clazz)
        Inserts the handler to chain if the request has a HTTP method of DELETE.
        Specified by:
        delete in interface ByMethodSpec
        Parameters:
        clazz - a handler class
        Returns:
        this
      • delete

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

        GroovyByMethodSpec named​(java.lang.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.

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

        GroovyByMethodSpec named​(java.lang.String methodName,
                                 java.lang.Class<? extends Handler> clazz)
        Description copied from interface: ByMethodSpec
        Inserts the handler to chain if the request has a HTTP method of methodName.

        The method name is case insensitive.

        Specified by:
        named in interface ByMethodSpec
        Parameters:
        methodName - The HTTP method to map the given action to
        clazz - a handler class
        Returns:
        this
      • named

        GroovyByMethodSpec named​(java.lang.String methodName,
                                 Handler handler)
        Description copied from interface: ByMethodSpec
        Inserts the handler to chain if the request has a HTTP method of methodName.

        The method name is case insensitive.

        Specified by:
        named in interface ByMethodSpec
        Parameters:
        methodName - The HTTP method to map the given action to
        handler - the handler to delegate to
        Returns:
        this