HandlerFactory¶
The TCP connections that underlie HTTP sessions get created within
the http
package at times that the application code can not
predict. Yet, the application code has to provide custom hooks into
these connections as they are created. To accomplish this, the
application code provides an instance of a class
that implements
this interface.
The HandlerFactory.apply
method will be called when a new
HTTPSession
is created, giving the application a chance to create
an instance of its own HTTPHandler
. This happens on both
client and server ends.
Public Functions¶
apply¶
Called by the HTTPSession
when it needs a new instance of the
application's HTTPHandler
. It is suggested that the
session
value be passed to the constructor for the new
HTTPHandler
so that it is available for making
throttle
and unthrottle
calls.
Parameters¶
- session: HTTPSession tag
Returns¶
- HTTPHandler ref^