Module io.smallrye.mutiny.vertx.web
Package io.vertx.mutiny.ext.web.handler
Class ResponseContentTypeHandler
- java.lang.Object
-
- io.vertx.mutiny.ext.web.handler.ResponseContentTypeHandler
-
- All Implemented Interfaces:
io.vertx.core.Handler<RoutingContext>,PlatformHandler,Consumer<RoutingContext>
public class ResponseContentTypeHandler extends Object implements PlatformHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
A handler which sets the response content type automatically according to the bestAcceptheader 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
originalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.smallrye.mutiny.vertx.TypeArg<ResponseContentTypeHandler>__TYPE_ARGstatic StringDEFAULT_DISABLE_FLAG
-
Constructor Summary
Constructors Constructor Description ResponseContentTypeHandler(io.vertx.ext.web.handler.ResponseContentTypeHandler delegate)ResponseContentTypeHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(RoutingContext item)static ResponseContentTypeHandlercreate()static ResponseContentTypeHandlercreate(String disableFlag)booleanequals(Object o)io.vertx.ext.web.handler.ResponseContentTypeHandlergetDelegate()voidhandle(RoutingContext arg0)inthashCode()static ResponseContentTypeHandlernewInstance(io.vertx.ext.web.handler.ResponseContentTypeHandler arg)StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.smallrye.mutiny.vertx.TypeArg<ResponseContentTypeHandler> __TYPE_ARG
-
DEFAULT_DISABLE_FLAG
public static final String DEFAULT_DISABLE_FLAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ResponseContentTypeHandler
public ResponseContentTypeHandler(io.vertx.ext.web.handler.ResponseContentTypeHandler delegate)
-
ResponseContentTypeHandler
public ResponseContentTypeHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.handler.ResponseContentTypeHandler getDelegate()
- Specified by:
getDelegatein interfacePlatformHandler
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handlein interfaceio.vertx.core.Handler<RoutingContext>- Specified by:
handlein interfacePlatformHandler
-
create
public static ResponseContentTypeHandler create()
- Returns:
- the response content type handler
-
create
public static ResponseContentTypeHandler create(String disableFlag)
- Parameters:
disableFlag-- Returns:
- the response content type handler
-
accept
public void accept(RoutingContext item)
- Specified by:
acceptin interfaceConsumer<RoutingContext>- Specified by:
acceptin interfacePlatformHandler
-
newInstance
public static ResponseContentTypeHandler newInstance(io.vertx.ext.web.handler.ResponseContentTypeHandler arg)
-
-