Class DefaultHttpResponseAction
java.lang.Object
se.swedenconnect.signservice.core.http.DefaultHttpResponseAction
- All Implemented Interfaces:
HttpResponseAction
Default implementation of the
HttpResponseAction
interface.-
Constructor Summary
ConstructorDescriptionConstructor setting up theHttpResponseAction
with a response body action.Constructor setting up theHttpResponseAction
with a post action.DefaultHttpResponseAction
(HttpRedirectAction redirect) Constructor setting up theHttpResponseAction
with a redirect action. -
Method Summary
Modifier and TypeMethodDescriptiongetBody()
If the response action is that the SignService should reply to a request by sending back a 200 status with a response body this method returnHttpBodyAction
object that tells how the HTTP response should be constructed (filled in).getPost()
If the response action is that a HTTP POST should be performed this method returns theHttpPostAction
telling where the user's browser should be posted and with which parameters.If the response action is that a HTTP redirect should be performed this method returns theHttpRedirectAction
telling where the user's browser should be directed.toString()
-
Constructor Details
-
DefaultHttpResponseAction
Constructor setting up theHttpResponseAction
with a redirect action.- Parameters:
redirect
- the redirect action
-
DefaultHttpResponseAction
Constructor setting up theHttpResponseAction
with a post action.- Parameters:
post
- the post action
-
DefaultHttpResponseAction
Constructor setting up theHttpResponseAction
with a response body action.- Parameters:
body
- the response body action
-
-
Method Details
-
getRedirect
If the response action is that a HTTP redirect should be performed this method returns theHttpRedirectAction
telling where the user's browser should be directed.- Specified by:
getRedirect
in interfaceHttpResponseAction
- Returns:
- a HttpRedirectAction, or null if this is not a redirect action
-
getPost
If the response action is that a HTTP POST should be performed this method returns theHttpPostAction
telling where the user's browser should be posted and with which parameters.- Specified by:
getPost
in interfaceHttpResponseAction
- Returns:
- a HttpPostAction, or null if this is not a post action
-
getBody
If the response action is that the SignService should reply to a request by sending back a 200 status with a response body this method returnHttpBodyAction
object that tells how the HTTP response should be constructed (filled in).- Specified by:
getBody
in interfaceHttpResponseAction
- Returns:
- a HttpBodyAction, or null if this is not a response body action
-
toString
-