Adding an HTTP listener

The following XML fragment is used to add a listener to the current HTTP server to wait for incoming requests.


<Call name="addListener">
<Arg>
<New class="com.ebd.hub.server.http.SocketListener">
<Set name="Port">80</Set>
<Set name="MinThreads">5</Set>
<Set name="MaxThreads">255</Set>
<Set name="MaxIdleTimeMs">30000</Set>
<Set name="MaxReadTimeMs">10000</Set>
<Set name="MaxStopTimeMs">5000</Set>
<Set name="LowResourcePersistTimeMs">5000</Set>
</New>
</Arg>
</Call>


The parameters have the following meaning.


Value

Description

Port

The port on which the listener should wait for incoming connections.

MinThreads

The number of threads to start in parallel when the server starts.

MaxThreads

The maximum number of threads that can be started to respond to incoming requests in parallel.

MaxIdleTimeMs

Specifies the time in milliseconds that a connection may remain idle before the server considers it as invalid.