public final class XMLResponse extends Object
This class is not thread-safe.
Constructor and Description |
---|
XMLResponse(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
BerliozConfig config,
MatchingService match,
boolean profile)
Creates a new XML response for the specified arguments.
|
Modifier and Type | Method and Description |
---|---|
String |
generate()
Generates an XML response for the wrapped HTTP request and response objects.
|
BerliozException |
getError()
Returns a Berlioz Exception wrapping any error(s) that may have been thrown by the generators.
|
String |
getEtag()
Returns the Etag for this response.
|
String |
getRedirectURL()
Returns the URL to redirect to.
|
Service |
getService()
Returns the service corresponding to this response.
|
ContentStatus |
getStatus()
Returns the status of this service response.
|
public XMLResponse(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, BerliozConfig config, MatchingService match, boolean profile)
req
- The HTTP servlet request.res
- The HTTP servlet response.config
- The Berlioz configuration environment.match
- The matching serviceprofile
- Whether to enable profiling.public Service getService()
public String getEtag()
The Etag is computed from the Etags returned by each generator.
If any one of the generators is not cacheable, this response is not considered cacheable
and the Etag returned will be null
.
null
if it is not.public ContentStatus getStatus()
public BerliozException getError()
public String getRedirectURL()
public String generate() throws IOException
IOException
- Should an I/O error occur.Copyright © 2016 Allette Systems. All rights reserved.