io.github.finagle

Serial

Related Doc: package finagle

trait Serial extends AnyRef

A trait that supports the creation of server and clients.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Serial
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Bytes

    The codec's native byte buffer (or array) representation.

  2. abstract type C[_]

    Represents a codec for a given type.

  3. case class Client[Req, Rep](reqCodec: C[Req], repCodec: C[Rep], muxer: StackClient[Request, Response] = ...) extends com.twitter.finagle.Client[Req, Rep] with Parameterized[Client[Req, Rep]] with Product with Serializable

  4. case class Server[Req, Rep](reqCodec: C[Req], repCodec: C[Rep], muxer: StackServer[Request, Response] = ...) extends com.twitter.finagle.Server[Req, Rep] with Parameterized[Server[Req, Rep]] with Product with Serializable

Abstract Value Members

  1. abstract def decodeRep[A](bytes: Bytes)(c: C[A]): Try[A]

    Decode a result.

    Decode a result.

    An implementation should deserialize the errors returned its io.github.finagle.Serial#encodeRep.

  2. abstract def decodeReq[A](bytes: Bytes)(c: C[A]): Try[A]

    Decode a request.

    Decode a request.

    An implementation should decode io.github.finagle.serial.CodecError and return instances as an error.

  3. abstract def encodeRep[A](t: Try[A])(c: C[A]): Try[Bytes]

    Encode a result.

    Encode a result.

    An implementation should fail with io.github.finagle.serial.CodecError in the event of a encoding error.

  4. abstract def encodeReq[A](a: A)(c: C[A]): Try[Bytes]

    Encode a request.

    Encode a request.

    A "well-behaved" implementation should only fail with instances of io.github.finagle.serial.CodecError; all other errors will result in an com.twitter.finagle.mux.ServerApplicationError being returned.

  5. abstract def fromBuf(buf: Buf): Bytes

    Convert a com.twitter.io.Buf to this implementation's byte buffer representation.

  6. abstract def toBuf(bytes: Bytes): Buf

    Convert the implementation's representation of a byte buffer to a com.twitter.io.Buf.

Concrete 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 apply[Req, Rep](implicit reqCodec: C[Req], repCodec: C[Rep]): com.twitter.finagle.Client[Req, Rep] with com.twitter.finagle.Server[Req, Rep]

    Returns an instance of com.twitter.finagle.Client with com.twitter.finagle.Server of concrete serial protocol from Req to Rep.

    Returns an instance of com.twitter.finagle.Client with com.twitter.finagle.Server of concrete serial protocol from Req to Rep.

    val server = Serial[Foo, Bar].serve(...)
    val client = Serial[Foo, Bar].newService(...)
    Req

    the request type

    Rep

    the response type

    reqCodec

    the request codec

    repCodec

    the response codec

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def client[Req, Rep](implicit reqCodec: C[Req], repCodec: C[Rep]): com.twitter.finagle.Client[Req, Rep]

    Create a com.twitter.finagle.Client given request and response codecs.

  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. def serveFunction[Req, Rep](addr: SocketAddress)(f: (Req) ⇒ Rep)(implicit reqCodec: C[Req], repCodec: C[Rep]): ListeningServer

    A convenience method that creates a server from a function.

  18. def server[Req, Rep](implicit reqCodec: C[Req], repCodec: C[Rep]): com.twitter.finagle.Server[Req, Rep]

    Create a com.twitter.finagle.Server given request and response codecs.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped