Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.NetXec
Source: src/com/multiversesocial/hyperview/NetXec.java

NetXec

HyperView V3.2 — class
version V3.2 class

Summary

By Tony Swain 1997. A class for non blocking lightweight thread supervision with deadlock detection.

Source file: NetXec.java

Hierarchy

Extends: none

Implements: Runnable, NetXecConstants, RunInfoConstants, ThreadReport

Referenced HyperView classes

Media files used

Declaration & members

public class NetXec implements Runnable, NetXecConstants, RunInfoConstants, ThreadReport

Declared in src/com/multiversesocial/hyperview/NetXec.java, lines 8–625. 26 field(s), 1 constructor(s), 13 method(s). Every member has an anchor you can link to (e.g. NetXec.html#<id>).

Fields (26)

DeclarationValue / initializerDescriptionSource
BufferedInputStream bisNo comment in source; not referenced by name in this type’s methods.line 17
HyperView curViewNo comment in source; assigned in NetXec(); used in run(), echo().line 19
Thread execTaskNo comment in source; assigned in start(), stop(), kickStart(); used in run().line 20
Graphics graphicsNo comment in source; not referenced by name in this type’s methods.line 35
volatile NetXecPane infoPaneNo comment in source; used in run(), echo().line 36
String intListString= ""No comment in source; assigned in NetXec().line 23
int iterationNo comment in source; assigned in NetXec(), run(), getRunInfo(); used in start().line 25
long lastRunNo comment in source; assigned in NetXec(), getRunInfo().line 28
static final int MAX_THREADS= 26 (constant)No comment in source; used in NetXec().line 21
ThreadGroup monitorGroupNo comment in source; assigned in start().line 18
Thread MonitorsNo comment in source; not referenced by name in this type’s methods.line 34
static NetXec netXecBaseNo comment in source; assigned in NetXec(); used in getNetXec(); name appears in 1 other source file(s): HyperView.line 10
long nowNo comment in source; assigned in NetXec(), start(), getRunInfo(); used in run(), echo().line 24
int nxFlagsNo comment in source; assigned in NetXec(), run(), echo(), echoToggle().line 15
RunInfo runInfoNo comment in source; assigned in NetXec(), addThread(); used in start(), stop(), run(), getRunInfo(), kickStart().line 13
long runLagNo comment in source; assigned in NetXec(), getRunInfo().line 29
static Runtime runTime= Runtime.getRuntime()No comment in source; name appears in 2 other source file(s): DisconnectTimer, HyperConnectionHandler.line 11
long startTimeNo comment in source; assigned in NetXec(), start(), getRunInfo(); used in run(), echo().line 27
FileInputStream stdinNo comment in source; not referenced by name in this type’s methods.line 16
Object syncClientNo comment in source; assigned in NetXec().line 30
ThreadRec[] threadNo comment in source; assigned in NetXec(), addThread(), remThread(), removeAllThreads(); used in run(), echo().line 32
RunInfo tmpRunInfoNo comment in source; assigned in run(), echo().line 14
ThreadRec tmpThreadRecNo comment in source; not referenced by name in this type’s methods.line 33
volatile int totalThreadsNo comment in source; assigned in NetXec(), addThread(), remThread(), removeAllThreads(); used in run(), echo().line 31
final String VERSIONSTRING= "NetXec() V1.25" (constant)No comment in source; not referenced by name in this type’s methods.line 22
int waitTimeNo comment in source; assigned in NetXec(), getRunInfo(); used in run().line 26

Constructors (1)

SignatureDescriptionSource
NetXec(HyperView tView)16 statement(s); calls super(), System.exit(); creates RunInfo.line 38

Methods (13)

SignatureDescriptionSource
static { … }Implicit default constructor generated by the compiler (not written in the source).implicit
public synchronized int addThread(Thread t, RunInfo r)11 statement(s); calls t.toString(), System.exit(), notifyAll(); creates ThreadRec, RunInfo.line 449
public void echo()7 statement(s); calls thread[i].client.getName(), thread[i].runInfo.getRunInfo(), zombieExcluded(), any0.printStackTrace(), curView.resetTotals() ….line 286
public void echoToggle()1 statement(s).line 525
static NetXec getNetXec()Returns netXecBase.line 569
public RunInfo getRunInfo()7 statement(s).
Implements ThreadReport.getRunInfo()
line 540
public String kickStart()10 statement(s); calls execTask.interrupt(), execTask.dumpStack(), execTask.start(); creates Thread.line 551
public synchronized void removeAllThreads()5 statement(s); calls notifyAll().line 510
public synchronized void remThread(Thread t, int num)6 statement(s); calls notifyAll().line 483
public void run()8 statement(s); calls Thread.currentThread(), thread[i].client.getName(), thread[i].runInfo.getRunInfo(), npex.toString(), npex.printStackTrace() ….
Implements Runnable.run()
line 93
public synchronized void start()11 statement(s); calls tTask.interrupt(), execTask.setPriority(), execTask.setName(), execTask.start(), System.currentTimeMillis() …; creates ThreadGroup, Thread.line 61
public synchronized void stop()4 statement(s); calls tTask.interrupt().line 82
static boolean zombieExcluded(int tNum)1 statement(s).line 574

Examples

Real usage taken from elsewhere in the HyperView 3.2 source (file and line shown; source path src/com/multiversesocial/hyperview/).

instantiation — HyperView.java, line 1203

 1203  hyperExec = new NetXec(this);

static call — EchoThreads.java, line 12

   12  NetXec.getNetXec().echo();

declaration — HyperXec.java, line 103

  103  NetXec pExec        = null;
Hits--