Class RequestData
java.lang.Object
ru.vyarus.dropwizard.guice.test.client.builder.track.RequestData
Recorder request configuration data. Each applied value is recorded with an application source (line).
All values tracked with the recorded configuration source (source line, called method), that's why all values are
wrapped with SourceAwareValue.
- Since:
- 04.10.2025
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classExtension info.static classPath parameter. -
Constructor Summary
ConstructorsConstructorDescriptionRequestData(@Nullable Runnable preRequestAction) Create a request data object. -
Method Summary
Modifier and TypeMethodDescriptionvoidExpected response typeWebTarget.request(String...),Invocation.Builder.accept(String...).voidcacheControl(jakarta.ws.rs.core.CacheControl value) Register cache controlInvocation.Builder.cacheControl(jakarta.ws.rs.core.CacheControl).voidcookie(jakarta.ws.rs.core.Cookie value) Register cookieInvocation.Builder.cookie(String, String).voidRegister required encodingInvocation.Builder.acceptEncoding(String...).@Nullable SourceAwareValue<String[]>@Nullable SourceAwareValue<jakarta.ws.rs.core.CacheControl>getCache()Map<String,SourceAwareValue<jakarta.ws.rs.core.Cookie>> @Nullable SourceAwareValue<String[]>@Nullable SourceAwareValue<jakarta.ws.rs.client.Entity<?>>@Nullable SourceAwareValue<String[]>getLog()@Nullable SourceAwareValue<String>getPaths()@Nullable SourceAwareValue<jakarta.ws.rs.core.GenericType<?>>Covers bothClassandGenericTypeoptions (in case of class, use generic type constructor).@Nullable StringgetUrl()voidRegister headerInvocation.Builder.header(String, Object).voidRecord multiple headersInvocation.Builder.headers(jakarta.ws.rs.core.MultivaluedMap).voidRegister required languageInvocation.Builder.acceptLanguage(String...).voidmatrixParam(String name, Object... value) Record matric paramWebTarget.matrixParam(String, Object...).voidRecord http methodSyncInvoker.method(String)and shortcuts likeSyncInvoker.get().voidmethod(String method, @Nullable jakarta.ws.rs.client.Entity<?> entity, @Nullable jakarta.ws.rs.core.GenericType<?> responseType) Record http methodSyncInvoker.method(String)and shortcuts likeSyncInvoker.get(jakarta.ws.rs.core.GenericType).voidmethod(String method, @Nullable jakarta.ws.rs.client.Entity<?> entity, @Nullable Class<?> responseType) Record http methodSyncInvoker.method(String)and shortcuts likeSyncInvoker.get(Class).voidRecord path configurationWebTarget.path(String).voidRecord propertyConfigurable.property(String, Object),Invocation.Builder.property(String, Object).voidqueryParam(String name, Object... value) Record query paramWebTarget.queryParam(String, Object...).voidRecord extension (by class or instance)Configurable.register(Class).voidRecord extension (by class or instance)Configurable.register(Object, java.util.Map).voidresolveTemplate(String name, Object value, boolean encodeSlashInPath, boolean encoded) Record path paramWebTarget.resolveTemplate(String, Object)(and all other variations).voidresolveTemplates(Map<String, Object> value, boolean encodeSlashInPath, boolean encoded) Record multiple path paramsWebTarget.resolveTemplates(java.util.Map)(and all other variations).voidRecord target url.
-
Constructor Details
-
RequestData
Create a request data object.- Parameters:
preRequestAction- action to be performed before request execution (e.g. logging)
-
-
Method Details
-
path
Record path configurationWebTarget.path(String).- Parameters:
path- provided path
-
resolveTemplate
Record path paramWebTarget.resolveTemplate(String, Object)(and all other variations).- Parameters:
name- param namevalue- param valueencodeSlashInPath- true if slash encoding requiredencoded- true if value already encoded
-
resolveTemplates
Record multiple path paramsWebTarget.resolveTemplates(java.util.Map)(and all other variations).- Parameters:
value- path parametersencodeSlashInPath- true if slash encoding requiredencoded- true if values already encoded
-
matrixParam
Record matric paramWebTarget.matrixParam(String, Object...).- Parameters:
name- param namevalue- param values
-
queryParam
Record query paramWebTarget.queryParam(String, Object...).- Parameters:
name- param namevalue- param values
-
accept
Expected response typeWebTarget.request(String...),Invocation.Builder.accept(String...).- Parameters:
value- response types
-
property
Record propertyConfigurable.property(String, Object),Invocation.Builder.property(String, Object).- Parameters:
name- property namevalue- property value
-
register
Record extension (by class or instance)Configurable.register(Class).- Parameters:
value- extension class or instancepriority- prioritycontracts- constracts
-
register
Record extension (by class or instance)Configurable.register(Object, java.util.Map).- Parameters:
value- extension class or instancecontracts- contracts with priority
-
method
Record http methodSyncInvoker.method(String)and shortcuts likeSyncInvoker.get().- Parameters:
method- http methodentity- entity
-
method
public void method(String method, @Nullable jakarta.ws.rs.client.Entity<?> entity, @Nullable Class<?> responseType) Record http methodSyncInvoker.method(String)and shortcuts likeSyncInvoker.get(Class).- Parameters:
method- http methodentity- entityresponseType- requested response mapping
-
method
public void method(String method, @Nullable jakarta.ws.rs.client.Entity<?> entity, @Nullable jakarta.ws.rs.core.GenericType<?> responseType) Record http methodSyncInvoker.method(String)and shortcuts likeSyncInvoker.get(jakarta.ws.rs.core.GenericType).- Parameters:
method- http methodentity- entityresponseType- requested response mapping
-
language
Register required languageInvocation.Builder.acceptLanguage(String...).- Parameters:
value- required languages
-
encoding
Register required encodingInvocation.Builder.acceptEncoding(String...).- Parameters:
value- required encodings
-
cookie
public void cookie(jakarta.ws.rs.core.Cookie value) Register cookieInvocation.Builder.cookie(String, String).- Parameters:
value- cookie
-
cacheControl
public void cacheControl(jakarta.ws.rs.core.CacheControl value) Register cache controlInvocation.Builder.cacheControl(jakarta.ws.rs.core.CacheControl).- Parameters:
value- cache control
-
header
Register headerInvocation.Builder.header(String, Object).- Parameters:
name- header namevalue- header value
-
headers
Record multiple headersInvocation.Builder.headers(jakarta.ws.rs.core.MultivaluedMap).- Parameters:
value- headers
-
url
Record target url. Called afterWebTarget.request().- Parameters:
url- url
-
getQueryParams
- Returns:
- query params
-
getMatrixParams
- Returns:
- matric params
-
getPathParams
- Returns:
- path params
-
getHeaders
- Returns:
- headers
-
getCookies
- Returns:
- cookies
-
getProperties
- Returns:
- properties
-
getExtensions
- Returns:
- extensions
-
getPaths
- Returns:
- paths
-
getAcceptHeader
- Returns:
- accept header values
-
getLanguageHeader
- Returns:
- accept language header values
-
getEncodingHeader
- Returns:
- accept encoding header values
-
getCache
- Returns:
- cache control header value
-
getMethod
- Returns:
- called http method
-
getEntity
- Returns:
- used entity
-
getResultMapping
Covers bothClassandGenericTypeoptions (in case of class, use generic type constructor).- Returns:
- result mapping (if specified)
-
getUrl
- Returns:
- target url
-
getLog
- Returns:
- modifications log
-