@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface JsonRequest
A request method must have the return type CompletableFuture
with an
object parameter type or Void and have zero or one argument.
According to jsonrpc an argument must be an 'object' (a java bean, not e,g. String).
The name of the jsonrpc request will be the optional segment, followed by the
name of the Java method that is annotated with JsonRequest. The name of the
jsonrpc request can be customized by using the value()
field of this
annotation. To specify the whole name, including the segment, in the value,
set useSegment()
to false.
JsonSegment
Modifier and Type | Optional Element and Description |
---|---|
boolean |
useSegment
When using segments, useSegment will be true to prepend the segment name to
the name of the request.
|
java.lang.String |
value
The name of the the jsonrpc request method.
|
public abstract java.lang.String value
public abstract boolean useSegment
JsonSegment