## org.w3c.www.protocol.http.cache.push
Class PushCacheHandler

    java.lang.Object
      |
      +--java.lang.Thread
            |
            +--org.w3c.www.protocol.http.cache.push.PushCacheHandler

public class PushCacheHandler
extends java.lang.Thread

PushCacheHandler Created by PushCacheListener to handle a dialogue with a client

See Also:
  `PushCacheProtocol`

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`PushCacheHandler(PushCacheListener l, java.net.Socket s)` Construct a PushCacheHandler

Method Summary
`protected void` `add()` Handle "ADD" packet
`protected void` `clean()` Handle "CLN" packet
`protected void` `cleanup()` Close sockets, etc.
`protected void` `del()` Handle "DEL" packet
`protected void` `nop()` Handle "NOP" packet (reply OK)
`protected void` `present()` Handle "PRS" packet
`void` `printBuffer(byte[] buf, int len)` Debugging aid, displays buffer to stderr
`protected void` `readPayload()` Read data based on the contents of the remain_len field
`protected void` `reply_error(java.lang.String message)` Send an "ERR" message back to client
`protected void` `reply_no()` Send a "NO" message back to client
`protected void` `reply_ok()` Send an "OK" message back to client
`void` `run()` Handle dialogue with client
`void` `stopRunning()` Request that Handler gracefully cease execution

Methods inherited from class java.lang.Thread
`activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PushCacheHandler

    public PushCacheHandler(PushCacheListener l,
                            java.net.Socket s)
                     throws java.io.IOException

  Construct a PushCacheHandler
  Parameters:
    `socket` - Socket through which Handler will communicate with client

Method Detail

### reply_ok

    protected void reply_ok()
                     throws java.io.IOException

  Send an "OK" message back to client

### reply_no

    protected void reply_no()
                     throws java.io.IOException

  Send a "NO" message back to client

### reply_error

    protected void reply_error(java.lang.String message)

  Send an "ERR" message back to client

### stopRunning

    public void stopRunning()

  Request that Handler gracefully cease execution

### cleanup

    protected void cleanup()

  Close sockets, etc.

### printBuffer

    public void printBuffer(byte[] buf,
                            int len)

  Debugging aid, displays buffer to stderr

### readPayload

    protected void readPayload()
                        throws java.io.IOException

  Read data based on the contents of the remain_len field

### add

    protected void add()
                throws java.io.IOException

  Handle "ADD" packet

### del

    protected void del()
                throws java.lang.Exception

  Handle "DEL" packet

### clean

    protected void clean()
                  throws java.lang.Exception

  Handle "CLN" packet

### present

    protected void present()
                    throws java.lang.Exception

  Handle "PRS" packet

### nop

    protected void nop()
                throws java.lang.Exception

  Handle "NOP" packet (reply OK)

### run

    public void run()

  Handle dialogue with client
  Overrides:
    run in class java.lang.Thread