    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.http.mux.MuxClient

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

public class MuxClient
extends Client
implements Runnable

##

thread
  The thread powering that client connection.

##

bind(MuxSession)
  Bind that client to the given connection.
getInetAddress()
  Client implementation - Get the IP address of this client.
getThread()
  Get the thread powering that client.
idleConnection()
  Client implementation - The current connection is now idle.
run()
  Run HTTP on the newly created mux session.
stopConnection()
  Client implementation - The current connection was terminated.
tryKeepConnection(Request, Reply)
  Request has been processed into Reply, should we keep connection alive ? Test wether we can keep the connection alive, after the given reply has been emited.
usedConnection()
  Client implementation - The current connection is now in use.

##

thread

     protected Thread thread

  The thread powering that client connection.

##

tryKeepConnection

     protected boolean tryKeepConnection(Request request,
                                         Reply reply)

  Request has been processed into Reply, should we keep connection alive ? Test wether we can keep the connection alive, after the given reply has been emited.

  Overrides:
    tryKeepConnection in class Client

getInetAddress

     public 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.

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 IOException

  Bind that client to the given connection.

  Parameters:
    session - The mux session to handle.

getThread

     protected Thread getThread()

  Get the thread powering that client.

  Returns:
    A Thread instance, or null.
  Overrides:
    getThread in class Client

    All Packages  Class Hierarchy  This Package  Previous  Next  Index