|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimple.http.connect.SocketHandler
public class SocketHandler
The SocketHandler
object is used in conjunction
with the Connection
to dispatch Pipeline
objects to a PipelineHandler
for incoming TCP
connections. The PipelineFactory
object can be used
to dispatch specialized Pipeline
objects to the
pipeline handler. This is useful when buffering is required for
performance or when security measures are required.
Constructor Summary | |
---|---|
SocketHandler(PipelineHandler handler)
This constructor creates a SocketHandler using
a PipelineHandler object. |
|
SocketHandler(PipelineHandler handler,
PipelineFactory factory)
This constructor creates a SocketHandler using
a PipelineHandler object. |
Method Summary | |
---|---|
void |
process(java.net.Socket sock)
Once the Socket has been configured it can be
used to create a Pipeline object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SocketHandler(PipelineHandler handler)
SocketHandler
using
a PipelineHandler
object. The handler will
dispatch Pipeline
objects to the given
PipelineHandler
once a socket is issued.
handler
- the PipelineHandler
used
to process the connectionspublic SocketHandler(PipelineHandler handler, PipelineFactory factory)
SocketHandler
using
a PipelineHandler
object. The processor will
dispatch Pipeline
objects to the given
PipelineHandler
once a socket is issued.
The Pipeline
's are created once a socket is
given to the PipelineFactory
. This enables
the handler to attach special functionality to the
pipelines dispatched to the PipelineHandler
.
handler
- the PipelineHandler
used
to process the connectionsfactory
- this is the factory for implementations
of the Pipeline
objectMethod Detail |
---|
public void process(java.net.Socket sock) throws java.io.IOException, java.lang.InterruptedException
Socket
has been configured it can be
used to create a Pipeline
object. This object
is then given to the PipelineHandler
so that
the connection can be processed and given to the
ProtocolHandler
so the HTTP request can be
processed.
sock
- this is the connected socket that will be used
to create the Pipeline
java.io.IOException
- thrown if the Socket
experiences an error
java.lang.InterruptedException
- thrown if the thread
has been interrupted before being used to hand over the
Pipeline
to the PipelineHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |