Interface GroovyByContentSpec

  • All Superinterfaces:
    ratpack.handling.ByContentSpec
    All Known Implementing Classes:
    DefaultGroovyByContentSpec

    public interface GroovyByContentSpec
    extends ratpack.handling.ByContentSpec
    A Groovy oriented content negotiation handler builder.
    Since:
    1.5
    See Also:
    GroovyContext.byMethod(Closure), ByMethodSpec
    • Method Detail

      • type

        default GroovyByContentSpec type​(java.lang.String mimeType,
                                         @DelegatesTo(value=GroovyContext.class,strategy=1)
                                         Closure<?> handler)
        Specifies that the given handler should be used if the client wants content of the given MIME type. This only supports fully-specified content types (no "*" wildcards).
        Parameters:
        mimeType - the MIME type to register for
        handler - the handler to invoke if the content type matches
        Returns:
        this
      • type

        default GroovyByContentSpec type​(java.lang.CharSequence mimeType,
                                         @DelegatesTo(value=GroovyContext.class,strategy=1)
                                         Closure<?> handler)
        Specifies that the given handler should be used if the client wants content of the given MIME type. This only supports fully-specified content types (no "*" wildcards).
        Parameters:
        mimeType - the MIME type to register for
        handler - the handler to invoke if the content type matches
        Returns:
        this
        Since:
        1.6
      • unspecified

        default GroovyByContentSpec unspecified​(@DelegatesTo(value=GroovyContext.class,strategy=1)
                                                Closure<?> handler)
        Specifies that the given handler should be used if the client did not provide a usable "Accept" header in the request.
        Parameters:
        handler - the handler to invoke if if no usable "Accept" header is present in the request.
        Returns:
        this
      • type

        GroovyByContentSpec type​(java.lang.String mimeType,
                                 ratpack.func.Block block)
        Specified by:
        type in interface ratpack.handling.ByContentSpec
      • type

        GroovyByContentSpec type​(java.lang.CharSequence mimeType,
                                 ratpack.func.Block block)
        Specified by:
        type in interface ratpack.handling.ByContentSpec
      • type

        GroovyByContentSpec type​(java.lang.String mimeType,
                                 ratpack.handling.Handler handler)
        Specified by:
        type in interface ratpack.handling.ByContentSpec
      • type

        GroovyByContentSpec type​(java.lang.CharSequence mimeType,
                                 ratpack.handling.Handler handler)
        Specified by:
        type in interface ratpack.handling.ByContentSpec
      • type

        GroovyByContentSpec type​(java.lang.String mimeType,
                                 java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        type in interface ratpack.handling.ByContentSpec
      • type

        GroovyByContentSpec type​(java.lang.CharSequence mimeType,
                                 java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        type in interface ratpack.handling.ByContentSpec
      • plainText

        GroovyByContentSpec plainText​(ratpack.func.Block block)
        Specified by:
        plainText in interface ratpack.handling.ByContentSpec
      • plainText

        GroovyByContentSpec plainText​(ratpack.handling.Handler handler)
        Specified by:
        plainText in interface ratpack.handling.ByContentSpec
      • plainText

        GroovyByContentSpec plainText​(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        plainText in interface ratpack.handling.ByContentSpec
      • html

        GroovyByContentSpec html​(ratpack.func.Block block)
        Specified by:
        html in interface ratpack.handling.ByContentSpec
      • html

        GroovyByContentSpec html​(ratpack.handling.Handler handler)
        Specified by:
        html in interface ratpack.handling.ByContentSpec
      • html

        GroovyByContentSpec html​(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        html in interface ratpack.handling.ByContentSpec
      • json

        GroovyByContentSpec json​(ratpack.func.Block block)
        Specified by:
        json in interface ratpack.handling.ByContentSpec
      • json

        GroovyByContentSpec json​(ratpack.handling.Handler handler)
        Specified by:
        json in interface ratpack.handling.ByContentSpec
      • json

        GroovyByContentSpec json​(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        json in interface ratpack.handling.ByContentSpec
      • xml

        GroovyByContentSpec xml​(ratpack.func.Block block)
        Specified by:
        xml in interface ratpack.handling.ByContentSpec
      • xml

        GroovyByContentSpec xml​(ratpack.handling.Handler handler)
        Specified by:
        xml in interface ratpack.handling.ByContentSpec
      • xml

        GroovyByContentSpec xml​(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        xml in interface ratpack.handling.ByContentSpec
      • noMatch

        GroovyByContentSpec noMatch​(ratpack.func.Block block)
        Specified by:
        noMatch in interface ratpack.handling.ByContentSpec
      • noMatch

        GroovyByContentSpec noMatch​(ratpack.handling.Handler handler)
        Specified by:
        noMatch in interface ratpack.handling.ByContentSpec
      • noMatch

        GroovyByContentSpec noMatch​(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        noMatch in interface ratpack.handling.ByContentSpec
      • noMatch

        GroovyByContentSpec noMatch​(java.lang.String mimeType)
        Specified by:
        noMatch in interface ratpack.handling.ByContentSpec
      • unspecified

        GroovyByContentSpec unspecified​(ratpack.func.Block block)
        Specified by:
        unspecified in interface ratpack.handling.ByContentSpec
      • unspecified

        GroovyByContentSpec unspecified​(ratpack.handling.Handler handler)
        Specified by:
        unspecified in interface ratpack.handling.ByContentSpec
      • unspecified

        GroovyByContentSpec unspecified​(java.lang.Class<? extends ratpack.handling.Handler> handlerType)
        Specified by:
        unspecified in interface ratpack.handling.ByContentSpec
      • unspecified

        GroovyByContentSpec unspecified​(java.lang.String mimeType)
        Specified by:
        unspecified in interface ratpack.handling.ByContentSpec