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
Session
is created, giving the application a chance to create
an instance of its own Handler
. This happens on both
client and server ends.
Public Functions¶
apply¶
Called by the Session when it needs a new instance of the
application's Handler. It is suggested that the
session
value be passed to the constructor for the new
Handler, you will need it for sending stuff back.
This part must be implemented, as there might be more paramaters that need to be passed for creating a Handler.
Parameters¶
- session: Session tag
Returns¶
- Handler ref^