iiitAccessServer 1.0

de.iiit.access.server.plugins.server
Class TcpServer

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--de.iiit.access.server.plugins.server.TcpServer
All Implemented Interfaces:
AccessServerPluginIf, Runnable, ThreadPluginIf

public class TcpServer
extends Thread
implements ThreadPluginIf

Implements a TCP/IP server for requesting the AccessServer

Version:
$Revision: 1.14 $ $Date: 2003/04/14 20:41:41 $

Nested Class Summary
 class TcpServer.TcpHandler
          Implements the handler for each established connection.
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TcpServer()
          Creates a new instance of TcpServer
 
Method Summary
 void initialize(Configuration config)
          Initializes the server
 void run()
          The main method of the thread.
 void shutdown()
          This method is called by the AccessServer when the background threads should stop because of a shutdown of the AccessServer itself.
 
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
 
Methods inherited from interface de.iiit.access.server.api.ThreadPluginIf
start
 

Constructor Detail

TcpServer

public TcpServer()
Creates a new instance of TcpServer

Method Detail

initialize

public void initialize(Configuration config)
Initializes the server

Specified by:
initialize in interface AccessServerPluginIf
Parameters:
config - the configuration of the server. Currently the only parameter is Port which defines the port number to listen on for connections. Default is 1234

run

public void run()
The main method of the thread. It is called by the Java runtime environment. This method waits for new connections and creates an instance of the inner class TcpHandler for each new one.

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

shutdown

public void shutdown()
This method is called by the AccessServer when the background threads should stop because of a shutdown of the AccessServer itself.

Specified by:
shutdown in interface ThreadPluginIf

iiitAccessServer 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement