Keel 2.1RC2

org.keel.servers.direct
Class KeelDirectServer

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

public class KeelDirectServer
extends KeelAbstractServer

This class implements the server-side queue when Keel server is running directly in the same container as the Keel client. This is typically used in low-load/non-distributed environments, particularly from a webapp context. This class is not used directly. Instead, clients like Keel's Struts ModelAction class invoke this thread via the KeelStarter class.

Version:
$Revision: 1.22 $ $Date: 2003/12/29 06:55:40 $
Author:
Michael Nash, Shash Chatterjee Created on Nov 16, 2002

Nested Class Summary
(package private)  class KeelDirectServer.MultiThreadedProcessor
           
 
Nested classes inherited from class org.keel.servers.KeelAbstractServer
 
Field Summary
private  java.lang.Throwable heldError
           
private  Container keelContainer
           
private  boolean keepRunningKeelDirectServer
           
private static java.lang.String PREFIX
           
 Channel requestChannel
           
private  int timeout
           
 
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
KeelDirectServer()
           
 
Method Summary
private  void clearRequestChannel()
          Clears all data in the channels (up to 1000 messages).
 void dispose()
           
 KeelResponse execute(KeelRequest request)
           
 Channel getRequestChannel()
           
 void run()
           
 void setRequestChannel(Channel channel)
           
 
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, destroy, 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

requestChannel

public Channel requestChannel

heldError

private java.lang.Throwable heldError

keepRunningKeelDirectServer

private boolean keepRunningKeelDirectServer

timeout

private int timeout

keelContainer

private Container keelContainer

PREFIX

private static final java.lang.String PREFIX
See Also:
Constant Field Values
Constructor Detail

KeelDirectServer

public KeelDirectServer()
Method Detail

run

public void run()
See Also:
Runnable.run()

clearRequestChannel

private void clearRequestChannel()
Clears all data in the channels (up to 1000 messages). Has safegaurds for time outs and to prevent infinite loops


dispose

public void dispose()

getRequestChannel

public Channel getRequestChannel()
Returns:

setRequestChannel

public void setRequestChannel(Channel channel)
Parameters:
channel -

execute

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

Keel 2.1RC2

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