org.apache.storm.daemon.common

## Class JsonResponseBuilder

- java.lang.Object
- - org.apache.storm.daemon.common.JsonResponseBuilder

-     public class JsonResponseBuilder
      extends Object

  Response builder for JSON. It utilizes `UIHelpers` to construct JSON body and headers.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonResponseBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `build()` Build a Response based on given parameters.
    `JsonResponseBuilder` | `setCallback(String callback)`
    `JsonResponseBuilder` | `setData(Object data)`
    `JsonResponseBuilder` | `setHeaders(Map<String,Object> headers)`
    `JsonResponseBuilder` | `setNeedSerialize(boolean needSerialize)`
    `JsonResponseBuilder` | `setStatus(int status)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JsonResponseBuilder

          public JsonResponseBuilder()

  - ### Method Detail

    - #### setData

          public JsonResponseBuilder setData(Object data)

    - #### setCallback

          public JsonResponseBuilder setCallback(String callback)

    - #### setNeedSerialize

          public JsonResponseBuilder setNeedSerialize(boolean needSerialize)

    - #### setStatus

          public JsonResponseBuilder setStatus(int status)

    - #### setHeaders

          public JsonResponseBuilder setHeaders(Map<String,Object> headers)

    - #### build

          public javax.ws.rs.core.Response build()

      Build a Response based on given parameters.

      Returns:
        A Response.

Copyright © 2021 The Apache Software Foundation. All rights reserved.