public class AnnotationBasedHttpClientListener extends FileWritingHttpClientListener
HttpClientListener implementation printing the content of the
CodeQuality annotation located
somewhere on the StackTrace.
This feature is introduced to allow the SDK Pipeline to check for certain code qualities at test runtime.
This is not intended for productive usage, but only for tests!
Note: This listener (as all
HttpClientListener implementations) are only automatically called when
HTTP calls are done via the
HttpClient provided by the
The resulting report line will look something like this:
http://0.0.0.0/myEndpoint,"package.to.ResilientClass(RESILIENCE),other.package.to.OtherResilientClass(Some Quality,Another Quality)"So it will have the URI of the called endpoint in the first column and all classes annotated with
currently on the StackTrace, together with the values of the annotation.
|Constructor and Description
Creates a new listener, writing the report into a file at the given path.
|Modifier and Type
|Method and Description
Returns the value that should be printed in the second column of the report file.
reportPath - The path the report should be written to.
The content of this second column is highly sub-class specific, so look there for more details.
Copyright © 2021 SAP SE. All rights reserved.