openlsd.network.server
Class LSDServer

java.lang.Object
  extended by openlsd.network.server.LSDServer

public class LSDServer
extends java.lang.Object

Main body for the Server part

Author:
Frederic Bregier LGPL

Field Summary
protected static boolean isUp
          Status if the server is still up
protected static java.util.concurrent.ConcurrentHashMap<java.lang.Long,LSDLegacy> LegacyHMap
          Map for all Legacy defined in the config file
protected static LSDServerInstance[] LSI
          ServerInstances Admin(0),User(1),UserComp(2),Protected(3)
static LSDServerHttpIoHandler serverHttpIoHandler
          HTTP Service
protected static boolean shutdown
          Status if the server is globally going down
 
Method Summary
static boolean isAdminRunning()
          Get the status of the Admin server
static boolean isPasswdAdmin(java.lang.String passwd)
          Check the password for Admin
static boolean isPasswdProtected(java.lang.String passwd)
          Check the password for Protected
static boolean isProtectedRunning()
          Get the status of the Protected server
static boolean isUserCompRunning()
          Get the status of the User server with compression
static boolean isUserRunning()
          Get the status of the User server
static void main(java.lang.String[] args)
          Main body : read the XML config file, then starts the servers
protected static boolean startProtected()
          Start the Server for Protected
protected static boolean startUser()
          Start the Server for User without compression
protected static boolean startUserComp()
          Start the Server for User with compression
protected static void stopAdmin(boolean wait)
          Stop the Server for Admin
protected static void stopProtected(boolean wait)
          Stop the Server for Protected
protected static void stopUser(boolean wait)
          Stop the Server for User without compression
protected static void stopUserComp(boolean wait)
          Stop the Server for User with compression
static void terminate()
          Terminate in case of Signal or Big error !
static void terminate(boolean exit)
          Terminate in case of Signal or Big error !
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LSI

protected static LSDServerInstance[] LSI
ServerInstances Admin(0),User(1),UserComp(2),Protected(3)


LegacyHMap

protected static final java.util.concurrent.ConcurrentHashMap<java.lang.Long,LSDLegacy> LegacyHMap
Map for all Legacy defined in the config file


shutdown

protected static boolean shutdown
Status if the server is globally going down


isUp

protected static boolean isUp
Status if the server is still up


serverHttpIoHandler

public static LSDServerHttpIoHandler serverHttpIoHandler
HTTP Service

Method Detail

main

public static void main(java.lang.String[] args)
Main body : read the XML config file, then starts the servers

Parameters:
args - is the filename of the XML config file

terminate

public static void terminate(boolean exit)
Terminate in case of Signal or Big error !

Parameters:
exit - If True, will call System.exit

terminate

public static void terminate()
Terminate in case of Signal or Big error !


startUser

protected static boolean startUser()
Start the Server for User without compression

Returns:
True if OK, else False

startUserComp

protected static boolean startUserComp()
Start the Server for User with compression

Returns:
True if OK, else False

startProtected

protected static boolean startProtected()
Start the Server for Protected

Returns:
True if OK, else False

stopUser

protected static void stopUser(boolean wait)
Stop the Server for User without compression

Parameters:
wait - boolean to decide if the Server stop should wait on session already connected to finished normally or not.

stopUserComp

protected static void stopUserComp(boolean wait)
Stop the Server for User with compression

Parameters:
wait - boolean to decide if the Server stop should wait on session already connected to finished normally or not.

stopProtected

protected static void stopProtected(boolean wait)
Stop the Server for Protected

Parameters:
wait - boolean to decide if the Server stop should wait on session already connected to finished normally or not.

stopAdmin

protected static void stopAdmin(boolean wait)
Stop the Server for Admin

Parameters:
wait - boolean to decide if the Server stop should wait on session already connected to finished normally or not.

isAdminRunning

public static boolean isAdminRunning()
Get the status of the Admin server

Returns:
the status of the Admin server

isUserRunning

public static boolean isUserRunning()
Get the status of the User server

Returns:
the status of the User server

isUserCompRunning

public static boolean isUserCompRunning()
Get the status of the User server with compression

Returns:
the status of the User with compression server

isProtectedRunning

public static boolean isProtectedRunning()
Get the status of the Protected server

Returns:
the status of the Protected server

isPasswdAdmin

public static boolean isPasswdAdmin(java.lang.String passwd)
Check the password for Admin

Parameters:
passwd -
Returns:
if the password is ok

isPasswdProtected

public static boolean isPasswdProtected(java.lang.String passwd)
Check the password for Protected

Parameters:
passwd -
Returns:
if the password is ok