Package com.io7m.idstore.server.service.reqlimit

# Class IdRequestLimits

java.lang.Object
com.io7m.idstore.server.service.reqlimit.IdRequestLimits

All Implemented Interfaces:
  `com.io7m.repetoir.core.RPServiceType`

public final class IdRequestLimits extends Object implements com.io7m.repetoir.core.RPServiceType
Methods to handle request size limits.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdRequestLimits(Function<Long,String> inRequestTooLargeMessage)`
  Methods to handle request size limits.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `InputStream`
  `boundedMaximumInput(io.helidon.webserver.http.ServerRequest request, long maximum)`
  Bound the given servlet request to the given maximum size, raising an exception if the incoming Content-Length is larger than this size.
  `String`
  `description()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### IdRequestLimits

    public IdRequestLimits(Function<Long,String> inRequestTooLargeMessage)
    Methods to handle request size limits.
    Parameters:
      `inRequestTooLargeMessage` - A function that formats a message

- ## Method Details

  - ### boundedMaximumInput

    public InputStream boundedMaximumInput(io.helidon.webserver.http.ServerRequest request, long maximum) throws IdRequestLimitExceeded
    Bound the given servlet request to the given maximum size, raising an exception if the incoming Content-Length is larger than this size.
    Parameters:
      `request` - The request
      `maximum` - The maximum size
    Returns:
      A bounded input stream
    Throws:
      `IdRequestLimitExceeded` - On errors

  - ### description

    public String description()
    Specified by:
      `description` in interface `com.io7m.repetoir.core.RPServiceType`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`