FinagleHttpEndpoint

automorph.transport.http.endpoint.FinagleHttpEndpoint
See theFinagleHttpEndpoint companion object
final case class FinagleHttpEndpoint[Effect[_]](effectSystem: EffectSystem[Effect], mapException: Throwable => Int, handler: RequestHandler[Effect, Context]) extends Service[Request, Response], EndpointTransport[Effect, Context, Service[Request, Response]]

Finagle HTTP endpoint message transport plugin.

Interprets HTTP request body as a RPC request and processes it with the specified RPC handler.

  • The response returned by the RPC handler is used as HTTP response body.

Type parameters

Effect

effect type

Value parameters

effectSystem

effect system plugin

handler

RPC request handler

mapException

maps an exception to a corresponding HTTP status code

Attributes

Constructor

Creates an Finagle HTTP endpoint message transport plugin with specified effect system and request handler.

See also
Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Closable
trait Request => Future[Response]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def adapter: Service[Request, Response]

Transport layer adapter.

Transport layer adapter.

Attributes

Definition Classes
override def apply(request: Request): Future[Response]

Attributes

Definition Classes
override def withHandler(handler: RequestHandler[Effect, Context]): FinagleHttpEndpoint[Effect]

Create a copy of this endpoint transport with specified RPC request handler.

Create a copy of this endpoint transport with specified RPC request handler.

Value parameters

handler

RPC request handler

Attributes

Returns

server transport

Definition Classes

Inherited methods

def andThen[A](g: (Future[Response]) => A): Request => A

Attributes

Inherited from:
Function1

Attributes

Inherited from:
Service

Attributes

Inherited from:
Closable
final def close(): Future[Unit]

Attributes

Inherited from:
Closable
def compose[A](g: A => Request): A => Future[Response]

Attributes

Inherited from:
Function1
final def isAvailable: Boolean

Attributes

Inherited from:
Service
def map[Req1](f: Req1 => Request): Service[Req1, Response]

Attributes

Inherited from:
Service

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def status: Status

Attributes

Inherited from:
Service
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Service -> Function1 -> Any
Inherited from:
Service

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
Logging (hidden)