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.mux
Class MuxClient

    java.lang.Object
      |
      +--org.w3c.jigsaw.http.Client
            |
            +--org.w3c.jigsaw.http.mux.MuxClient

public class MuxClient
extends Client
implements java.lang.Runnable

Field Summary
`protected java.lang.Thread` | `thread` The thread powering that client connection.

Fields inherited from class org.w3c.jigsaw.http.Client
`buffer, cont, debug, identifier, prev_body_count, reqcount, server`

Method Summary
`protected void` | `bind(MuxSession session)` Bind that client to the given connection.
`java.net.InetAddress` | `getInetAddress()` Client implementation - Get the IP address of this client.
`protected java.lang.Thread` | `getThread()` Get the thread powering that client.
`protected boolean` | `idleConnection()` Client implementation - The current connection is now idle.
`void` | `run()` Run HTTP on the newly created mux session.
`protected void` | `stopConnection()` Client implementation - The current connection was terminated.
`protected boolean` | `tryKeepConnection(Request request, Reply reply)`
`protected void` | `usedConnection()` Client implementation - The current connection is now in use.

Methods inherited from class org.w3c.jigsaw.http.Client
`chunkTransfer, emitReply, error, getIdentifier, getInputStream, getMajorVersion, getMinorVersion, getNextRequest, getOutputStream, getRequestCount, getServer, handleTimerEvent, initialize, interruptConnection, isInterrupted, isRunning, log, processRequest, sendContinue, startConnection, trace`

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

Field Detail

### thread

    protected java.lang.Thread thread

  The thread powering that client connection.

Method Detail

### tryKeepConnection

    protected boolean tryKeepConnection(Request request,
                                        Reply reply)

  Overrides:
    tryKeepConnection in class Client

### getInetAddress

    public java.net.InetAddress getInetAddress()

  Client implementation - Get the IP address of this client.
  Returns:
    An InetAddress instance, or null if the client is not currently running.
  Overrides:
    getInetAddress in class Client

### run

    public void run()

  Run HTTP on the newly created mux session.
  Specified by:
    run in interface java.lang.Runnable

### idleConnection

    protected boolean idleConnection()

  Client implementation - The current connection is now idle. We always close the mux session at that time, since creating a new mux session has nearly no overhead.
  Overrides:
    idleConnection in class Client

### usedConnection

    protected void usedConnection()

  Client implementation - The current connection is now in use. Nothing special done.
  Overrides:
    usedConnection in class Client

### stopConnection

    protected void stopConnection()

  Client implementation - The current connection was terminated. We make sure the underlying mux session is closed properly, and terminate the underlying thread.
  Overrides:
    stopConnection in class Client

### bind

    protected void bind(MuxSession session)
                 throws java.io.IOException

  Bind that client to the given connection.
  Parameters:
    `session` - The mux session to handle.

### getThread

    protected java.lang.Thread getThread()

  Get the thread powering that client.
  Returns:
    A Thread instance, or null.
  Overrides:
    getThread in class Client

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