com.elvyx.server
Class Elvyx

java.lang.Object
  extended by java.lang.Thread
      extended by com.elvyx.server.Server
          extended by com.elvyx.server.Elvyx
All Implemented Interfaces:
java.lang.Runnable

public class Elvyx
extends Server

Elvyx server. This server receive the commands from elvyx and store data received into hsqldb.

Since:
1.0
Version:
$Revision: 1.5 $
Author:
Armando Perdomo

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class com.elvyx.server.Server
properties
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void changeDao(DatabaseType database)
          Change DAO
static java.lang.Integer getClientId()
          TODO: Why client id
static Dao getDao()
          Return the DAO reference
static java.lang.Long getElvyxId()
          Return the server id
 ElvyxState getElvyxState()
          Return the elvyx state.
static Elvyx getInstance()
          Return the elvyx reference
static void main(java.lang.String[] args)
          Run the elvyx server.
 void setId(java.lang.Long id)
          Set id.
 void startServer()
          Start the elvyx server
 void stopServer(java.lang.Long id)
          Stop the elvyx server.
 void stopServer(java.lang.String host, java.lang.Integer port, java.lang.Long id)
          Stop the elvyx server.
 
Methods inherited from class com.elvyx.server.Server
close, getPort, getServerSocket, init, loadProperties, processRequest, run, saveProperties, sendStop, setPort
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Method Detail

getInstance

public static Elvyx getInstance()
Return the elvyx reference

Returns:

getDao

public static Dao getDao()
Return the DAO reference

Returns:

getClientId

public static java.lang.Integer getClientId()
TODO: Why client id

Returns:

startServer

public void startServer()
                 throws java.sql.SQLException,
                        java.io.IOException
Start the elvyx server

Throws:
java.sql.SQLException
java.io.IOException

stopServer

public void stopServer(java.lang.String host,
                       java.lang.Integer port,
                       java.lang.Long id)
                throws java.sql.SQLException
Stop the elvyx server. It send a command STP to this server.

Throws:
java.sql.SQLException

stopServer

public void stopServer(java.lang.Long id)
                throws java.sql.SQLException
Stop the elvyx server. It send a command STP to this server.

Throws:
java.sql.SQLException

changeDao

public void changeDao(DatabaseType database)
               throws java.io.IOException,
                      java.sql.SQLException
Change DAO

Parameters:
DatabaseType -
Throws:
java.io.IOException
java.sql.SQLException

getElvyxState

public ElvyxState getElvyxState()
Return the elvyx state. If the server is running, stopped, etc


getElvyxId

public static java.lang.Long getElvyxId()
Return the server id


setId

public void setId(java.lang.Long id)
Set id. It allows take the server control


main

public static void main(java.lang.String[] args)
Run the elvyx server.

Parameters:
args - The arguments could be start: start Start the server stop Stop the server restart restart the server


Copyright © 2006-2008 Armando Perdomo. All Rights Reserved.