com.endeca.infront.assembler.servlet
Class JsonResponseWriter

java.lang.Object
  extended by com.endeca.infront.assembler.servlet.JsonResponseWriter
All Implemented Interfaces:
ResponseWriter

public class JsonResponseWriter
extends Object
implements ResponseWriter

Serializes the Assembler output as JSON and writes it to the response.

This class maintains no state and is completely thread-safe.


Constructor Summary
JsonResponseWriter()
           
 
Method Summary
 void write(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, ContentItem assemblerOutput)
          Serializes the Assembler output as JSON and writes it to the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonResponseWriter

public JsonResponseWriter()
Method Detail

write

public void write(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse resp,
                  ContentItem assemblerOutput)
           throws javax.servlet.ServletException,
                  IOException
Serializes the Assembler output as JSON and writes it to the response.

Specified by:
write in interface ResponseWriter
Parameters:
req - The servlet request
resp - The response
assemblerOutput - The Assembler output
Throws:
javax.servlet.ServletException - If there was a problem handling the request
IOException - If there was a problem writing to the response


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.