Package org.sonews.daemon
Class Connections
java.lang.Object
org.sonews.daemon.DaemonRunner
org.sonews.daemon.Connections
- All Implemented Interfaces:
Runnable
,DaemonRunnable
Daemon thread collecting all NNTPConnection instances. The thread checks
periodically if there are stale/timed out connections and removes and purges
them properly.
- Since:
- sonews/0.5.0
- Author:
- Christian Lins
-
Field Summary
Fields inherited from class org.sonews.daemon.DaemonRunner
daemon
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(NNTPConnection conn) Adds the given NNTPConnection to the Connections management.get
(SocketChannel channel) static Connections
void
run()
Run loops.Methods inherited from class org.sonews.daemon.DaemonRunner
setDaemon
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.sonews.daemon.DaemonRunnable
dispose
-
Method Details
-
getInstance
- Returns:
- Active Connections instance.
-
add
Adds the given NNTPConnection to the Connections management.- Parameters:
conn
-- See Also:
-
get
- Parameters:
channel
-- Returns:
- NNTPConnection instance that is associated with the given SocketChannel.
-
run
public void run()Run loops. Checks periodically for timed out connections and purged them from the lists.
-