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

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

effectSystem

effect system plugin

filterCall

filters RPC requests and raises arbitrary errors for non-matching requests

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 callFilter(filter: RpcCall[Context] => Option[Throwable]): RequestHandler[Effect, Context]

Register filtering function to reject RPC requests based on specified criteria.

Register filtering function to reject RPC requests based on specified criteria.

Value parameters

filter

filters RPC calls and raises arbitrary errors for non-matching requests

Attributes

Returns

RPC request handler

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

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)