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>
,Consumer<RoutingContext>
public class ResponseContentTypeHandler extends Object implements io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
A handler which sets the response content type automatically according to the bestAccept
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
original
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<ResponseContentTypeHandler>
__TYPE_ARG
static String
DEFAULT_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 void
accept(RoutingContext item)
static ResponseContentTypeHandler
create()
static ResponseContentTypeHandler
create(String disableFlag)
boolean
equals(Object o)
io.vertx.ext.web.handler.ResponseContentTypeHandler
getDelegate()
void
handle(RoutingContext arg0)
int
hashCode()
static ResponseContentTypeHandler
newInstance(io.vertx.ext.web.handler.ResponseContentTypeHandler arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final 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()
-
handle
public void handle(RoutingContext arg0)
- Specified by:
handle
in interfaceio.vertx.core.Handler<RoutingContext>
-
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:
accept
in interfaceConsumer<RoutingContext>
-
newInstance
public static ResponseContentTypeHandler newInstance(io.vertx.ext.web.handler.ResponseContentTypeHandler arg)
-
-