|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimple.http.BufferedPipelineFactory
public class BufferedPipelineFactory
The BufferedPipelineFacotry
object is used to buffer
the output for network performance. The output channel is buffered
so that the TCP packets that are sent using the sockets output
stream have a size that is sufficently large. The motive for using
output buffering for the TCP packets can be found in Performance
Interacrions Between P-HTTP and TCP-implementations 1997.
The implementation is by default created as a factory object for
creating BufferedPipeline
instances. This is done so
that it can be used to dynamically issue buffered pipelines using
the ConnectionHandlerFactory
object.
Constructor Summary | |
---|---|
BufferedPipelineFactory()
This creates a PipelineFactory that will issue
instances of the Pipeline that buffers output
so that 1Kb packets are sent to the underlying socket. |
|
BufferedPipelineFactory(int size)
This creates a PipelineFactory that will issue
instances of the Pipeline that buffers output
to a specified size so that packets that are sent to the
underlying socket are sufficently large. |
Method Summary | |
---|---|
Pipeline |
getInstance(java.net.Socket sock)
This will produce a Pipeline with the buffering
output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedPipelineFactory()
PipelineFactory
that will issue
instances of the Pipeline
that buffers output
so that 1Kb packets are sent to the underlying socket.
public BufferedPipelineFactory(int size)
PipelineFactory
that will issue
instances of the Pipeline
that buffers output
to a specified size so that packets that are sent to the
underlying socket are sufficently large.
size
- this is the size of the output buffer usedMethod Detail |
---|
public Pipeline getInstance(java.net.Socket sock) throws java.io.IOException
Pipeline
with the buffering
output stream. The output stream provided by the produced
pipeline implementation will be capabile of buffering bytes
written so that a larger packet can be delivered.
getInstance
in interface PipelineFactory
sock
- the socket to write the buffered packets to
java.io.IOException
- if an output stream can not be created
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |