trait BodyWriter extends AnyRef
Output pipe for writing http responses
This is, more or less, an asynchronous OutputStream
- Alphabetic
- By Inheritance
- BodyWriter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract type Finished
Type of value returned upon closing of the
BodyWriterType of value returned upon closing of the
BodyWriterThis type is used to enforce that the writer is closed when writing a HTTP response using the server.
Abstract Value Members
- abstract def close(reason: Option[Throwable]): Future[Finished]
Close the writer and flush any buffers
Close the writer and flush any buffers
If the reason is
Some, this means that the message was not completely written due to the provided error.- returns
a
Future[Finished]which will resolve once the close process has completed.
- abstract def flush(): Future[Unit]
Flush any bytes to the pipeline
Flush any bytes to the pipeline
This may be a no-op depending on the nature of theBodyWriter.
- returns
a
Future[Unit]that resolves when any buffers have been flushed.
- abstract def write(buffer: ByteBuffer): Future[Unit]
Write a message to the pipeline
Write a message to the pipeline
Write an entire message will be written to the channel. This buffer might not be written to the wire and instead buffered. Buffers can be manually flushed with the
flushmethod or by closing the BodyWriter.- buffer
ByteBufferto write to the channel- returns
a
Future[Unit]which resolves upon completion. Errors are handled through theFuture.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()