Class NanoRequestBuilder

java.lang.Object
cloud.piranha.nano.NanoRequestBuilder

public class NanoRequestBuilder
extends java.lang.Object
The builder so you can easily build instances of NanoRequest.
Author:
Manfred Riem (mriem@manorrock.com)
See Also:
NanoRequest
  • Field Summary

    Fields
    Modifier and Type Field Description
    private NanoRequest request
    Stores the request.
  • Constructor Summary

    Constructors
    Constructor Description
    NanoRequestBuilder()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    NanoRequest build()
    Build the request.
    NanoRequestBuilder header​(java.lang.String name, java.lang.String value)
    Add a header.
    NanoRequestBuilder method​(java.lang.String method)
    Set the method.
    NanoRequestBuilder queryString​(java.lang.String queryString)
    Set the query string.
    NanoRequestBuilder servletPath​(java.lang.String servletPath)
    Set the servlet path.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • request

      private final NanoRequest request
      Stores the request.
  • Constructor Details

    • NanoRequestBuilder

      public NanoRequestBuilder()
      Constructor.
  • Method Details

    • build

      public NanoRequest build()
      Build the request.
      Returns:
      the request.
    • header

      public NanoRequestBuilder header​(java.lang.String name, java.lang.String value)
      Add a header.
      Parameters:
      name - the name.
      value - the value.
      Returns:
      the builder.
    • method

      public NanoRequestBuilder method​(java.lang.String method)
      Set the method.
      Parameters:
      method - the method.
      Returns:
      the builder.
    • queryString

      public NanoRequestBuilder queryString​(java.lang.String queryString)
      Set the query string.
      Parameters:
      queryString - the query string.
      Returns:
      the builder.
    • servletPath

      public NanoRequestBuilder servletPath​(java.lang.String servletPath)
      Set the servlet path.
      Parameters:
      servletPath - the servlet path.
      Returns:
      the builder.