|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimple.http.connect.ConnectionFactory
public final class ConnectionFactory
This is used to create a Connection
that will
dispatch either HTTP requests or Pipeline
objects
to the handler specified. If a ProtocolHandler
is
used then HTTP requests will be dispatched using a default
instances of the PipelineHandler
using the
PipelineHandlerFactory.getInstance
method.
This also allows a Connection
to be produced
that can use a PipelineFactory
which enables the
Connection
to attach desired functionality. This
can be used to add some form of security or network buffering
features to the pipeline instances.
Constructor Summary | |
---|---|
ConnectionFactory()
|
Method Summary | |
---|---|
static Connection |
getConnection(PipelineHandler handler)
Creates Connection object using the
PipelineHandler given. |
static Connection |
getConnection(PipelineHandler handler,
PipelineFactory factory)
Creates Connection object using the
PipelineHandler given. |
static Connection |
getConnection(ProtocolHandler handler)
Creates the default PipelineHandler object
using the PipelineHandlerFactory.getInstance
method. |
static Connection |
getConnection(ProtocolHandler handler,
PipelineFactory factory)
Creates the default PipelineHandler object
using the PipelineHandlerFactory.getInstance
method. |
static Connection |
getConnection(ResourceEngine engine)
Creates the default PipelineHandler object
using the PipelineHandlerFactory.getInstance
method. |
static Connection |
getConnection(ResourceEngine engine,
PipelineFactory factory)
Creates the default PipelineHandler object
using the PipelineHandlerFactory.getInstance
method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionFactory()
Method Detail |
---|
public static Connection getConnection(ResourceEngine engine)
PipelineHandler
object
using the PipelineHandlerFactory.getInstance
method. This PipelineHandler
will then send
HTTP requests to a ProtocolHandler
issued
from the ProtocolHandlerFactory.getInstance
.
engine
- this is the ResourceEngine
that is used to acquire resources for each request
Connection
that
can be used to establish listening sockets a portpublic static Connection getConnection(ResourceEngine engine, PipelineFactory factory)
PipelineHandler
object
using the PipelineHandlerFactory.getInstance
method. This PipelineHandler
will then send
HTTP requests to a ProtocolHandler
issued
from the ProtocolHandlerFactory.getInstance
.
engine
- this is the ResourceEngine
that is used to acquire resources for each requestfactory
- this is the factory object that
will produce Pipeline
implementations
Connection
that
can be used to establish listening sockets a portpublic static Connection getConnection(ProtocolHandler handler)
PipelineHandler
object
using the PipelineHandlerFactory.getInstance
method. This PipelineHandler
will then send
HTTP requests to the ProtocolHandler
.
handler
- this is the ProtocolHandler
that will receive HTTP requests from ports specified by
the Connection
Connection
that
can be used to establish listening sockets a portpublic static Connection getConnection(ProtocolHandler handler, PipelineFactory factory)
PipelineHandler
object
using the PipelineHandlerFactory.getInstance
method. This PipelineHandler
will then send
HTTP requests to the ProtocolHandler
.
handler
- this is the ProtocolHandler
that will receive HTTP requests from ports specified by
the Connection
factory
- this is the factory object that
will produce Pipeline
implementations
Connection
that
can be used to establish listening sockets a portpublic static Connection getConnection(PipelineHandler handler)
Connection
object using the
PipelineHandler
given. This enables the
Connection
to manage connections to
requested port numbers an dispatch Pipeline
objects to the PipelineHandler.handle
method.
handler
- this is the PipelineHandler
that will manage Pipeline
objects created
by the Connection
Connection
that
can be used to establish listening sockets a portpublic static Connection getConnection(PipelineHandler handler, PipelineFactory factory)
Connection
object using the
PipelineHandler
given. This enables the
Connection
to manage connections to
requested port numbers an dispatch Pipeline
objects to the PipelineHandler.handle
method.
handler
- this is the PipelineHandler
that will manage Pipeline
objects created
by the Connection
factory
- this is the factory object that
will produce Pipeline
implementations
Connection
that
can be used to establish listening sockets a port
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |