    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.

##

SHUFFLER_P
  The property giving the path of the shuffler server.

##

Shuffler(String)
  Create a new data shuffler.

##

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

##

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.

##

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.

##

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

shutdown

     public synchronized void shutdown()

main

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

    All Packages  Class Hierarchy  This Package  Previous  Next  Index