Keel 2.1RC2

org.keel.servers.socket
Class KeelSocketServer

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.keel.servers.KeelAbstractServer
          extended byorg.keel.servers.socket.KeelSocketServer
All Implemented Interfaces:
EventListener, java.lang.Runnable

public class KeelSocketServer
extends KeelAbstractServer

A KeelServer instance calls an instance of this class every time a request is received, up to a certain maximum number of active threads. This class handles the request in a seperate thread, and terminates once the response has been sent back to the client.


Nested Class Summary
(package private)  class KeelSocketServer.MultiThreadedProcessor
           
 
Nested classes inherited from class org.keel.servers.KeelAbstractServer
 
Field Summary
private  Configuration myConfig
           
private  java.net.ServerSocket serverSocket
           
 
Fields inherited from class org.keel.servers.KeelAbstractServer
logger, myContainer
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
KeelSocketServer()
           
 
Method Summary
protected  void bootstrap()
          Need to configure, initialize, etc...but can't rely on the lifecycle interfaces used by typical components because the container is not yet available.
 void destroy()
           
 KeelResponse execute(KeelRequest request)
           
 void run()
           
 void setLogger(Logger newLog)
           
protected  void socketServiceLoop()
           
 
Methods inherited from class org.keel.servers.KeelAbstractServer
getContainer, getContext, getLogger, initialize, isInitialized, receiveEvent, saveContext, setArgs, setInitialized, shutDown
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myConfig

private Configuration myConfig

serverSocket

private java.net.ServerSocket serverSocket
Constructor Detail

KeelSocketServer

public KeelSocketServer()
Method Detail

setLogger

public void setLogger(Logger newLog)

bootstrap

protected void bootstrap()
                  throws ModelException
Need to configure, initialize, etc...but can't rely on the lifecycle interfaces used by typical components because the container is not yet available. This bootstrap method initializes the container and configures & initializes this server instance.

Throws:
ModelException

run

public void run()

socketServiceLoop

protected void socketServiceLoop()

destroy

public void destroy()

execute

public KeelResponse execute(KeelRequest request)
                     throws ModelException
Throws:
ModelException

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.