## 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 org.w3c.jigsaw.http.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, reqcount, server`

Method Summary
`protected void` | `bind(org.w3c.www.mux.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(org.w3c.jigsaw.http.Request request, org.w3c.jigsaw.http.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(org.w3c.jigsaw.http.Request request,
                                        org.w3c.jigsaw.http.Reply reply)

  Overrides:
    tryKeepConnection in class org.w3c.jigsaw.http.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 org.w3c.jigsaw.http.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 org.w3c.jigsaw.http.Client

### usedConnection

    protected void usedConnection()

  Client implementation - The current connection is now in use. Nothing special done.
  Overrides:
    usedConnection in class org.w3c.jigsaw.http.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 org.w3c.jigsaw.http.Client

### bind

    protected void bind(org.w3c.www.mux.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 org.w3c.jigsaw.http.Client