PlayRouterUsingActions

play.grpc.internal.PlayRouterUsingActions
@InternalApi
abstract class PlayRouterUsingActions(system: ActorSystem, serviceName: String, parsers: PlayBodyParsers, actionBuilder: ActionBuilder[Request, AnyContent]) extends Router

Boiler plate needed for the generated Play routers allowing for adding a service implementation in a Play app, inherited by the generated abstract service router (both Java and Scala) which is then implemented by the user.

INTERNAL API

Attributes

Graph
Supertypes
trait Router
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

@InternalApi
protected def createHandler(serviceName: String, system: ActorSystem): RequestHeader => EssentialAction

INTERNAL API

INTERNAL API

Attributes

Concrete methods

def createStreamingAction(handler: HttpRequest => Future[HttpResponse])(implicit ec: ExecutionContext): EssentialAction
def createUnaryAction(handler: HttpRequest => Future[HttpResponse])(implicit ec: ExecutionContext): EssentialAction
final override def documentation: Seq[(String, String, String)]

Documentation for the router.

Documentation for the router.

Attributes

Returns

A list of method, path pattern and controller/method invocations for each route.

Definition Classes
Router
def pekkoToPlayHeaders(headers: Seq[HttpHeader]): Headers
def pekkoToPlayResp(pekkoResp: HttpResponse): Result
def pekkoToPlayResponseHeaders(resp: HttpResponse): ResponseHeader
def playToPekkoHeaders(req: Request[_]): Seq[HttpHeader]
def playToPekkoRequest(request: Request[ByteString]): HttpRequest
def playToPekkoRequestStream(request: Request[Source[ByteString, _]]): HttpRequest
final override def routes: Routes

The actual routes of the router.

The actual routes of the router.

Attributes

Definition Classes
Router
def streamBodyParser(implicit ec: ExecutionContext): BodyParser[Source[ByteString, _]]
final override def withPrefix(prefix: String): Router

Registering a gRPC service under a custom prefix is not widely supported and strongly discouraged by the specification so therefore not supported.

Registering a gRPC service under a custom prefix is not widely supported and strongly discouraged by the specification so therefore not supported.

Attributes

Definition Classes
Router

Inherited methods

final def /:(prefix: String): Router

An alternative syntax for withPrefix. For example:

An alternative syntax for withPrefix. For example:

 val router = "/bar" /: barRouter

Attributes

Inherited from:
Router
def asJava: Router

Attributes

Inherited from:
Router
final def handlerFor(request: RequestHeader): Option[Handler]

A lifted version of the routes partial function.

A lifted version of the routes partial function.

Attributes

Inherited from:
Router
final def orElse(other: Router): Router

Compose two routers into one. The resulting router will contain both the routes in this as well as router

Compose two routers into one. The resulting router will contain both the routes in this as well as router

Attributes

Inherited from:
Router