Created
December 29, 2010 18:37
-
-
Save noise/758857 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdfds | |
fds | |
fds | |
public void returnStatus(int statusCode) | |
{ | |
Timer t = statusTag.create().start(); | |
setResponding(); | |
if (statusCode == Response.SC_NO_CONTENT | |
&& representor instanceof NoContentRepresentor) | |
{ | |
statusCode = Response.SC_OK; | |
this.statusCode = statusCode; | |
setStatus(statusCode); | |
((NoContentRepresentor)representor).write(contentType, getRequest(), this); | |
} | |
else | |
{ | |
this.statusCode = statusCode; | |
setStatus(statusCode); | |
if (errorRepresentorLookup.isError(statusCode)) | |
{ | |
ErrorRepresentor rep = errorRepresentorLookup.getRepresentor(statusCode); | |
rep.write(statusCode, contentType, getRequest(), this); | |
} | |
} | |
t.stop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment