PlayRouter

play.grpc.internal.PlayRouter
@InternalApi
abstract class PlayRouter(val serviceName: String) 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

Concrete methods

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
final override def routes: Routes

The actual routes of the router.

The actual routes of the router.

Attributes

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

Abstract fields

protected val respond: HttpRequest => Future[HttpResponse]

INTERNAL API

INTERNAL API

To be provided by (generated) concrete routers, only called internally

Attributes

Concrete fields

val serviceName: String