Wildfire 3.1.1 Javadoc

org.jivesoftware.wildfire.net
Class SSLSocketAcceptThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.jivesoftware.wildfire.net.SSLSocketAcceptThread
All Implemented Interfaces:
Runnable

public class SSLSocketAcceptThread
extends Thread

Implements a network front end with a dedicated thread reading each incoming socket. The old SSL method always uses a blocking model.

Author:
Gaston Dombiak

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int DEFAULT_PORT
          The default Jabber socket
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SSLSocketAcceptThread(ConnectionManager connManager, ServerPort serverPort)
          Creates an instance using the default port, TLS transport security, and JVM defaults for all security settings.
 
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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
The default Jabber socket

See Also:
Constant Field Values
Constructor Detail

SSLSocketAcceptThread

public SSLSocketAcceptThread(ConnectionManager connManager,
                             ServerPort serverPort)
                      throws IOException
Creates an instance using the default port, TLS transport security, and JVM defaults for all security settings.

Parameters:
connManager - the connection manager that will manage connections generated by this thread
Throws:
IOException - if there was trouble initializing the SSL configuration.
Method Detail

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. We need to detect run away failures since an SSL configuration problem can cause the loop to spin, constantly rethrowing SSLExceptions (e.g. if a certificate is in the keystore that can't be verified).

Specified by:
run in interface Runnable
Overrides:
run in class Thread

Wildfire 3.1.1 Javadoc

Copyright © 2003-2006 Jive Software.