org.jivesoftware.openfire.net
Class SocketAcceptThread
java.lang.Object
java.lang.Thread
org.jivesoftware.openfire.net.SocketAcceptThread
- All Implemented Interfaces:
- Runnable
public class SocketAcceptThread
- extends Thread
Implements a network front end with a dedicated thread reading
each incoming socket. Blocking and non-blocking modes are supported.
By default blocking mode is used. Use the xmpp.socket.blocking
system property to change the blocking mode. Restart the server after making
changes to the system property.
- Author:
- Gaston Dombiak
Method Summary |
int |
getPort()
Retrieve the port this server socket is bound to. |
ServerPort |
getServerPort()
Returns information about the port on which the server is listening for connections. |
void |
run()
About as simple as it gets. |
void |
shutdown()
Unblock the thread and force it to terminate. |
Methods inherited from class java.lang.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 |
SocketAcceptThread
public SocketAcceptThread(ConnectionManager connManager,
ServerPort serverPort)
throws IOException
- Throws:
IOException
getPort
public int getPort()
- Retrieve the port this server socket is bound to.
- Returns:
- the port the socket is bound to.
getServerPort
public ServerPort getServerPort()
- Returns information about the port on which the server is listening for connections.
- Returns:
- information about the port on which the server is listening for connections.
shutdown
public void shutdown()
- Unblock the thread and force it to terminate.
run
public void run()
- About as simple as it gets. The thread spins around an accept
call getting sockets and handing them to the SocketManager.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Copyright © 2003-2008 Jive Software.