com.quadrique.jbuildingblocks.core.io.socket.server
Class JbbConnectionHandler

java.lang.Object
  extended by java.lang.Thread
      extended by com.quadrique.jbuildingblocks.core.io.socket.server.JbbConnectionHandler
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
JbbConnectionHandlerDumpReceivedData, JbbConnectionHandlerHttp

public abstract class JbbConnectionHandler
extends Thread

This class implements a synchronized pool of connection handler threads. Each thread is blocked waiting for a new connection request to handle. This is the base class that defines the commmon behavior of all connection handlers and it has to be overriden in a derived class that implements the connection handling itself.

Version:
1.0.0
Author:
Hervé Rivere

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JbbConnectionHandler()
          Constructor
 
Method Summary
static void processRequest(Socket zRequest)
          Static entry point that is used to add a newly created connection to the pool.
 void run()
          Connection handler thread processing
 void stopExecution()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JbbConnectionHandler

public JbbConnectionHandler()
Constructor

Method Detail

processRequest

public static void processRequest(Socket zRequest)
Static entry point that is used to add a newly created connection to the pool. The dispatcher will immadiately awake one of the connection handler threads (whenever one is available) so that the connection can be handled asap.


run

public void run()
Connection handler thread processing

Specified by:
run in interface Runnable
Overrides:
run in class Thread

stopExecution

public void stopExecution()


Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.