|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kohsuke.stapler.HttpResponses
public class HttpResponses
Factory for HttpResponse
.
Nested Class Summary | |
---|---|
static class |
HttpResponses.HttpResponseException
|
Constructor Summary | |
---|---|
HttpResponses()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpResponses()
Method Detail |
---|
public static HttpResponses.HttpResponseException ok()
public static HttpResponses.HttpResponseException notFound()
public static HttpResponses.HttpResponseException forbidden()
public static HttpResponses.HttpResponseException status(int code)
public static HttpResponses.HttpResponseException error(int code, String errorMessage)
public static HttpResponses.HttpResponseException error(int code, Throwable cause)
public static HttpResponses.HttpResponseException redirectViaContextPath(String relative)
relative
- The path relative to the context path. The context path + this value
is sent to the user.public static HttpRedirect redirectTo(String url)
url
- The URL to redirect to. If relative, relative to the page currently being served.public static HttpResponse redirectToDot()
public static HttpResponses.HttpResponseException redirectToContextRoot()
public static HttpResponses.HttpResponseException forwardToPreviousPage()
public static HttpResponse staticResource(URL resource)
staticResource(resource,0)
public static HttpResponse staticResource(URL resource, long expiration)
resource
- The static resource to be served.expiration
- The number of milliseconds until the resource will "expire".
Until it expires the browser will be allowed to cache it
and serve it without checking back with the server.
After it expires, the client will send conditional GET to
check if the resource is actually modified or not.
If 0, it will immediately expire.public static HttpResponse html(String literalHtml)
public static HttpResponse plainText(String plainText)
public static ForwardToView forwardToView(Object it, String view)
public static ForwardToView forwardToView(Class clazz, String view)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |