Package com.cloudbees.workflow.util
Class JsonResponse
- java.lang.Object
-
- com.cloudbees.workflow.util.JsonResponse
-
- All Implemented Interfaces:
org.kohsuke.stapler.HttpResponse
public class JsonResponse extends Object implements org.kohsuke.stapler.HttpResponse
POJO converted to JSON via Jackson as HTTP response.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description JsonResponse(com.fasterxml.jackson.databind.ObjectMapper mapper, Object pojo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object node)
-
-
-
Field Detail
-
pojo
public final Object pojo
-
mapper
public final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Constructor Detail
-
JsonResponse
public JsonResponse(com.fasterxml.jackson.databind.ObjectMapper mapper, Object pojo)
-
-
Method Detail
-
generateResponse
public void generateResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object node) throws IOException, javax.servlet.ServletException
- Specified by:
generateResponse
in interfaceorg.kohsuke.stapler.HttpResponse
- Throws:
IOException
javax.servlet.ServletException
-
-