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.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ZBaseSingleThread
public ZBaseSingleThread()
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 filename
- section name for this threadverbose
- 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 requestsdataOut
- output stream for responses