|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.web.mapper.output.impl.AbstractResponseWriter
public abstract class AbstractResponseWriter
ResponseWriter의 구현을 일반화한 Abstract 클래스이다. ResponseWriter의 write() 메소드를 아래와 같이 구현하였다.
public String write(ValueObjectAssembler voa, Throwable thr,
HttpServletRequest req, HttpServletResponse res)
throws IOException {
writeHead(req, res);
if ( thr == null ) { // 정상처리
writeBody(voa, req, res); // 결과 출력
writeMessage(req, res); // 정상 처리 메시지 출력
} else { // 오류 처리
writeException(thr, req, res);
}
writeTail(req, res);
return getForwardPath();
}
| Field Summary | |
|---|---|
protected static String |
DEFAULT_CLIENT_MESSAGE_KEY
디폴트 클라이언트 메시지를 가져오기 위한 Key |
protected static String |
LINE_SEPARATOR
|
| Constructor Summary | |
|---|---|
AbstractResponseWriter(Output output)
|
|
| Method Summary | |
|---|---|
protected abstract String |
getForwardPath()
출력이 종료된 후 Forward 할 경우 Forward 할 URL 경로를 반환한다. |
protected Output |
getOutput()
|
String |
write(ValueObjectAssembler voa,
Throwable thr,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
ValueObjectAssembler의 내용을 출력한다. |
protected abstract void |
writeBody(ValueObjectAssembler voa,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
데이터를 출력하는 메소드이다. |
protected abstract void |
writeException(Throwable thr,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
오류 상황을 출력하는 메소드이다. |
protected abstract void |
writeHead(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
전체 출력 작업 중 맨처음에 호출되는 메소드이다. |
protected abstract void |
writeMessage(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
데이터 출력 후 호출되는 메소드이다. |
protected abstract void |
writeTail(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
전체 출력 작업 중 마지막에 호출되는 메소드이다. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String LINE_SEPARATOR
protected static final String DEFAULT_CLIENT_MESSAGE_KEY
| Constructor Detail |
|---|
public AbstractResponseWriter(Output output)
| Method Detail |
|---|
public String write(ValueObjectAssembler voa,
Throwable thr,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException
ResponseWriter
write in interface ResponseWriterIOExceptionprotected Output getOutput()
protected abstract void writeHead(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException
req - res -
IOException
protected abstract void writeTail(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException
req - res -
IOException
protected abstract void writeBody(ValueObjectAssembler voa,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException
voa - req - res -
IOException
protected abstract void writeException(Throwable thr,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException
tr - req - res -
IOException
protected abstract void writeMessage(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws IOException
req - res -
IOExceptionprotected abstract String getForwardPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||