sealed trait Middleware[-R, I, O] extends AnyRef
A Middleware
represents the implementation of a MiddlewareSpec
,
intercepting parts of the request, and appending to the response.
- Self Type
- Middleware[R, I, O]
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Middleware
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- abstract type State
Abstract Value Members
- abstract def incoming(in: I): ZIO[R, Nothing, Control[State]]
Processes an incoming request, whose relevant parts are encoded into
I
, the middleware input, and then returns an effect that will produce both middleware-specific state (which will be passed to the outgoing handler), together with a decision about whether to continue or abort the handling of the request. - abstract def outgoing(state: State, response: Response): ZIO[R, Nothing, O]
Processes an outgoing response together with the middleware state (produced by the incoming handler), returning an effect that will produce
O
, which will in turn be used to patch the response. - abstract def spec: MiddlewareSpec[I, O]
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++[R1 <: R, I2, O2](that: Middleware[R1, I2, O2])(implicit inCombiner: Combiner[I, I2], outCombiner: Combiner[O, O2]): Middleware[R1, Out, Out]
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[R1 <: R, E](httpRoute: HttpApp[R1, E]): HttpApp[R1, E]
Applies the middleware to an
HttpApp
, returning a newHttpApp
with the middleware fully installed. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])