Service
- Type for service that these routes represent.public abstract class GrpcRoutes<Service extends GrpcService>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static interface |
GrpcRoutes.AllGrpcRoutes
A collection of route corresponding to the enclosing
GrpcRoutes . |
protected static interface |
GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp>
A blocking gRPC route with request streaming.
|
protected static interface |
GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp>
A blocking gRPC route with response streaming.
|
protected static interface |
GrpcRoutes.BlockingRoute<Req,Resp>
A blocking gRPC route.
|
protected static interface |
GrpcRoutes.BlockingStreamingRoute<Req,Resp>
A blocking gRPC route with bi-directional streaming.
|
protected static interface |
GrpcRoutes.RequestStreamingRoute<Req,Resp>
An asynchronous gRPC route with request streaming.
|
protected static interface |
GrpcRoutes.ResponseStreamingRoute<Req,Resp>
An asynchronous gRPC route with response streaming.
|
protected static interface |
GrpcRoutes.Route<Req,Resp>
An asynchronous gRPC route.
|
protected static interface |
GrpcRoutes.StreamingRoute<Req,Resp>
An asynchronous gRPC route with bi-directional streaming.
|
Modifier | Constructor and Description |
---|---|
protected |
GrpcRoutes()
Create new instance.
|
Modifier and Type | Method and Description |
---|---|
protected <Req,Resp> void |
addBlockingRequestStreamingRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingRequestStreamingRoute to this factory. |
protected <Req,Resp> void |
addBlockingRequestStreamingRoute(java.lang.String path,
GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingRequestStreamingRoute to this factory. |
protected <Req,Resp> void |
addBlockingResponseStreamingRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingResponseStreamingRoute to this factory. |
protected <Req,Resp> void |
addBlockingResponseStreamingRoute(java.lang.String path,
GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingResponseStreamingRoute to this factory. |
protected <Req,Resp> void |
addBlockingRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.BlockingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingRoute to this factory. |
protected <Req,Resp> void |
addBlockingRoute(java.lang.String path,
GrpcRoutes.BlockingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingRoute to this factory. |
protected <Req,Resp> void |
addBlockingStreamingRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.BlockingStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingStreamingRoute to this factory. |
protected <Req,Resp> void |
addBlockingStreamingRoute(java.lang.String path,
GrpcRoutes.BlockingStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.BlockingStreamingRoute to this factory. |
protected <Req,Resp> void |
addRequestStreamingRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.RequestStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.RequestStreamingRoute to this factory. |
protected <Req,Resp> void |
addRequestStreamingRoute(java.lang.String path,
GrpcRoutes.RequestStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.RequestStreamingRoute to this factory. |
protected <Req,Resp> void |
addResponseStreamingRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.ResponseStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.ResponseStreamingRoute to this factory. |
protected <Req,Resp> void |
addResponseStreamingRoute(java.lang.String path,
GrpcRoutes.ResponseStreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.ResponseStreamingRoute to this factory. |
protected <Req,Resp> void |
addRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.Route<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.Route to this factory. |
protected <Req,Resp> void |
addRoute(java.lang.String path,
GrpcRoutes.Route<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.Route to this factory. |
protected <Req,Resp> void |
addStreamingRoute(java.lang.String path,
GrpcExecutionStrategy executionStrategy,
GrpcRoutes.StreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.StreamingRoute to this factory. |
protected <Req,Resp> void |
addStreamingRoute(java.lang.String path,
GrpcRoutes.StreamingRoute<Req,Resp> route,
java.lang.Class<Req> requestClass,
java.lang.Class<Resp> responseClass,
GrpcSerializationProvider serializationProvider)
Adds a
GrpcRoutes.StreamingRoute to this factory. |
protected abstract Service |
newServiceFromRoutes(GrpcRoutes.AllGrpcRoutes routes)
Create a new
Service from the passed GrpcRoutes.AllGrpcRoutes . |
protected abstract void |
registerRoutes(Service service)
Register all routes contained in the passed
Service . |
protected abstract void registerRoutes(Service service)
Service
.service
- Service
for which routes have to be registered.protected abstract Service newServiceFromRoutes(GrpcRoutes.AllGrpcRoutes routes)
Service
from the passed GrpcRoutes.AllGrpcRoutes
.routes
- GrpcRoutes.AllGrpcRoutes
for which a Service
has to be created.Service
containing all the passed routes.protected final <Req,Resp> void addRoute(java.lang.String path, GrpcRoutes.Route<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.Route
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.Route
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.Route<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.Route
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.Route
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addStreamingRoute(java.lang.String path, GrpcRoutes.StreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.StreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.StreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addStreamingRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.StreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.StreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.StreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addRequestStreamingRoute(java.lang.String path, GrpcRoutes.RequestStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.RequestStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.RequestStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addRequestStreamingRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.RequestStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.RequestStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.RequestStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addResponseStreamingRoute(java.lang.String path, GrpcRoutes.ResponseStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.ResponseStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.ResponseStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addResponseStreamingRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.ResponseStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.ResponseStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.ResponseStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingRoute(java.lang.String path, GrpcRoutes.BlockingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.BlockingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.BlockingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.BlockingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingStreamingRoute(java.lang.String path, GrpcRoutes.BlockingStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.BlockingStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingStreamingRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.BlockingStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.BlockingStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingRequestStreamingRoute(java.lang.String path, GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingRequestStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.BlockingRequestStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingRequestStreamingRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.BlockingRequestStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingRequestStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.BlockingRequestStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingResponseStreamingRoute(java.lang.String path, GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingResponseStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.route
- GrpcRoutes.BlockingResponseStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.protected final <Req,Resp> void addBlockingResponseStreamingRoute(java.lang.String path, GrpcExecutionStrategy executionStrategy, GrpcRoutes.BlockingResponseStreamingRoute<Req,Resp> route, java.lang.Class<Req> requestClass, java.lang.Class<Resp> responseClass, GrpcSerializationProvider serializationProvider)
GrpcRoutes.BlockingResponseStreamingRoute
to this factory.Req
- Type of request.Resp
- Type of response.path
- for this route.executionStrategy
- GrpcExecutionStrategy
to use.route
- GrpcRoutes.BlockingResponseStreamingRoute
to add.requestClass
- Class
for the request object.responseClass
- Class
for the response object.serializationProvider
- GrpcSerializationProvider
for the route.