public interface Service
This interface implements a DSL for describing a service. It is inherently constrained in its use.
A service can describe itself by defining an interface that extends this interface, and
provides a default implementation for the descriptor()
method.
Modifier and Type | Method and Description |
---|---|
static <Request,Response> |
call(akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
Create a service call descriptor.
|
static <Request,Response> |
call(Descriptor.CallId callId,
Object methodRef)
Create a service call descriptor.
|
static <Request,Response> |
call(Method methodRef)
Create a service call descriptor.
|
Descriptor |
descriptor()
Describe this service.
|
static Descriptor |
named(String name)
Create a descriptor for a service with the given name.
|
static <Request,Response> |
namedCall(String name,
akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given name.
|
static <Request,Response> |
namedCall(String name,
Method methodRef)
Create a service call descriptor, identified by the given name.
|
static <Request,Response> |
pathCall(String pathPattern,
akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A> |
pathCall(String pathPattern,
akka.japi.function.Function<A,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H,I,J> |
pathCall(String pathPattern,
akka.japi.function.Function10<A,B,C,D,E,F,G,H,I,J,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H,I,J,K> |
pathCall(String pathPattern,
akka.japi.function.Function11<A,B,C,D,E,F,G,H,I,J,K,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B> |
pathCall(String pathPattern,
akka.japi.function.Function2<A,B,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C> |
pathCall(String pathPattern,
akka.japi.function.Function3<A,B,C,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D> |
pathCall(String pathPattern,
akka.japi.function.Function4<A,B,C,D,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D,E> |
pathCall(String pathPattern,
akka.japi.function.Function5<A,B,C,D,E,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D,E,F> |
pathCall(String pathPattern,
akka.japi.function.Function6<A,B,C,D,E,F,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D,E,F,G> |
pathCall(String pathPattern,
akka.japi.function.Function7<A,B,C,D,E,F,G,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H> |
pathCall(String pathPattern,
akka.japi.function.Function8<A,B,C,D,E,F,G,H,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H,I> |
pathCall(String pathPattern,
akka.japi.function.Function9<A,B,C,D,E,F,G,H,I,ServiceCall<Request,Response>> methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response> |
pathCall(String pathPattern,
Method methodRef)
Create a service call descriptor, identified by the given path pattern.
|
static <Request,Response> |
restCall(Method method,
String pathPattern,
akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function<A,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H,I,J> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function10<A,B,C,D,E,F,G,H,I,J,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H,I,J,K> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function11<A,B,C,D,E,F,G,H,I,J,K,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function2<A,B,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function3<A,B,C,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function4<A,B,C,D,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D,E> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function5<A,B,C,D,E,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D,E,F> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function6<A,B,C,D,E,F,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D,E,F,G> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function7<A,B,C,D,E,F,G,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function8<A,B,C,D,E,F,G,H,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response,A,B,C,D,E,F,G,H,I> |
restCall(Method method,
String pathPattern,
akka.japi.function.Function9<A,B,C,D,E,F,G,H,I,ServiceCall<Request,Response>> methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Request,Response> |
restCall(Method method,
String pathPattern,
Method methodRef)
Create a REST service call descriptor, identified by the given HTTP method and path pattern.
|
static <Message> Descriptor.TopicCall<Message> |
topic(String topicId,
akka.japi.function.Creator<Topic<Message>> methodRef)
Create a topic call descriptor, identified by the given topic id.
|
static <Message> Descriptor.TopicCall<Message> |
topic(String topicId,
Method methodRef)
Create a topic call descriptor, identified by the given topic id.
|
static <Message> Descriptor.TopicCall<Message> |
topic(String topicId,
Object methodRef)
Create a topic call descriptor, identified by the given topic id.
|
Descriptor descriptor()
The intended mechanism for implementing this is to provide it as a default implementation on an interface.
static Descriptor named(String name)
name
- The name of the service.static <Request,Response> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function<A,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function2<A,B,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function3<A,B,C,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function4<A,B,C,D,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function5<A,B,C,D,E,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function6<A,B,C,D,E,F,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function7<A,B,C,D,E,F,G,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function8<A,B,C,D,E,F,G,H,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H,I> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function9<A,B,C,D,E,F,G,H,I,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H,I,J> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function10<A,B,C,D,E,F,G,H,I,J,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H,I,J,K> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, akka.japi.function.Function11<A,B,C,D,E,F,G,H,I,J,K,ServiceCall<Request,Response>> methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response> Descriptor.Call<Request,Response> restCall(Method method, String pathPattern, Method methodRef)
method
- The HTTP method.pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function<A,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function2<A,B,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function3<A,B,C,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function4<A,B,C,D,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function5<A,B,C,D,E,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function6<A,B,C,D,E,F,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function7<A,B,C,D,E,F,G,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function8<A,B,C,D,E,F,G,H,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H,I> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function9<A,B,C,D,E,F,G,H,I,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H,I,J> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function10<A,B,C,D,E,F,G,H,I,J,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response,A,B,C,D,E,F,G,H,I,J,K> Descriptor.Call<Request,Response> pathCall(String pathPattern, akka.japi.function.Function11<A,B,C,D,E,F,G,H,I,J,K,ServiceCall<Request,Response>> methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response> Descriptor.Call<Request,Response> pathCall(String pathPattern, Method methodRef)
pathPattern
- The path pattern.methodRef
- A method reference to the service call.static <Request,Response> Descriptor.Call<Request,Response> namedCall(String name, akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
name
- The name of the service call.methodRef
- The service call.static <Request,Response> Descriptor.Call<Request,Response> namedCall(String name, Method methodRef)
name
- The name of the service call.methodRef
- The service call.static <Request,Response> Descriptor.Call<Request,Response> call(akka.japi.function.Creator<ServiceCall<Request,Response>> methodRef)
The identifier for this descriptor will be automatically selected by Lagom.
methodRef
- The service call.static <Request,Response> Descriptor.Call<Request,Response> call(Method methodRef)
The identifier for this descriptor will be automatically selected by Lagom.
methodRef
- The service call.static <Request,Response> Descriptor.Call<Request,Response> call(Descriptor.CallId callId, Object methodRef)
callId
- The service call identifier.methodRef
- The service call.static <Message> Descriptor.TopicCall<Message> topic(String topicId, Method methodRef)
topicId
- The topic identifier.methodRef
- The topic call.static <Message> Descriptor.TopicCall<Message> topic(String topicId, akka.japi.function.Creator<Topic<Message>> methodRef)
topicId
- The topic identifier.methodRef
- The topic call.static <Message> Descriptor.TopicCall<Message> topic(String topicId, Object methodRef)
topicId
- The topic identifier.methodRef
- The topic call.