forked from kroxylicious/kroxylicious
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestFrame.java
More file actions
43 lines (32 loc) · 943 Bytes
/
RequestFrame.java
File metadata and controls
43 lines (32 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Copyright Kroxylicious Authors.
*
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package io.kroxylicious.test.codec;
import java.util.concurrent.CompletableFuture;
import org.apache.kafka.common.protocol.ApiKeys;
import io.kroxylicious.test.client.SequencedResponse;
public interface RequestFrame extends Frame {
CompletableFuture<SequencedResponse> getResponseFuture();
/**
* Whether the Kafka Client expects a response to this request
* @return Whether the Kafka Client expects a response to this request
*/
default boolean hasResponse() {
return true;
}
/**
* Get apiKey of body
* @return apiKey
*/
ApiKeys apiKey();
/**
* Get apiVersion of frame
* @return apiKey
*/
short apiVersion();
default short responseApiVersion() {
return apiVersion();
}
}