Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.w3c.jigsaw.http
Class Shuffler

    java.lang.Object
      |
      +--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

### SHUFFLER_P

    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.

Constructor Detail

### Shuffler

    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`.
  Parameters:
    `path` - The path to the server.

Method Detail

### shuffle

    public int shuffle(Client client,
                       Reply reply)
                throws java.io.IOException

  Shuffle the given rteply body to the given client. This methods tries to outout the given reply

### shutdown

    public void shutdown()

### main

    public static void main(java.lang.String[] args)
                     throws java.io.FileNotFoundException,
                            java.io.IOException

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD