Class EmbeddedRequestBuilder

java.lang.Object
cloud.piranha.embedded.EmbeddedRequestBuilder

public class EmbeddedRequestBuilder extends Object
The builder so you can easily build instances of EmbeddedRequest.
Author:
Manfred Riem ([email protected])
See Also:
EmbeddedRequest
  • Constructor Details

    • EmbeddedRequestBuilder

      public EmbeddedRequestBuilder()
      Constructor.
  • Method Details

    • attribute

      public EmbeddedRequestBuilder attribute(String name, Object value)
      Add an attribute.
      Parameters:
      name - the name.
      value - the value.
      Returns:
      the builder.
    • build

      public EmbeddedRequest build()
      Build the request.
      Returns:
      the request.
    • contextPath

      public EmbeddedRequestBuilder contextPath(String contextPath)
      Set the context path.
      Parameters:
      contextPath - the context path.
      Returns:
      the builder.
    • cookie

      public EmbeddedRequestBuilder cookie(Cookie cookie)
      Add a cookie.
      Parameters:
      cookie - the cookie.
      Returns:
      the builder.
    • header

      public EmbeddedRequestBuilder header(String name, String value)
      Adds a single valued header
      Parameters:
      name - the name of the header
      value - the value of the header
      Returns:
      the builder.
    • method

      public EmbeddedRequestBuilder method(String method)
      Set the method.
      Parameters:
      method - the method.
      Returns:
      the builder.
    • parameter

      public EmbeddedRequestBuilder parameter(String name, String... values)
      Add a parameter.
      Parameters:
      name - the name.
      values - the values.
      Returns:
      the builder.
    • pathInfo

      public EmbeddedRequestBuilder pathInfo(String pathInfo)
      Set the path info.
      Parameters:
      pathInfo - the path info.
      Returns:
      the builder.
    • requestedSessionId

      public EmbeddedRequestBuilder requestedSessionId(String requestedSessionId)
      Set the requested session id.
      Parameters:
      requestedSessionId - the requested session id.
      Returns:
      the builder.
    • requestedSessionIdFromCookie

      public EmbeddedRequestBuilder requestedSessionIdFromCookie(boolean requestedSessionIdFromCookie)
      Set the requested session id from cookie flag.
      Parameters:
      requestedSessionIdFromCookie - the requested session id from cookie flag.
      Returns:
      the builder.
    • scheme

      public EmbeddedRequestBuilder scheme(String scheme)
      Set the scheme.
      Parameters:
      scheme - the scheme.
      Returns:
      the builder.
    • servletPath

      public EmbeddedRequestBuilder servletPath(String servletPath)
      Set the servlet path.
      Parameters:
      servletPath - the servlet path.
      Returns:
      the builder.
    • webApplication

      public EmbeddedRequestBuilder webApplication(WebApplication webApp)
      Set the web application.
      Parameters:
      webApp - the web application.
      Returns:
      return the builder.