|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--org.jafer.zserver.ZServerThread
|
+--org.jafer.zserver.operations.Operation
Each operation runs in it's own thread and either terminates naturally by sending response PDU (or Diagnostic) or can be stopped by session which forces close of socket. Operations must implement abstract runOp() method. Also includes methods for building diagnostics and handling exceptions.
| Field Summary | |
static java.lang.String |
BIB1_DIAGNOSTIC_OID
|
private PDUDriver |
pduDriver
|
private Session |
session
|
| Fields inherited from class org.jafer.zserver.ZServerThread |
logger, STATE_RUNNING, STATE_STOPPED, STATE_STOPPING |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Operation(Session session,
java.lang.String name)
|
|
| Method Summary | |
void |
close()
|
protected z3950.v3.DefaultDiagFormat |
getDiagnostic(z3950.v3.DefaultDiagFormat defaultDiagFormat,
int condition,
java.lang.String addInfo)
|
protected z3950.v3.DiagRec |
getDiagnostic(z3950.v3.DiagRec diagRec,
int condition,
java.lang.String addInfo)
|
protected z3950.v3.NamePlusRecord_record |
getDiagnostic(z3950.v3.NamePlusRecord_record name_record,
int condition,
java.lang.String addInfo)
|
Session |
getSession()
|
void |
run()
|
abstract z3950.v3.PDU |
runOp()
|
private void |
sendPDU(z3950.v3.PDU pduResponse)
|
void |
start()
|
| Methods inherited from class org.jafer.zserver.ZServerThread |
getActiveThreads, getId, getNumberOfActiveThreads, getStartTime, getState, getThreads, getUpTime, halt, hasThreads, isStopped, isStopping, purgeThreads, setStartTime, setStopped, setStopping, setThreadName, setThreads, startThread |
| 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, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String BIB1_DIAGNOSTIC_OID
private Session session
private PDUDriver pduDriver
| Constructor Detail |
public Operation(Session session,
java.lang.String name)
| Method Detail |
public final void start()
start in class java.lang.Thread
public abstract z3950.v3.PDU runOp()
throws java.lang.Exception
java.lang.Exceptionpublic final void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic final void close()
close in class ZServerThreadpublic Session getSession()
private void sendPDU(z3950.v3.PDU pduResponse)
throws ConnectionException
ConnectionException
protected z3950.v3.DefaultDiagFormat getDiagnostic(z3950.v3.DefaultDiagFormat defaultDiagFormat,
int condition,
java.lang.String addInfo)
protected z3950.v3.DiagRec getDiagnostic(z3950.v3.DiagRec diagRec,
int condition,
java.lang.String addInfo)
protected z3950.v3.NamePlusRecord_record getDiagnostic(z3950.v3.NamePlusRecord_record name_record,
int condition,
java.lang.String addInfo)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||