Class ResponseContentTypeHandler

  • All Implemented Interfaces:
    io.vertx.core.Handler<RoutingContext>, PlatformHandler

    public class ResponseContentTypeHandler
    extends Object
    implements PlatformHandler, io.vertx.core.Handler<RoutingContext>
    A handler which sets the response content type automatically according to the best Accept header match. The header is set only if:
    • no object is stored in the routing context under the name ResponseContentTypeHandler
    • a match is found
    • the header is not present already
    • content length header is absent or set to something different than zero

    NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

    • Constructor Detail

      • ResponseContentTypeHandler

        public ResponseContentTypeHandler​(io.vertx.ext.web.handler.ResponseContentTypeHandler delegate)
      • ResponseContentTypeHandler

        public ResponseContentTypeHandler​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDelegate

        public io.vertx.ext.web.handler.ResponseContentTypeHandler getDelegate()
        Specified by:
        getDelegate in interface PlatformHandler
      • handle

        public void handle​(RoutingContext event)
        Something has happened, so handle it.
        Specified by:
        handle in interface io.vertx.core.Handler<RoutingContext>
        Specified by:
        handle in interface PlatformHandler
        Parameters:
        event - the event to handle
      • create

        public static ResponseContentTypeHandler create()
        Create a response content type handler.
        Returns:
        the response content type handler
      • create

        public static ResponseContentTypeHandler create​(String disableFlag)
        Create a response content type handler with a custom disable flag.
        Parameters:
        disableFlag -
        Returns:
        the response content type handler