Class DefaultHttpResponseAction
java.lang.Object
se.swedenconnect.signservice.core.http.DefaultHttpResponseAction
- All Implemented Interfaces:
HttpResponseAction
Default implementation of the
HttpResponseAction interface.-
Constructor Summary
ConstructorsConstructorDescriptionConstructor setting up theHttpResponseActionwith a response body action.Constructor setting up theHttpResponseActionwith a post action.DefaultHttpResponseAction(HttpRedirectAction redirect) Constructor setting up theHttpResponseActionwith 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 returnHttpBodyActionobject 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 theHttpPostActiontelling 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 theHttpRedirectActiontelling where the user's browser should be directed.toString()
-
Constructor Details
-
DefaultHttpResponseAction
Constructor setting up theHttpResponseActionwith a redirect action.- Parameters:
redirect- the redirect action
-
DefaultHttpResponseAction
Constructor setting up theHttpResponseActionwith a post action.- Parameters:
post- the post action
-
DefaultHttpResponseAction
Constructor setting up theHttpResponseActionwith 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 theHttpRedirectActiontelling where the user's browser should be directed.- Specified by:
getRedirectin 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 theHttpPostActiontelling where the user's browser should be posted and with which parameters.- Specified by:
getPostin 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 returnHttpBodyActionobject that tells how the HTTP response should be constructed (filled in).- Specified by:
getBodyin interfaceHttpResponseAction- Returns:
- a HttpBodyAction, or null if this is not a response body action
-
toString
-