Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
Listener(int port,
Service service)
Creates a listener thread on the specified port
for the specified service to run.
|
Listener(ServerSocket serverSocket,
Service service)
Creates a listener thread on the specified server socket
for the specified service to run.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addConnection(Socket conn) |
void |
removeConnection(Socket conn) |
void |
run()
Loops waiting for connection requests from client,
creates a new Connection object for each connection.
|
void |
stopListener()
Halts running of the listener 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, toString, yield
public Listener(int port, Service service) throws IOException
IOException
public Listener(ServerSocket serverSocket, Service service) throws IOException
IOException
public void run()
public boolean addConnection(Socket conn)
public void removeConnection(Socket conn)
public void stopListener()
Copyright © 2021 JBoss by Red Hat. All rights reserved.