Package org.kohsuke.stapler
Interface HttpResponse
- All Known Implementing Classes:
Bound,ForwardToView,HttpRedirect,HttpResponses.HttpResponseException,JsonHttpResponse
public interface HttpResponse
Object that represents the HTTP response, which is defined as a capability to produce the response.
doXyz(...) method could return an object of this type or throw an exception of this type, and if it does so,
the object is asked to produce HTTP response.
This is useful to make doXyz look like a real function, and decouple it further from HTTP.
- Author:
- Kohsuke Kawaguchi
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidgenerateResponse(StaplerRequest2 req, StaplerResponse2 rsp, Object node) default voidgenerateResponse(StaplerRequest req, StaplerResponse rsp, Object node) Deprecated.
-
Method Details
-
generateResponse
default void generateResponse(StaplerRequest2 req, StaplerResponse2 rsp, Object node) throws IOException, jakarta.servlet.ServletException - Parameters:
node- The object whose "doXyz" method created this object.- Throws:
IOExceptionjakarta.servlet.ServletException
-
generateResponse
@Deprecated default void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, javax.servlet.ServletException Deprecated.- Throws:
IOExceptionjavax.servlet.ServletException
-
generateResponse(StaplerRequest2, StaplerResponse2, Object)