org.mbari.siam.tests.utils.osdt
Class OSDTTestServer

java.lang.Object
  extended by org.mbari.siam.utils.TCPServer
      extended by org.mbari.siam.tests.utils.osdt.OSDTTestServer

public class OSDTTestServer
extends TCPServer


Nested Class Summary
 class OSDTTestServer.ChannelSpec
           
 class OSDTTestServer.ListenerWorker
           
 
Nested classes/interfaces inherited from class org.mbari.siam.utils.TCPServer
TCPServer.ConnectionWorker
 
Field Summary
protected static org.apache.log4j.Logger _log4j
           
 
Fields inherited from class org.mbari.siam.utils.TCPServer
_isConnected, _protocol, _socketTimeoutMillisec, _tcpPort
 
Constructor Summary
OSDTTestServer()
           
OSDTTestServer(java.lang.String[] args)
           
 
Method Summary
 void addChannel(OSDTTestServer.ChannelSpec channel)
           
 void configure(java.lang.String[] args)
          Configure settings from command line (and possibly from properties file)
 void configure(java.lang.String sourceName, int serverPort, java.lang.String osdtServer, java.lang.String propertiesFile, java.util.Vector channels)
          Configure all settings (interface for to create server programatically) To use defaults set to null (or <0 for serverPort)
 void connect()
           
 java.util.Vector getChannels()
           
 OSDTTestWorker getWorker(int channelNumber)
           
 OSDTTestWorker getWorker(java.lang.String workerName)
           
 void loadConfiguration(java.lang.String propertiesFile)
          Configure all settings from properties file
static void main(java.lang.String[] args)
           
protected  OSDTTestServer.ChannelSpec parseChannel(java.lang.String channelString)
           
 void printHelp()
           
 void shutdown()
           
 void startSource()
           
 void startWorkers()
           
 
Methods inherited from class org.mbari.siam.utils.TCPServer
isConnected, listen, quit, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j
Constructor Detail

OSDTTestServer

public OSDTTestServer()

OSDTTestServer

public OSDTTestServer(java.lang.String[] args)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

connect

public void connect()
             throws java.lang.Exception
Throws:
java.lang.Exception

addChannel

public void addChannel(OSDTTestServer.ChannelSpec channel)

startSource

public void startSource()
                 throws java.lang.Exception
Throws:
java.lang.Exception

startWorkers

public void startWorkers()
                  throws java.lang.Exception
Throws:
java.lang.Exception

getWorker

public OSDTTestWorker getWorker(java.lang.String workerName)

getWorker

public OSDTTestWorker getWorker(int channelNumber)

shutdown

public void shutdown()

parseChannel

protected OSDTTestServer.ChannelSpec parseChannel(java.lang.String channelString)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

printHelp

public void printHelp()

configure

public void configure(java.lang.String sourceName,
                      int serverPort,
                      java.lang.String osdtServer,
                      java.lang.String propertiesFile,
                      java.util.Vector channels)
               throws java.lang.Exception
Configure all settings (interface for to create server programatically) To use defaults set to null (or <0 for serverPort)

Throws:
java.lang.Exception

loadConfiguration

public void loadConfiguration(java.lang.String propertiesFile)
                       throws java.io.FileNotFoundException,
                              java.io.IOException,
                              java.lang.Exception
Configure all settings from properties file

Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.Exception

getChannels

public java.util.Vector getChannels()

configure

public void configure(java.lang.String[] args)
               throws java.lang.Exception
Configure settings from command line (and possibly from properties file)

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.