Class Shuffler

  extended by org.w3c.jigsaw.http.Shuffler

public class Shuffler
extends java.lang.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.

Field Summary
static java.lang.String SHUFFLER_P
          The property giving the path of the shuffler server.
Constructor Summary
Shuffler(java.lang.String path)
          Create a new data shuffler.
Method Summary
static void main(java.lang.String[] args)
 int shuffle(Client client, Reply reply)
          Shuffle the given rteply body to the given client.
 void shutdown()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final java.lang.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.

See Also:
Constant Field Values
Constructor Detail


public Shuffler(java.lang.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.

path - The path to the server.
Method Detail


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



public void shutdown()


public static void main(java.lang.String[] args)