Annotation Type JsonRequest
-
@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface JsonRequestAnnotation to mark a request method on an interface or class.A request method must have the return type
CompletableFuturewith 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, setuseSegment()to false.- See Also:
JsonSegment
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanuseSegmentWhen using segments, useSegment will be true to prepend the segment name to the name of the request.java.lang.StringvalueThe name of the the jsonrpc request method.
-
-
-
-
useSegment
boolean useSegment
When using segments, useSegment will be true to prepend the segment name to the name of the request.- See Also:
JsonSegment
- Default:
- true
-
-