Implements a
series of asynchronous Interleaved lists to control Connections, input
and output IO, and exception processing.
|
HyperConnectionHandler()
V1.3 Thread details.
|
HyperConnectionHandler()
This
is the main class as it instantiates and starts all other
Threads. It then binds to a specified port and will accept
incoming connections at that port HyperConnectionHandler()
details.
SystemClock.DisconnectTimer()
SystemTimer
is an asynchronous low level timer with a one second
resolution.
HyperConnectionNode()
This class manages
the connection references needed for all incoming
connections. For example it stores the SocketChannel/socket
information.
It also maintains several lists essential for asynchronous
input output.
Main HyperConnectionNode IO
lists
|
|
List name |
Type of list Object
|
readList
|
HperNodeReadVector()
|
writeList |
HyperNodeWriteNode()
|
Main
SocketChannel() Threads.
|
Channel reads
|
Channel
writes |
HyperNBInputHandler()
This
Thread controls all
SocketChannel input to the server.
|
HyperNBOutputHandler()
This Thread
control all
SocketChannel output to the server.
|
DisconnectTimer()
This Thread
controls the main HyperConnectionNode() list. It extends
SystemTimer() and monitors socket exceptions and non activity.
Each node can be assigned a threshold of non-activity time after which
the connection is assumed to have gone asleep and closed.
|
|
|
HyperConnectionHandler()
details
Public references:
These are the main 5 thread that control the network IO.
inputHandler; //Interleaved io handlers
outputHandler; //
disconnectHandler;
stdInputHandler;
disconnectTimer;
HyperNBInputHandler
inputHandler;
inputHandler is a reference to this connection's HyperNBInputHandler()
Thread.
HyperNBOutputHandler
outputHandler;
inputHandler is a reference to this connection's HyperNBOutputHandler()
Thread.
HyperDisconnectHandler
disconnectHandler;
disconnectHandler
is a reference to this connection's HyperDisconnectHandler()
Thread.
STDInputHandler
stdInputHandler;
stdInputHandler
is
a
reference to this connection's STDInputHandler()
Thread.
DisconnectTimer
disconnectTimer;
Runtime
runTime
= null;
SystemListRegistry
systemListRegistry = null;
//</THREADS>
static String
serverOutName
= "nio_server.txt";
static int
runFlags
= 0;
public methods:
|
|
HyperNodeInputHandler()
|
This
Thread handles all input IO.
On input it will either call
int HyperNodeReadVector.function()
or send the entire io list to a HyperChannel.class
handler.
|
HyperNodeOutputHandler() |
tic String
se |
HyperDisconnectHandler() |
tic String
se |
STDInputHandler() |
tic String
se |
SystemTimer() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|