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