Class BaseProtocolWrapper
- java.lang.Object
-
- dev.jora.quicloadgenerator.scenarios.protocol.BaseProtocolWrapper
-
- All Implemented Interfaces:
java.util.concurrent.Callable<CommonResponse>
- Direct Known Subclasses:
HttpWrapper,QuicWrapper
public abstract class BaseProtocolWrapper extends java.lang.Object implements java.util.concurrent.Callable<CommonResponse>
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseScenarioscenario
-
Constructor Summary
Constructors Constructor Description BaseProtocolWrapper(BaseScenario scenario)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.net.http.HttpClientbuildHttpClient()CommonResponsecall()protected java.net.http.HttpResponse<java.lang.String>makeRequest(java.net.http.HttpClient client, java.net.http.HttpRequest request)protected voidonAfterRequest(java.net.http.HttpClient httpClient)CommonResponserunRequest()
-
-
-
Field Detail
-
scenario
protected final BaseScenario scenario
-
-
Constructor Detail
-
BaseProtocolWrapper
public BaseProtocolWrapper(BaseScenario scenario)
-
-
Method Detail
-
buildHttpClient
protected abstract java.net.http.HttpClient buildHttpClient()
-
makeRequest
protected java.net.http.HttpResponse<java.lang.String> makeRequest(java.net.http.HttpClient client, java.net.http.HttpRequest request) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
onAfterRequest
protected void onAfterRequest(java.net.http.HttpClient httpClient)
-
call
public CommonResponse call()
- Specified by:
callin interfacejava.util.concurrent.Callable<CommonResponse>
-
runRequest
public CommonResponse runRequest() throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
-