ApiRequestHandler

automorph.handler.ApiRequestHandler

RPC request handler for bound APIs.

Processes remote API requests and invoke bound API methods.

Note: Consider this class to be private and do not use it. It remains public only due to Scala 2 macro limitations.

Type parameters

Codec

message codec plugin type

Context

RPC message context type

Effect

effect type

Node

message node type

Value parameters

apiBindings

API method bindings

discovery

enable automatic provision of service discovery via RPC functions returning bound API schema

effectSystem

effect system plugin

rpcProtocol

RPC protocol plugin

Attributes

Constructor

Creates a new RPC request handler using specified effect system and RPC protocol plugins with corresponding message context type.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait RequestHandler[Effect, Context]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def discovery(discovery: Boolean): RequestHandler[Effect, Context]

Enable or disable automatic provision of service discovery via RPC functions returning bound API schema.

Enable or disable automatic provision of service discovery via RPC functions returning bound API schema.

Value parameters

discovery

service discovery enabled

Attributes

Returns

RPC request handler

Definition Classes
override def mediaType: String

Message format media (MIME) type.

Message format media (MIME) type.

Attributes

Definition Classes
override def processRequest(requestBody: Array[Byte], context: Context, id: String): Effect[Option[Result[Context]]]

Processes an RPC request by invoking a bound remote function based on the specified RPC request along with request context and return an RPC response.

Processes an RPC request by invoking a bound remote function based on the specified RPC request along with request context and return an RPC response.

Value parameters

context

request context

id

request correlation identifier included in logs associated with the request

requestBody

request message body

Attributes

Returns

request processing result

Definition Classes
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
Any

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

Bound RPC functions.

Bound RPC functions.

Attributes

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
Logging (hidden)