RequestHandler

automorph.spi.RequestHandler
See theRequestHandler companion object

RPC request handler.

Processes remote API requests and invoke bound API methods.

Type parameters

Context

RPC message context type

Effect

effect type

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ApiRequestHandler[Node, Codec, Effect, Context]

Members list

Value members

Abstract methods

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

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

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

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

Attributes

def filterCall: RpcCall[Context] => Option[Throwable]

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

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

Attributes

Message format media (MIME) type.

Message format media (MIME) type.

Attributes

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