Open SiteSearch 4.1.1
Final

ORG.oclc.zbroker
Class ZBrokerSingleThread

java.lang.Object
  |
  +--ORG.oclc.zbroker.ZBrokerThread
        |
        +--ORG.oclc.zbroker.ZBrokerSingleThread

public class ZBrokerSingleThread
extends ZBrokerThread

ZBrokerSingleThread 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
ZBrokerSingleThread()
           
 
Method Summary
 void init(IniFile ini, String serverName)
          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.zbroker.ZBrokerThread
init, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZBrokerSingleThread

public ZBrokerSingleThread()
Method Detail

init

public void init(IniFile ini,
                 String serverName)
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 ZBrokerThread and not directly. All ZBrokerThreads must implement an init class.
Parameters:
ini - configuration file
name - section name for this thread
Overrides:
init in class ZBrokerThread

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.

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