org.clazzes.util.http
Class AdditionalHeader
java.lang.Object
org.clazzes.util.http.AdditionalHeader
- All Implemented Interfaces:
- Serializable
public class AdditionalHeader
- extends Object
- implements Serializable
A configuration POJO, which lets the user configure additional
headers to be delivered based on MIME type and/ or path regex matching.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdditionalHeader
public AdditionalHeader()
AdditionalHeader
public AdditionalHeader(String header,
String value,
Pattern pathRegex,
Pattern mimeTypeRegex)
- Parameters:
header
- The name of the header to be delivered.value
- The value of the header to be delivered.pathRegex
- A regular expression to match the extra path info as returned
by HttpServletRequest.getPathInfo()
after any alias
matching as per ResourceServlet.setAliases(java.util.Map)
.
If null
, any path matches.mimeTypeRegex
- A regular expression to match the MIME type of a delivered resource.
If null
, any MIME type matches.
getPathRegex
public Pattern getPathRegex()
- Returns:
- A regular expression to match extra path infos.
setPathRegex
public void setPathRegex(Pattern pathRegex)
- Parameters:
pathRegex
- A regular expression to match the extra path info as returned
by HttpServletRequest.getPathInfo()
after any alias
matching as per ResourceServlet.setAliases(java.util.Map)
.
If null
, any path matches.
getMimeTypeRegex
public Pattern getMimeTypeRegex()
- Returns:
- a regular expression to the MIME type of a delivered resource.
setMimeTypeRegex
public void setMimeTypeRegex(Pattern mimeTypeRegex)
- Parameters:
mimeTypeRegex
- A regular expression to match the MIME type of a delivered resource.
If null
, any MIME type matches.
getHeader
public String getHeader()
- Returns:
- The name of the header to be delivered.
setHeader
public void setHeader(String header)
- Parameters:
header
- The name of the header to be delivered.
getValue
public String getValue()
- Returns:
- The value of the header to be delivered.
setValue
public void setValue(String value)
- Parameters:
value
- The value of the header to be delivered.
Copyright © 2012. All Rights Reserved.