Class DefaultHttpResponseAction

java.lang.Object
se.swedenconnect.signservice.core.http.DefaultHttpResponseAction
All Implemented Interfaces:
HttpResponseAction

public class DefaultHttpResponseAction extends Object implements HttpResponseAction
Default implementation of the HttpResponseAction interface.
  • Constructor Details

    • DefaultHttpResponseAction

      public DefaultHttpResponseAction(@Nonnull HttpRedirectAction redirect)
      Constructor setting up the HttpResponseAction with a redirect action.
      Parameters:
      redirect - the redirect action
    • DefaultHttpResponseAction

      public DefaultHttpResponseAction(@Nonnull HttpPostAction post)
      Constructor setting up the HttpResponseAction with a post action.
      Parameters:
      post - the post action
    • DefaultHttpResponseAction

      public DefaultHttpResponseAction(@Nonnull HttpBodyAction body)
      Constructor setting up the HttpResponseAction with a response body action.
      Parameters:
      body - the response body action
  • Method Details

    • getRedirect

      @Nullable public HttpRedirectAction getRedirect()
      If the response action is that a HTTP redirect should be performed this method returns the HttpRedirectAction telling where the user's browser should be directed.
      Specified by:
      getRedirect in interface HttpResponseAction
      Returns:
      a HttpRedirectAction, or null if this is not a redirect action
    • getPost

      @Nullable public HttpPostAction getPost()
      If the response action is that a HTTP POST should be performed this method returns the HttpPostAction telling where the user's browser should be posted and with which parameters.
      Specified by:
      getPost in interface HttpResponseAction
      Returns:
      a HttpPostAction, or null if this is not a post action
    • getBody

      @Nullable public HttpBodyAction 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 return HttpBodyAction object that tells how the HTTP response should be constructed (filled in).
      Specified by:
      getBody in interface HttpResponseAction
      Returns:
      a HttpBodyAction, or null if this is not a response body action
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object