Environment
.Request
based on this, but with no header information.Closer
which can be used to register resources that need to be closed on
application shutdown.Serializer.Payload
from ByteString without contentTypeSerializer.Payload
from ByteString with the
specified contentTypeSerializer.Payload
from ByteString with an
optional contentTypeAsyncHandler
that will map the return value of
invoke(RequestContext)
through the given map function.SyncHandler
that will map the return value of
SyncHandler.invoke(RequestContext)
through the given map function.flatMap(Function)
.Response
with the given payload of type T
.Response
with the given status code.Request
for the given uri and method.Request
for the given uri.AsyncHandler
that will map the return value of
invoke(RequestContext)
through the given map function.SyncHandler
that will map the return value of
SyncHandler.invoke(RequestContext)
through the given map function.Route.with(Middleware, String, String, Object)
.Response
with the given status code and a payload with type T
.Response
.Middleware
, see Serializer
.Route
.RouteProvider
.Route
.Route
s in an Apollo service.Environment.RoutingEngine
of this application.Serializer.Payload
from the incoming request Request
and the endpoint returned object.Middleware
that converts the response object into a Response
.
The reasons for preferring a Middleware are:
- This interface is not typesafe, whereas Middlewares can be. This means the compiler can help
you spot mistakes. Simply define your Middleware as a function from something like AsyncHandler<MyDomainObject>
to AsyncHandler<Response<ByteString>>
.
- Middlewares are more powerful; they can directly set headers and can also modify other things
on the Response, such as status codes and reason phrases.Serializer.Payload
based on the content of this instance
but with the given contentType if no contentType is present already.Request
based on this, but with an additional header.Response
based on this, but with an additional header.Request
based on this, but with additional headers.Response
based on this, but with additional headers.Request
based on this, but with a different payload.Response
based on this, but with a different payload.Request
based on this, but with a different calling service.Request
based on this, but with a different ttl.Request
based on this, but with a different URI.Copyright © 2016. All rights reserved.