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

java.lang.Object
  extended by java.lang.Thread
      extended by com.quadrique.jbuildingblocks.core.io.socket.server.JbbConnectionDispatcher
All Implemented Interfaces:
Runnable

public class JbbConnectionDispatcher
extends Thread

This class listens for connection request on a given port. Whenever a new connection request is received, the connection is accepted and a ConnectionHandler thread is awakened

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
JbbConnectionDispatcher(int zNbThreads, int zPortNumber, String zConnectionHandlerClassName)
          Constructor
 
Method Summary
 void run()
          Entry point of this thread
 void stopExecution()
          to stop the execution of this thread (and as a side-effects all the child threads)
 
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

JbbConnectionDispatcher

public JbbConnectionDispatcher(int zNbThreads,
                               int zPortNumber,
                               String zConnectionHandlerClassName)
                        throws Exception
Constructor

Parameters:
zNbThreads -
zPortNumber - the port number to listen to
zConnectionHandlerClassName -
Throws:
Exception
Method Detail

run

public void run()
Entry point of this thread

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

stopExecution

public void stopExecution()
to stop the execution of this thread (and as a side-effects all the child threads)



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