io.vertx.codegen.annotations.CacheReturn Java Examples

The following examples show how to use io.vertx.codegen.annotations.CacheReturn. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpResponse.java    From vertx-web with Apache License 2.0 5 votes vote down vote up
/**
 * @return the response body decoded as a {@code String}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
 */
@CacheReturn
@Nullable
default String bodyAsString() {
  Buffer b = bodyAsBuffer();
  return b != null ? BodyCodecImpl.UTF8_DECODER.apply(b) : null;
}
 
Example #2
Source File: HttpResponse.java    From vertx-web with Apache License 2.0 5 votes vote down vote up
/**
 * @return the response body decoded as {@link JsonObject}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
 */
@CacheReturn
@Nullable
default JsonObject bodyAsJsonObject() {
  Buffer b = bodyAsBuffer();
  return b != null ? BodyCodecImpl.JSON_OBJECT_DECODER.apply(b) : null;
}
 
Example #3
Source File: HttpResponse.java    From vertx-web with Apache License 2.0 4 votes vote down vote up
/**
 * @return the response body decoded as a {@link JsonArray}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
 */
@CacheReturn
@Nullable
JsonArray bodyAsJsonArray();
 
Example #4
Source File: ExtendsWithSameSimpleName.java    From vertx-rx with Apache License 2.0 4 votes vote down vote up
@CacheReturn
UseVertxGenNameDeclarationsWithSameSimpleName foo(UseVertxGenNameDeclarationsWithSameSimpleName arg);
 
Example #5
Source File: InterfaceWithCacheReturnMethods.java    From vertx-codegen with Apache License 2.0 4 votes vote down vote up
@CacheReturn
VertxGenClass1 bar(int i);
 
Example #6
Source File: HttpResponse.java    From vertx-web with Apache License 2.0 4 votes vote down vote up
/**
 * @return the response body in the format it was decoded.
 */
@CacheReturn
@Nullable
T body();
 
Example #7
Source File: HttpResponse.java    From vertx-web with Apache License 2.0 4 votes vote down vote up
/**
 * @return the response body decoded as a {@link Buffer}, or {@code null} if a codec other than {@link BodyCodec#buffer()} was used
 */
@CacheReturn
@Nullable
Buffer bodyAsBuffer();
 
Example #8
Source File: InterfaceWithCacheReturnMethods.java    From vertx-codegen with Apache License 2.0 4 votes vote down vote up
@CacheReturn
String foo(String str);
 
Example #9
Source File: TestInterface.java    From vertx-codegen with Apache License 2.0 4 votes vote down vote up
@CacheReturn
RefedInterface1 methodWithCachedReturn(String foo);
 
Example #10
Source File: CacheReturnMethodWithVoidReturn.java    From vertx-codegen with Apache License 2.0 4 votes vote down vote up
@CacheReturn
void foo(String str);
 
Example #11
Source File: TestInterface.java    From vertx-codegen with Apache License 2.0 4 votes vote down vote up
@CacheReturn
int methodWithCachedReturnPrimitive(int arg);
 
Example #12
Source File: RabbitMQMessage.java    From vertx-rabbitmq-client with Apache License 2.0 4 votes vote down vote up
/**
 * @return packaging data for the message
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
@CacheReturn
Envelope envelope();
 
Example #13
Source File: TestInterface.java    From vertx-codegen with Apache License 2.0 4 votes vote down vote up
@CacheReturn
List<RefedInterface1> methodWithCachedListReturn();
 
Example #14
Source File: FormDataPart.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * @return the filename when this part is a file upload otherwise {@code null}
 */
@CacheReturn
String filename();
 
Example #15
Source File: FormDataPart.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * @return {@code true} when this part is a file upload
 */
@CacheReturn
boolean isFileUpload();
 
Example #16
Source File: RequestParameters.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * This method converts RequestParameters in an unique JsonObject with 6 fields: cookie, path, query, header, form, body<br/>
 *
 * cookie, path, query, header, form are JsonObject where keys are param names and values are param values, while body depends on body's shape and may not exist
 *
 * @return
 */
@CacheReturn JsonObject toJson();
 
Example #17
Source File: RequestParameters.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * This method converts RequestParameters in an unique JsonObject with 6 fields: cookie, path, query, header, form, body<br/>
 *
 * cookie, path, query, header, form are JsonObject where keys are param names and values are param values, while body depends on body's shape and may not exist
 *
 * @return
 */
@CacheReturn JsonObject toJson();
 
Example #18
Source File: FormDataPart.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * @return the name
 */
@CacheReturn
String name();
 
Example #19
Source File: RequestParameter.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * @return the internal value. The internal value is always a valid Vert.x JSON type
 */
@CacheReturn Object get();
 
Example #20
Source File: FormDataPart.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * @return {@code true} when this part is an attribute
 */
@CacheReturn
boolean isAttribute();
 
Example #21
Source File: HttpResponse.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * @return the headers
 */
@CacheReturn
MultiMap headers();
 
Example #22
Source File: Failure.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * @return the error message
 */
@CacheReturn
String message();
 
Example #23
Source File: Failure.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * @return true if the failure is an error failure otherwise it is an assertion failure
 */
@CacheReturn
boolean isError();
 
Example #24
Source File: FormDataPart.java    From vertx-web with Apache License 2.0 2 votes vote down vote up
/**
 * @return the media type when this part is a file upload otherwise {@code null}
 */
@CacheReturn
String mediaType();
 
Example #25
Source File: TestResult.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * Did it fail?
 */
@CacheReturn
boolean failed();
 
Example #26
Source File: TestResult.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * Did it succeed?
 */
@CacheReturn
boolean succeeded();
 
Example #27
Source File: TestResult.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * How long the test lasted in millis.
 */
@CacheReturn
long durationTime();
 
Example #28
Source File: TestResult.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * The time at which the test began in millis.
 */
@CacheReturn
long beginTime();
 
Example #29
Source File: TestResult.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * The test description, may be null if none was provided.
 */
@CacheReturn
String name();
 
Example #30
Source File: TestSuiteReport.java    From vertx-unit with Apache License 2.0 2 votes vote down vote up
/**
 * @return the test suite name
 */
@CacheReturn
String name();