Class Broadcaster
java.lang.Object
java.lang.Thread
edu.jas.util.Broadcaster
- All Implemented Interfaces:
Runnable
Thread for broadcasting all incoming objects to the list clients.
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Listprivate final SocketChannelprivate Counterprivate static final org.apache.logging.log4j.LoggerFields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionBroadcaster(SocketChannel s, List p, Counter le, SortedMap<Counter, Object> sm) Broadcaster. -
Method Summary
Modifier and TypeMethodDescriptionvoidbroadcast.voidcloseChannel.voidrun()run.voidsendChannel(Object n, Object o) sendChannel.toString()toString.Methods inherited from class Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
channel
-
bcaster
-
listElem
-
theList
-
-
Constructor Details
-
Broadcaster
-
-
Method Details
-
closeChannel
public void closeChannel()closeChannel. -
sendChannel
sendChannel.- Parameters:
n- counter.o- value.- Throws:
IOException
-
broadcast
-
run
-
toString
-