org.exolab.core.mipc
Class MultiplexSSLConnectionServer

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.exolab.core.mipc.MultiplexSSLConnectionServer
All Implemented Interfaces:
MultiplexConnectionServerIfc, java.lang.Runnable

public class MultiplexSSLConnectionServer
extends java.lang.Thread
implements MultiplexConnectionServerIfc

Create a listener SSL socket and wait for requests to come in. When a MultiplexConnection is made, a client is notified so that it can initialize channels on the freshly minted MultiplexConnection. This class derives from Thread and is meant to be spawned off as a separate Thread.

Version:
$Revision: 1.7 $
Author:
Jim Mourikis
See Also:
MultiplexSSLConnection

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MultiplexSSLConnectionServer(int port, ConnectionNotifierIfc notifier)
          Creates a new MultiplexSSLConnectionServer that sets up a listener port and adds a notifier to call with all new connections.
 
Method Summary
 java.lang.String getHost()
          Return the machines address.
 int getPort()
          Return the port number this server is listening on.
 void run()
          Start the service running.
 void shutdownAll()
          Shutdown all active connections, including the server connection.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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
 

Constructor Detail

MultiplexSSLConnectionServer

public MultiplexSSLConnectionServer(int port,
                                    ConnectionNotifierIfc notifier)
                             throws java.io.IOException
Creates a new MultiplexSSLConnectionServer that sets up a listener port and adds a notifier to call with all new connections.

Parameters:
port - the port to connect on
notifier - the client to handle the call when a new connection is made
Method Detail

run

public void run()
Start the service running. This call never returns until the service is shutdown. When a connection is made, a new MultiplexConnection is created and spawned off as a separate thread. The new threads are created in the ThreadGroup _connections so that we can keep track of the active threads.

Specified by:
run in interface MultiplexConnectionServerIfc

shutdownAll

public void shutdownAll()
                 throws java.io.IOException
Shutdown all active connections, including the server connection.

Specified by:
shutdownAll in interface MultiplexConnectionServerIfc
Throws:
java.io.IOException - if the service reports an error during shutdown.

getPort

public int getPort()
Return the port number this server is listening on.

Specified by:
getPort in interface MultiplexConnectionServerIfc
Returns:
the port number the server is using

getHost

public java.lang.String getHost()
Return the machines address.

Specified by:
getHost in interface MultiplexConnectionServerIfc
Returns:
the machines IP address.


Copyright © 1999-2005 The Exolab Group. All Rights Reserved.