@Experimental public final class Invocation extends Object
MethodInterceptors. Exposes the resolved
RequestTemplate (mutable until the request is sent), the contract's MethodMetadata, the raw method arguments, and — after the chain has executed the HTTP call — the
resulting Response.| Constructor and Description |
|---|
Invocation(Target<?> target,
MethodMetadata methodMetadata,
RequestTemplate requestTemplate,
Object[] arguments) |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
arguments()
Raw arguments passed to the proxied method.
|
Object |
body()
Returns the typed argument that will be serialized as the request body, or
null if the
method has no body parameter or it was passed as null. |
Method |
method()
Convenience accessor for the underlying reflective
Method. |
MethodMetadata |
methodMetadata() |
RequestTemplate |
requestTemplate()
The mutable, contract-resolved request template.
|
Response |
response()
The HTTP
Response captured after the framework's terminal chain step. |
void |
response(Response response)
Framework-internal setter populated by the terminal chain step after the HTTP client returns.
|
Target<?> |
target() |
public Invocation(Target<?> target, MethodMetadata methodMetadata, RequestTemplate requestTemplate, Object[] arguments)
public Target<?> target()
public MethodMetadata methodMetadata()
public RequestTemplate requestTemplate()
public Object[] arguments()
null for no-arg methods.public Object body()
null if the
method has no body parameter or it was passed as null.public Response response()
Response captured after the framework's terminal chain step. Returns null when the chain has not yet executed the HTTP call, or when the call failed before a
response was received.@Experimental public void response(Response response)
Copyright © 2012–2026 OpenFeign. All rights reserved.