Package it.polimi.ingsw.controller
Class ChatBroadcast
java.lang.Object
java.lang.Thread
it.polimi.ingsw.controller.ChatBroadcast
- All Implemented Interfaces:
Runnable
class which represents the threads for listening to the eventual chat messages for ALL the NON active players
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.BuilderPREVIEW, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
main function of the thread, it listens for chat messages and send them back to the interested clientsMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Constructor Details
-
ChatBroadcast
normal constructor for this type of objects- Parameters:
g
- the server object that is handling the gamei
- the index of the client that this thread is listening to
-
-
Method Details