Top Description Fields Constructors Methods
io.undertow.server.handlers

public Class DateHandler

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Annotations
@Deprecated
Imports
java.util.Date, io.undertow.server.HttpHandler, .HttpServerExchange, io.undertow.util.DateUtils, .Headers

Deprecated

Class that adds the Date: header to a HTTP response. The current date string is cached, and is updated every second in a racey manner (i.e. it is possible for two thread to update it at once).

This handler is deprecated, the same functionality is achieved by using the server option ALWAYS_SET_DATE. It is enabled by default.

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private volatile String
private final HttpHandler
private volatile long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
handleRequest(final HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cachedDateStringback to summary
private volatile String cachedDateString
nextback to summary
private final HttpHandler next
nextUpdateTimeback to summary
private volatile long nextUpdateTime

Constructor Detail

DateHandlerback to summary
public DateHandler(final HttpHandler next)

Method Detail

handleRequestback to summary
public void handleRequest(final HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

Annotations
@Override