Guest User

Untitled

a guest
Jul 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1.  
  2. sdfds
  3. fds
  4. fds
  5.  
  6. public void returnStatus(int statusCode)
  7. {
  8. Timer t = statusTag.create().start();
  9. setResponding();
  10. if (statusCode == Response.SC_NO_CONTENT
  11. && representor instanceof NoContentRepresentor)
  12. {
  13. statusCode = Response.SC_OK;
  14. this.statusCode = statusCode;
  15. setStatus(statusCode);
  16. ((NoContentRepresentor)representor).write(contentType, getRequest(), this);
  17. }
  18. else
  19. {
  20. this.statusCode = statusCode;
  21. setStatus(statusCode);
  22. if (errorRepresentorLookup.isError(statusCode))
  23. {
  24. ErrorRepresentor rep = errorRepresentorLookup.getRepresentor(statusCode);
  25. rep.write(statusCode, contentType, getRequest(), this);
  26. }
  27. }
  28. t.stop();
  29. }
Add Comment
Please, Sign In to add comment