Class ResponseContentTypeHandler
- java.lang.Object
-
- io.vertx.reactivex.ext.web.handler.ResponseContentTypeHandler
-
- All Implemented Interfaces:
Handler<RoutingContext>
,PlatformHandler
public class ResponseContentTypeHandler extends Object implements PlatformHandler, Handler<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 RX-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(ResponseContentTypeHandler delegate)
ResponseContentTypeHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResponseContentTypeHandler
create()
Create a response content type handler.static ResponseContentTypeHandler
create(String disableFlag)
Create a response content type handler with a custom disable flag.boolean
equals(Object o)
ResponseContentTypeHandler
getDelegate()
void
handle(RoutingContext event)
Something has happened, so handle it.int
hashCode()
static ResponseContentTypeHandler
newInstance(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(ResponseContentTypeHandler delegate)
-
ResponseContentTypeHandler
public ResponseContentTypeHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public ResponseContentTypeHandler getDelegate()
- Specified by:
getDelegate
in interfacePlatformHandler
-
handle
public void handle(RoutingContext event)
Something has happened, so handle it.- Specified by:
handle
in interfaceHandler<RoutingContext>
- Specified by:
handle
in interfacePlatformHandler
- 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
-
newInstance
public static ResponseContentTypeHandler newInstance(ResponseContentTypeHandler arg)
-
-