com.xfactorstudio.ahawasi
Class Ahawasi

java.lang.Object
  |
  +--com.xfactorstudio.ahawasi.Ahawasi

public class Ahawasi
extends java.lang.Object

The main class of the Ahawasi server

Version:
.91
Author:
Neeld Tanksley

Constructor Summary
Ahawasi()
           
Ahawasi(java.lang.String confDir)
           
 
Method Summary
 java.lang.String getAuthor()
          return the author
 java.util.Vector getClosedServiceConfigs()
          return a list of closed services
 boolean getDebug()
          returns true if screen debugging is on, else false
 LogOutputStream getLogOutputStream(java.lang.String logDir, java.lang.String fileName)
          This method Creates the log if it does not exist
 java.util.Hashtable getServerVariables()
          return the serverVariable Vector
 SocketService getService(int port)
          returns the service running on the given port number
 ServiceList getServiceList()
          returns a ServiceList of current services
 int getServiceListPort()
          returns the current service list port
 java.lang.String getVersion()
          return the version of the server
static void main(java.lang.String[] args)
           
 void printDebugg(java.lang.String message)
          This method prints dubugg messages to the console
 void removeClient(int userId)
          Removes the client identified by userId
 void restartServiceListServer()
          restarts the service list server
 boolean serviceExists(int port)
          If a Service is currently running on the specified port this returns true, if not, false.
 void setClosedServiceConfigs(XMLElement serviceConf)
          add the Service config XML to the list of closed rooms
 void setDebug(boolean debug)
          set state of debugging
 void setServiceConfigs(java.util.Vector serviceConfigs)
          set service configs
 void setServiceListPort(int serviceListPort)
          set the port for service list to run on
 void shutDown()
           
 void startService(XMLElement confXML)
          starts a new Service Thread as defined by the configuration XML
 void startServiceListServer()
          This method starts the service list server
 void stopService(int port)
          Closes a service on the specified port
 void stopServiceListServer()
          closes the service list server
 void stopServices()
          Closes all services
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ahawasi

public Ahawasi()

Ahawasi

public Ahawasi(java.lang.String confDir)
Method Detail

main

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

getLogOutputStream

public LogOutputStream getLogOutputStream(java.lang.String logDir,
                                          java.lang.String fileName)
This method Creates the log if it does not exist

startServiceListServer

public void startServiceListServer()
This method starts the service list server

stopServiceListServer

public void stopServiceListServer()
closes the service list server

restartServiceListServer

public void restartServiceListServer()
restarts the service list server

startService

public void startService(XMLElement confXML)
starts a new Service Thread as defined by the configuration XML

getService

public SocketService getService(int port)
returns the service running on the given port number

stopService

public void stopService(int port)
Closes a service on the specified port

printDebugg

public void printDebugg(java.lang.String message)
This method prints dubugg messages to the console

serviceExists

public boolean serviceExists(int port)
If a Service is currently running on the specified port this returns true, if not, false.

removeClient

public void removeClient(int userId)
Removes the client identified by userId
Parameters:
userId - the ID of the client as available from ClientThread.getUserId

getVersion

public java.lang.String getVersion()
return the version of the server

getAuthor

public java.lang.String getAuthor()
return the author

getDebug

public boolean getDebug()
returns true if screen debugging is on, else false

getServiceListPort

public int getServiceListPort()
returns the current service list port

setServiceListPort

public void setServiceListPort(int serviceListPort)
set the port for service list to run on

getServiceList

public ServiceList getServiceList()
returns a ServiceList of current services

setDebug

public void setDebug(boolean debug)
set state of debugging

setServiceConfigs

public void setServiceConfigs(java.util.Vector serviceConfigs)
set service configs

getServerVariables

public java.util.Hashtable getServerVariables()
return the serverVariable Vector

setClosedServiceConfigs

public void setClosedServiceConfigs(XMLElement serviceConf)
add the Service config XML to the list of closed rooms

getClosedServiceConfigs

public java.util.Vector getClosedServiceConfigs()
return a list of closed services

shutDown

public void shutDown()

stopServices

public void stopServices()
Closes all services