object Handler extends HandlerPlatformSpecific

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Handler
  2. HandlerPlatformSpecific
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class ContraFlatMap[-R, +Err, -In, +Out, In1] extends AnyVal
  2. final class FromFunction[In] extends AnyVal
  3. final class FromFunctionExit[In] extends AnyVal
  4. final class FromFunctionHandler[In] extends AnyVal
  5. final class FromFunctionZIO[In] extends AnyVal
  6. sealed trait IsRequest[-A] extends AnyRef
  7. final class ParamExtractorBuilder[A] extends AnyVal
  8. implicit final class RequestHandlerSyntax[-R, +Err] extends HeaderModifier[RequestHandler[R, Err]]
  9. implicit final class ResponseOutputSyntax[-R, +Err, -In] 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. def 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( ... ) @native() @IntrinsicCandidate()
  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: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def error(status: ⇒ Error, message: ⇒ String): Handler[Any, Nothing, Any, Response]

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

  15. def error(status: ⇒ Error): Handler[Any, Nothing, Any, Response]

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

  16. def fail[Err](err: ⇒ Err): Handler[Any, Err, Any, Nothing]

    Creates a Handler that always fails

  17. def failCause[Err](cause: ⇒ Cause[Err]): Handler[Any, Err, Any, Nothing]
  18. 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]
  19. def forbidden(message: ⇒ String): Handler[Any, Nothing, Any, Response]

    Creates a handler that responds with 403 - Forbidden status code

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

    Creates a handler that responds with 403 - Forbidden status code

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

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

  23. def fromEither[Err, Out](either: ⇒ Either[Err, Out]): Handler[Any, Err, Any, Out]

    Lifts an Either into a Handler alue.

  24. def fromExit[Err, Out](exit: ⇒ Exit[Err, Out]): Handler[Any, Err, Any, Out]
  25. def fromFile[R](makeFile: ⇒ File)(implicit trace: Trace): Handler[R, Throwable, Any, Response]
  26. def fromFileZIO[R](getFile: ZIO[R, Throwable, File])(implicit trace: Trace): Handler[R, Throwable, Any, Response]
  27. def fromFunction[In]: FromFunction[In]

    Creates a Handler from a pure function

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

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

  29. def fromFunctionHandler[In]: FromFunctionHandler[In]
  30. def fromFunctionZIO[In]: FromFunctionZIO[In]

    Creates a Handler from an effectful pure function

  31. def fromResource(path: String)(implicit trace: Trace): Handler[Any, Throwable, Any, Response]
    Definition Classes
    HandlerPlatformSpecific
  32. def fromResponse(response: ⇒ Response): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the same value.

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

    Converts a ZIO to a handler type

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

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

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

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

  38. def fromZIO[R, Err, Out](zio: ⇒ ZIO[R, Err, Out]): Handler[R, Err, Any, Out]

    Converts a ZIO to a Handler type

  39. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  40. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  41. def html(view: ⇒ Html): Handler[Any, Nothing, Any, Response]

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

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

    Creates a pass thru Handler instance

  43. def internalServerError(message: ⇒ String): Handler[Any, Nothing, Any, Response]
  44. def internalServerError: Handler[Any, Nothing, Any, Response]
  45. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  46. def methodNotAllowed(message: ⇒ String): Handler[Any, Nothing, Any, Response]

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

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

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

  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. def notFound(message: ⇒ String): Handler[Any, Nothing, Any, Response]
  50. def notFound: Handler[Any, Nothing, Request, Response]

    Creates a handler that fails with a NotFound exception.

  51. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  52. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  53. def ok: Handler[Any, Nothing, Any, Response]

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

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

  55. def stackTrace(implicit trace: Trace): Handler[Any, Nothing, Any, StackTrace]
  56. def status(code: ⇒ Status): Handler[Any, Nothing, Any, Response]

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

  57. def succeed[Out](out: ⇒ Out): Handler[Any, Nothing, Any, Out]

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

  58. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  59. 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.

  60. def text(text: ⇒ CharSequence): Handler[Any, Nothing, Any, Response]

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

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

  62. def toString(): String
    Definition Classes
    AnyRef → Any
  63. def tooLarge: Handler[Any, Nothing, Any, Response]

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

  64. val unit: Handler[Any, Nothing, Any, Unit]
  65. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  67. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. final def webSocket[Env](f: (WebSocketChannel) ⇒ ZIO[Env, Throwable, Any]): WebSocketApp[Env]

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

  69. object IsRequest

Deprecated Value Members

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

Inherited from HandlerPlatformSpecific

Inherited from AnyRef

Inherited from Any

Ungrouped