Class LogviewerResponseBuilder
java.lang.Object
org.apache.storm.daemon.logviewer.utils.LogviewerResponseBuilder
- 
Method SummaryModifier and TypeMethodDescriptionstatic jakarta.ws.rs.core.ResponsebuildDownloadFile(String contentDispositionName, File file, com.codahale.metrics.Meter numFileDownloadExceptions) Build a Response object representing download a file.static jakarta.ws.rs.core.ResponsebuildExceptionJsonResponse(Exception ex, String callback) Build a Response object representing exception, with JSON response.static jakarta.ws.rs.core.ResponseBuild a Response object representing page not found.static jakarta.ws.rs.core.ResponseBuild a Response object representing unauthorized user, with HTML response.static jakarta.ws.rs.core.ResponsebuildSuccessHtmlResponse(String content) Build a Response object representing success response with HTML entity.static jakarta.ws.rs.core.ResponsebuildSuccessJsonResponse(Object entity, String callback, String origin) Build a Response object representing success response with JSON entity.static jakarta.ws.rs.core.ResponsebuildUnauthorizedUserJsonResponse(String user, String callback) Build a Response object representing unauthorized user, with JSON response.
- 
Method Details- 
buildSuccessHtmlResponseBuild a Response object representing success response with HTML entity.- Parameters:
- content- HTML entity content, String type
 
- 
buildSuccessJsonResponsepublic static jakarta.ws.rs.core.Response buildSuccessJsonResponse(Object entity, String callback, String origin) Build a Response object representing success response with JSON entity.- Parameters:
- entity- entity object to represent it as JSON
- callback- callbackParameterName for JSONP
- origin- origin
 
- 
buildDownloadFilepublic static jakarta.ws.rs.core.Response buildDownloadFile(String contentDispositionName, File file, com.codahale.metrics.Meter numFileDownloadExceptions) throws IOException Build a Response object representing download a file.- Parameters:
- contentDispositionName- The name to set in the Content-Disposition header
- file- file to download
- Throws:
- IOException
 
- 
buildResponseUnauthorizedUserBuild a Response object representing unauthorized user, with HTML response.- Parameters:
- user- username
 
- 
buildResponsePageNotFoundpublic static jakarta.ws.rs.core.Response buildResponsePageNotFound()Build a Response object representing page not found.
- 
buildUnauthorizedUserJsonResponsepublic static jakarta.ws.rs.core.Response buildUnauthorizedUserJsonResponse(String user, String callback) Build a Response object representing unauthorized user, with JSON response.- Parameters:
- user- username
- callback- callbackParameterName for JSONP
 
- 
buildExceptionJsonResponseBuild a Response object representing exception, with JSON response.- Parameters:
- ex- Exception object
- callback- callbackParameterName for JSONP
 
 
-