forked from eclipse-vertx/vertx-http-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProxyContext.java
More file actions
53 lines (44 loc) · 995 Bytes
/
ProxyContext.java
File metadata and controls
53 lines (44 loc) · 995 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
44
45
46
47
48
49
50
51
52
53
package io.vertx.httpproxy;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.Future;
/**
* A controller for proxy interception.
*/
@VertxGen
public interface ProxyContext {
/**
* @return the proxy request
*/
ProxyRequest request();
/**
* @return the proxy response, it might be {@code null} if the response has not been sent
*/
ProxyResponse response();
/**
*
*/
Future<ProxyResponse> sendRequest();
/**
*
*/
Future<Void> sendResponse();
/**
* @return if this request or response is the handshake of WebSocket
*/
boolean isWebSocket();
/**
* Attach a payload to the context.
*
* @param name the payload name
* @param value any payload value
*/
void set(String name, Object value);
/**
* Get a payload attached to this context.
*
* @param name the payload name
* @param type the expected payload type
* @return the attached payload
*/
<T> T get(String name, Class<T> type);
}