1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.esigate;
17
18 import java.util.Properties;
19
20 import org.apache.http.client.methods.CloseableHttpResponse;
21 import org.esigate.events.EventManager;
22 import org.esigate.http.ContentTypeHelper;
23 import org.esigate.http.OutgoingRequest;
24 import org.esigate.impl.DriverRequest;
25
26 public interface RequestExecutor {
27
28 OutgoingRequest createOutgoingRequest(DriverRequest request, String url, boolean b);
29
30 CloseableHttpResponse execute(OutgoingRequest outgoingRequest) throws HttpErrorPage;
31
32 interface RequestExecutorBuilder {
33
34 RequestExecutorBuilder setEventManager(EventManager eventManager);
35
36 RequestExecutorBuilder setDriver(Driver driver);
37
38 RequestExecutorBuilder setProperties(Properties properties);
39
40 RequestExecutorBuilder setContentTypeHelper(ContentTypeHelper contentTypeHelper);
41
42 RequestExecutor build();
43
44 }
45
46 }