Open SiteSearch 4.1.1
Final

ORG.oclc.zbase.server
Class ZBaseSingleThread

java.lang.Object
  |
  +--ORG.oclc.zbase.server.ZBaseThread
        |
        +--ORG.oclc.zbase.server.ZBaseSingleThread

public class ZBaseSingleThread
extends ZBaseThread

ZBaseSingleThread is for single sessions across one connection. It will handle both traditional Z39.50 clients (connection-ful) and the Z39.50 session id extension (connection-less). It will not work for concurrent operations such as are needed for kill requests.


Constructor Summary
ZBaseSingleThread()
           
 
Method Summary
 void init(IniFile ini, String serverName, boolean verbose)
          init should only be called once.
 void processCommand(DataInputStream dataIn, DataOutputStream dataOut)
          Process a request.
protected  boolean stayConnected(boolean anotherCondition)
          Decide whether an idle connection should be dropped or should remain open.
 
Methods inherited from class ORG.oclc.zbase.server.ZBaseThread
init, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZBaseSingleThread

public ZBaseSingleThread()
Method Detail

init

public void init(IniFile ini,
                 String serverName,
                 boolean verbose)
init should only be called once. It sets some static variables. It is not a static method because static methods cannot be subclassed. init is called through IRThread and not directly. All IRThreads must implement an init class.
Parameters:
ini - configuration file
name - section name for this thread
verbose - flag indicating whether to dump configuration information.
Overrides:
init in class ZBaseThread

stayConnected

protected boolean stayConnected(boolean anotherCondition)
Decide whether an idle connection should be dropped or should remain open. The boolean passed in overrides any other decision. If the number of active users < connectionLimit, then keep the connection open.

processCommand

public void processCommand(DataInputStream dataIn,
                           DataOutputStream dataOut)
Process a request. The request is read from dataIn and is replied to on dataOut. A single TransactionHandler thread is created and re-used for each request.
Parameters:
dataIn - input stream for requests
dataOut - output stream for responses

Open SiteSearch 4.1.1
Final