Class EmbeddedRequestBuilder


  • public class EmbeddedRequestBuilder
    extends Object
    The builder so you can easily build instances of EmbeddedRequest.
    Author:
    Manfred Riem (mriem@manorrock.com)
    See Also:
    EmbeddedRequest
    • Constructor Detail

      • EmbeddedRequestBuilder

        public EmbeddedRequestBuilder()
        Constructor.
    • Method Detail

      • 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.
      • 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.
      • 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.
      • 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.