Packages

object Handler extends HandlerPlatformSpecific with HandlerVersionSpecific

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Handler
  2. HandlerVersionSpecific
  3. HandlerPlatformSpecific
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class ContraFlatMap[-R, +Err, -In, +Out, In1] extends AnyVal
  2. final class FromFunction[In] extends AnyVal
  3. final class FromFunctionEither[In] extends AnyVal
  4. final class FromFunctionExit[In] extends AnyVal
  5. final class FromFunctionHandler[In] extends AnyVal
  6. final class FromFunctionZIO[In] extends AnyVal
  7. sealed trait IsRequest[-A] extends AnyRef
  8. final class ParamExtractorBuilder[A] extends AnyVal
  9. implicit final class RequestHandlerSyntax[-R, +Err] extends HeaderModifier[RequestHandler[R, Err]]
  10. implicit final class ResponseOutputSyntax[-R, +Err, -In] extends AnyVal
  11. final class ScopedPartiallyApplied[R] extends AnyVal

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def asChunkBounded(request: Request, limit: Int)(implicit trace: Trace): Handler[Any, Throwable, Any, Chunk[Byte]]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def attempt[Out](out: => Out): Handler[Any, Throwable, Any, Out]

    Attempts to create a Handler that succeeds with the provided value, capturing all exceptions on it's way.

  7. def badRequest(message: => String): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 400 status code.

  8. val badRequest: Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 400 status code.

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  10. def die(failure: => Throwable): Handler[Any, Nothing, Any, Nothing]

    Returns a handler that dies with the specified Throwable.

    Returns a handler that dies with the specified Throwable. This method can be used for terminating an handler because a defect has been detected in the code. Terminating a handler leads to aborting handling of an HTTP request and responding with 500 Internal Server Error.

  11. def dieMessage(message: => String): Handler[Any, Nothing, Any, Nothing]

    Returns an handler that dies with a RuntimeException having the specified text message.

    Returns an handler that dies with a RuntimeException having the specified text message. This method can be used for terminating a HTTP request because a defect has been detected in the code.

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def error(status: => Error, message: => String, routes: Routes[_, _]): Handler[Any, Nothing, Any, Response]

    Creates a handler with an error and the specified error message.

    Creates a handler with an error and the specified error message. The error message will be returned as HTML, JSON or plain text depending on the Accept header of the request, defaulting to ErrorResponseConfig.errorFormat. If ErrorResponseConfig.withErrorBody is false, the error message will not be included in the response. If the error message should always be included in the response, use Handler.fromResponse(Response.error(status, message))

  15. def error(status: => Error, message: => String): Handler[Any, Nothing, Any, Response]

    Creates a handler with an error and the specified error message.

    Creates a handler with an error and the specified error message. The error message will be returned as HTML, JSON or plain text depending on the Accept header of the request, defaulting to ErrorResponseConfig.errorFormat. If ErrorResponseConfig.withErrorBody is false, the error message will not be included in the response. If the error message should always be included in the response, use Handler.fromResponse(Response.error(status, message))

  16. def error(status: => Error): Handler[Any, Nothing, Any, Response]

    Creates a handler with an error and the default error message.

  17. def fail[Err](err: => Err): Handler[Any, Err, Any, Nothing]

    Creates a Handler that always fails

  18. def failCause[Err](cause: => Cause[Err]): Handler[Any, Err, Any, Nothing]
  19. def firstSuccessOf[R, Err, In, Out](handlers: NonEmptyChunk[Handler[R, Err, In, Out]], isRecoverable: (Cause[Err]) => Boolean = (cause: Cause[Err]) => !cause.isDie)(implicit trace: Trace): Handler[R, Err, In, Out]
  20. def forbidden(message: => String): Handler[Any, Nothing, Any, Response]

    Creates a handler that responds with 403 - Forbidden status code

  21. def forbidden: Handler[Any, Nothing, Any, Response]

    Creates a handler that responds with 403 - Forbidden status code

  22. def from[H](handler: => H)(implicit h: ToHandler[H]): Handler[Env, Err, In, Out]
  23. def fromBody(body: => Body): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds the provided data and a 200 status code

  24. def fromEither[Err, Out](either: => Either[Err, Out]): Handler[Any, Err, Any, Out]

    Lifts an Either into a Handler alue.

  25. def fromExit[Err, Out](exit: => Exit[Err, Out]): Handler[Any, Err, Any, Out]
  26. def fromFile[R](makeFile: => File, charset: Charset = Charsets.Utf8)(implicit trace: Trace): Handler[R, Throwable, Request, Response]
  27. def fromFileZIO[R](getFile: ZIO[R, Throwable, File], charset: Charset = Charsets.Utf8)(implicit trace: Trace): Handler[R, Throwable, Request, Response]
  28. def fromFunction[In]: FromFunction[In]

    Creates a Handler from a pure function

  29. def fromFunctionEither[In]: FromFunctionEither[In]

    Creates a Handler from an pure function from A to Either[E,B]

  30. def fromFunctionExit[In]: FromFunctionExit[In]

    Creates a Handler from an pure function from A to HExit[R,E,B]

  31. def fromFunctionHandler[In]: FromFunctionHandler[In]
  32. def fromFunctionZIO[In]: FromFunctionZIO[In]

    Creates a Handler from an effectful pure function

  33. def fromResource(path: String, charset: Charset = Charsets.Utf8)(implicit trace: Trace): Handler[Any, Throwable, Request, Response]

    Creates a handler from a resource path.

    Creates a handler from a resource path. For file:// resources, Range requests are fully supported. For jar:// resources, Range requests are not supported (returns Accept-Ranges: none).

    Definition Classes
    HandlerPlatformSpecific
  34. def fromResponse(response: => Response): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the same value.

  35. def fromResponseZIO[R, Err](getResponse: ZIO[R, Err, Response]): Handler[R, Err, Any, Response]

    Converts a ZIO to a handler type

  36. def fromStream[R](stream: ZStream[R, Throwable, Byte], contentLength: Long)(implicit trace: Trace): Handler[R, Throwable, Any, Response]

    Creates a Handler that always succeeds with a 200 status code and the provided ZStream with a known content length as the body

  37. def fromStream[R](stream: ZStream[R, Throwable, String], contentLength: Long, charset: Charset = Charsets.Http)(implicit trace: Trace): Handler[R, Throwable, Any, Response]

    Creates a Handler that always succeeds with a 200 status code and the provided ZStream with a known content length as the body

  38. def fromStreamChunked[R](stream: ZStream[R, Throwable, Byte])(implicit trace: Trace): Handler[R, Throwable, Any, Response]

    Creates a Handler that always succeeds with a 200 status code and the provided ZStream as the body using chunked transfer encoding

  39. def fromStreamChunked[R](stream: ZStream[R, Throwable, String], charset: Charset = Charsets.Http)(implicit trace: Trace): Handler[R, Throwable, Any, Response]

    Creates a Handler that always succeeds with a 200 status code and the provided ZStream as the body using chunked transfer encoding

  40. def fromZIO[R, Err, Out](zio: => ZIO[R, Err, Out]): Handler[R, Err, Any, Out]

    Converts a ZIO to a Handler type

  41. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  42. def getResource(path: String)(implicit trace: Trace): Handler[Any, Throwable, Any, java.net.URL]

    Attempts to retrieve files from the classpath.

    Attempts to retrieve files from the classpath.

    Definition Classes
    HandlerPlatformSpecific
  43. def getResourceAsFile(path: String)(implicit trace: Trace): Handler[Any, Throwable, Any, File]

    Attempts to retrieve files from the classpath.

    Attempts to retrieve files from the classpath.

    Definition Classes
    HandlerPlatformSpecific
  44. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  45. def html(view: => Html): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the provided Html page.

  46. def identity[A]: Handler[Any, Nothing, A, A]

    Creates a pass thru Handler instance

  47. def internalServerError(message: => String): Handler[Any, Nothing, Any, Response]
  48. def internalServerError: Handler[Any, Nothing, Any, Response]
  49. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  50. def methodNotAllowed(message: => String): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 405 status code.

  51. def methodNotAllowed: Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 405 status code.

  52. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  53. def notFound(routes: Routes[_, _]): Handler[Any, Nothing, Request, Response]
  54. def notFound(message: => String): Handler[Any, Nothing, Any, Response]
  55. val notFound: Handler[Any, Nothing, Request, Response]

    Creates a handler that fails with a NotFound exception.

  56. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  57. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  58. val ok: Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 200 status code.

  59. def param[A]: ParamExtractorBuilder[A]

    Creates a builder that can be used to create a handler that projects some component from its input.

    Creates a builder that can be used to create a handler that projects some component from its input. This is useful when created nested or monadic handlers, which require the input to all handlers be unified. By created extractors, the "smaller" handlers can extract what they need from the input to the "biggest" handler.

  60. def scoped[R]: ScopedPartiallyApplied[R]
  61. def stackTrace(implicit trace: Trace): Handler[Any, Nothing, Any, StackTrace]
  62. def status(code: => Status): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the same status code and empty data.

  63. def succeed[Out](out: => Out): Handler[Any, Nothing, Any, Out]

    Creates a Handler that always returns the same response and never fails.

  64. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  65. def template(heading: => CharSequence)(view: Html): Handler[Any, Nothing, Any, Response]

    Creates a handler which responds with an Html page using the built-in template.

  66. def text(text: => CharSequence): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the same plain text.

  67. def timeout(duration: zio.Duration)(implicit trace: Trace): Handler[Any, Nothing, Any, Response]

    Creates a handler that responds with a 408 status code after the provided time duration

  68. def toString(): String
    Definition Classes
    AnyRef → Any
  69. val tooLarge: Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 413 status code.

  70. val unit: Handler[Any, Nothing, Any, Unit]
  71. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  72. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  73. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  74. final def webSocket[Env](f: (WebSocketChannel) => ZIO[Env, Throwable, Any]): WebSocketApp[Env]

    Constructs a handler from a function that uses a web socket.

  75. object IsRequest

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from HandlerVersionSpecific

Inherited from AnyRef

Inherited from Any

Ungrouped