jetty.xml
1.69 KB
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
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="ESServer" class="org.eclipse.jetty.server.Server">
<!-- ==================================================== -->
<!-- ElasticSearch Handler. -->
<!-- This handler redirects all requests to ElasticSearch -->
<!-- ==================================================== -->
<Set name="handler">
<New class="com.smzdm.elasticsearch.http.jetty.handler.JettyHttpServerTransportHandler"
id="HttpServerAdapterHandler">
<Set name="transport"><Ref id="ESServerTransport"/></Set>
</New>
</Set>
<!-- ==================================================== -->
<!-- Reduce verbosity of jetty default error handler -->
<!-- ==================================================== -->
<Call name="addBean">
<Arg>
<New class="com.smzdm.elasticsearch.http.jetty.error.JettyHttpServerErrorHandler"
id="HttpServerErrorHandler">
</New>
</Arg>
</Call>
<!-- ======================================== -->
<!-- Add HTTP connector -->
<!-- ======================================== -->
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Set name="host"><Property name="jetty.bind_host"/></Set>
<Set name="port"><Property name="jetty.port"/></Set>
<Set name="maxIdleTime">600000</Set>
<Set name="Acceptors">2</Set>
</New>
</Arg>
</Call>
</Configure>