com.centurylink.mdw.hub.servlet.StatusResponder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mdw-hub Show documentation
Show all versions of mdw-hub Show documentation
MDW is a workflow framework specializing in microservice orchestration
The newest version!
package com.centurylink.mdw.hub.servlet;
import com.centurylink.mdw.model.StatusResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class StatusResponder {
private HttpServletResponse servletResponse;
public StatusResponder(HttpServletResponse servletResponse) {
this.servletResponse = servletResponse;
}
public void writeResponse(StatusResponse response) throws IOException {
servletResponse.setStatus(response.getStatus().getCode());
servletResponse.getWriter().println(response.getJson().toString(2));
}
}