public class SetResponseHeadersHandler extends AbstractHttpHandler
Constructor and Description |
---|
SetResponseHeadersHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handle(String pathInContext,
String pathParams,
HttpRequest request,
HttpResponse response)
Handle a request by pre-populating the headers from the configured
set of _fields.
|
void |
setHeaderValue(String name,
String value)
Set a header override, every response handled will have this header set.
|
void |
setHeaderValues(String name,
String[] values)
Set a multivalued header, every response handled will have
this header set with the provided values.
|
getHttpContext, getName, handleTrace, initialize, isStarted, setName, start, stop, toString
public void setHeaderValue(String name, String value)
name
- The String name of the header.value
- The String value of the header.public void setHeaderValues(String name, String[] values)
name
- The String name of the header.values
- An Array of String values to use as the values for a Header.public void handle(String pathInContext, String pathParams, HttpRequest request, HttpResponse response) throws HttpException, IOException
pathInContext
- The context path. Ignored.pathParams
- Path parameters such as encoded Session ID. Ignored.request
- The HttpRequest request. Ignored.response
- The HttpResponse response. Updated with new Headers.HttpException
IOException
Copyright © 2016. All Rights Reserved.