All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.http.Shuffler

java.lang.Object
   |
   +----w3c.jigsaw.http.Shuffler

public class Shuffler
extends Object
This class implements both a nice hack and some magic. It uses an underlying shuffler process to speed up the sending of big data files back to the client.

The protocol between the server and the shuffler is quite simple, one byte indicate the operation, which takes as argument two file descriptors.


Variable Index

 o SHUFFLER_P
The property giving the path of the shuffler server.

Constructor Index

 o Shuffler(String)
Create a new data shuffler.

Method Index

 o main(String[])
 o shuffle(Client, Reply)
Shuffle the given rteply body to the given client.
 o shutdown()

Variables

 o SHUFFLER_P
 public static final String SHUFFLER_P
The property giving the path of the shuffler server. The shuffler server is an optional server helper, that deals with serving resource contents. When resource contents can be efficiently messaged between process boundaries (eg using sendmsg), the shuffler server takes over the task of sending resource's content back to the client. This property gives the path of the shuffler server binary program.

Constructors

 o Shuffler
 public Shuffler(String path)
Create a new data shuffler. The path identifies the directory in which UNIX socket will get bind. This should be an absloute path, eg /tmp/shuffler.

Parameters:
path - The path to the server.

Methods

 o shuffle
 public int shuffle(Client client,
                    Reply reply) throws IOException
Shuffle the given rteply body to the given client. This methods tries to outout the given reply

 o shutdown
 public synchronized void shutdown()
 o main
 public static void main(String args[]) throws FileNotFoundException, IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index