Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.HyperNBInputHandler
Source: src/com/multiversesocial/hyperview/HyperNBInputHandler.java
HyperNBInputHandler.class by Tony Swain ie: NB = non blocking This class runs in a Thread and shares an interleaved Selector with HyperNBOutputHandler.class It also delegates IO to the various HyperChannel IOReply interfaces. There are 2 levels of IO. Base and Channel. Base IO uses HyperNodeReadVector.class In the demo server this is set to simply requeue itself. Input Handler calls Base IO -> HyperNodeReadVector.function(); / or -| The Input Handler accrues a channel InputVector list \ and h...
public class HyperNBInputHandler implements Runnable, HyperNodeConstants, ThreadReport
| Declaration | Value / initializer | Description | Source |
|---|---|---|---|
int accruedTimeoutSeconds | = 0 | No comment in source; assigned in HyperNBInputHandler(). | |
HyperChannel[] channel | No comment in source; assigned in run(). | ||
volatile HyperLinkedList[] channelInputVectorList | No comment in source; used in run(). | ||
volatile HyperLinkedList channelIOList | No comment in source; used in run(). | ||
ChannelTempLink[] channelTempLink | No comment in source; used in run(). | ||
HyperDisconnectHandler disconnectHandler | No comment in source; assigned in HyperNBInputHandler(). | ||
HyperChannelRegistry hyperChannelRegistry | No comment in source; name appears in 3 other source file(s): HyperChannel, HyperConnectionHandler, HyperNBOutputHandler. | ||
boolean[] impendingChannelIO | No comment in source; assigned in run(). | ||
boolean[] impendingI0 | No comment in source; name appears in 3 other source file(s): HyperChannel, HyperChannelRegistry, HyperNBOutputHandler. | ||
Iterator ioIterator | No comment in source; assigned in run(). | ||
Set ioReadyKeys | No comment in source; assigned in run(). | ||
SelectionKey ioSelectionKey | No comment in source; assigned in run(). | ||
Selector ioSelector | No comment in source; assigned in run(), channelCleanUp(). | ||
int iteration | = 0 | No comment in source; assigned in HyperNBInputHandler(), run(), getRunInfo(). | |
long lastRun | = 0 | No comment in source; assigned in HyperNBInputHandler(), start(), run(), getRunInfo(). | |
Object masterSocketChannelLock | No comment in source; assigned in HyperNBInputHandler(); used in run(). | ||
long now | = 0 | No comment in source; assigned in HyperNBInputHandler(), start(), getRunInfo(); used in run(). | |
HyperConnectionHandler parentHandler | No comment in source; assigned in HyperNBInputHandler(); used in start(), stop(). | ||
int processCount | = 0 | hmm 27 years and this wraps :) | |
static volatile HyperLinkedList readAddList | = new HyperLinkedList("HyperNBInputHandler.readAddList") | No comment in source; used in run(); name appears in 2 other source file(s): HyperChannel, HyperConnectionNode. | |
volatile HyperLinkedList readExceptionList | No comment in source; assigned in HyperNBInputHandler(); used in run(). | ||
int readFlags | = 0 | main flags | |
volatile HyperLinkedList readList | No comment in source; assigned in HyperNBInputHandler(); used in run(). | ||
volatile HyperLinkedList readReadyList | No comment in source; assigned in HyperNBInputHandler(); used in run(). | ||
volatile HyperLinkedList readRegistrationWaitList | No comment in source; assigned in HyperNBInputHandler(); used in run(). | ||
Thread readTask | No comment in source; assigned in start(), stop(); used in run(). | ||
RunInfo runInfo | = new RunInfo(this) | No comment in source; assigned in HyperNBInputHandler(); used in start(), stop(), run(), getRunInfo(). | |
static int selectWait | = 1000 | No comment in source; used in run(). | |
long startTime | = 0 | No comment in source; assigned in HyperNBInputHandler(), start(), getRunInfo(). | |
int timeoutCheckSeconds | = 1 | No comment in source; assigned in HyperNBInputHandler(). | |
public int totalChannels | No comment in source; name appears in 5 other source file(s): ChannelControlPane, HyperChannel, HyperChannelRegistry, HyperNBOutputHandler …. | ||
int totalInputs | = 0 | No comment in source; assigned in HyperNBInputHandler(). | |
int totalKeys | = 0 | No comment in source; assigned in HyperNBInputHandler(), run(). | |
long totalReadBytes | = 0 | No comment in source; assigned in HyperNBInputHandler(), run(). | |
static int waitTime | = 20 | No comment in source; assigned in HyperNBInputHandler(), getRunInfo(); used in run(); name appears in 14 other source file(s): CollisionManager, Dispatch, HyperChannel, HyperConnectionHandler …. |
| Signature | Description | Source |
|---|---|---|
HyperNBInputHandler(HyperConnectionHandler tHandler) | 23 statement(s); calls super(), HyperChannelRegistry.synch(); creates HyperLinkedList, RunInfo. |
| Signature | Description | Source |
|---|---|---|
static { … } | Implicit default constructor generated by the compiler (not written in the source). | |
void anyKey() | 2 statement(s); calls System.in.read(), wait(). | |
public void channelCleanUp() | Cont CloseNetXecChannel / ContShutdownDisplay ordered teardown analog. | |
public RunInfo getRunInfo() | 7 statement(s). | |
void pause(int pauseTime) | 1 statement(s); calls wait(), notifyAll(). | |
public void run() | 16 statement(s); calls Thread.currentThread(), HyperConnectionHandler.waitIOExec(), SelectorProvider.provider().openSelector(), SelectorProvider.provider(), ioex1.printStackTrace() …. | |
public synchronized void start() | 9 statement(s); calls System.currentTimeMillis(), readTask.setName(), readTask.start(), parentHandler.parentView.hyperExec.addThread(), notifyAll(); creates Thread. | |
public synchronized void stop() | 6 statement(s); calls parentHandler.parentView.hyperExec.remThread(), tTask.interrupt(), notifyAll(). | |
public String toString() | Returns "HyperNBInputHandler(" + super.toString() + ')'. |
instantiation — HyperConnectionHandler.java, line 155
155 inputHandler = new HyperNBInputHandler(this);
declaration — DisconnectTimer.java, line 13
13 HyperNBInputHandler inputHandler;
declaration — HyperChannel.java, line 52
52 HyperNBInputHandler parentInputHandler;