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

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

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

All Implemented Interfaces:
  java.lang.Runnable

public class PushCacheHandler
extends java.lang.Thread

PushCacheHandler Created by PushCacheListener to handle a dialogue with a client

See Also:
  `PushCacheProtocol`

Field Summary

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, holdsLock, 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

Method Detail

### reply_ok

    protected void reply_ok()
                     throws java.io.IOException

  Send an "OK" message back to client

    `java.io.IOException`

### reply_no

    protected void reply_no()
                     throws java.io.IOException

  Send a "NO" message back to client

    `java.io.IOException`

### 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

    `java.io.IOException`

### add

    protected void add()
                throws java.io.IOException

  Handle "ADD" packet

    `java.io.IOException`

### del

    protected void del()
                throws java.lang.Exception

  Handle "DEL" packet

    `java.lang.Exception`

### clean

    protected void clean()
                  throws java.lang.Exception

  Handle "CLN" packet

    `java.lang.Exception`

### present

    protected void present()
                    throws java.lang.Exception

  Handle "PRS" packet

    `java.lang.Exception`

### nop

    protected void nop()
                throws java.lang.Exception

  Handle "NOP" packet (reply OK)

    `java.lang.Exception`

### run

    public void run()

  Handle dialogue with client

  Specified by:
    `run` in interface `java.lang.Runnable`
  Overrides:
    `run` in class `java.lang.Thread`

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