simple.http.serve
Class ProtocolHandlerFactory
java.lang.Object
simple.http.serve.ProtocolHandlerFactory
public class ProtocolHandlerFactory
- extends java.lang.Object
The ProtocolHandlerFactory
is used to retrieve a
ProtocolHandler
to handle HTTP transactions. The
ProtocolHandler
retrieved uses the implementation
of the ResourceEngine
to produce delegate handlers
for the HTTP transaction.
A useful purpose for the ProtocolHandlerFactory
is also to tie the ProtocolHandler
implementation
to an interface rather than an object implementation that may
become obsolete due to new requirements.
- Author:
- Niall Gallagher
Method Summary |
static ProtocolHandler |
getInstance(ResourceEngine engine)
This will produce a ProtocolHandler that uses
the ResourceEngine to retrieve delegate handlers
for processing HTTP transactions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtocolHandlerFactory
public ProtocolHandlerFactory()
getInstance
public static ProtocolHandler getInstance(ResourceEngine engine)
- This will produce a
ProtocolHandler
that uses
the ResourceEngine
to retrieve delegate handlers
for processing HTTP transactions. The delegate handlers will
be given the Request
and Response
objects given to the ProtocolHandler
interface.
- Parameters:
engine
- this is the ResourceEngine
that
produces the delegate handlers
- Returns:
- this returns a
ProtocolHandler
that
can be used to process HTTP transactions