|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.radekzitek.userver.UServer
Main class of the UServer framework. When run it loads the configuration (from its default location bin/userver.properties for the time being). It creates the HandlerPool, based on the configuration instantiates all thge listeners and after that starts all the listeners as a threads. Ant that's where the job of the class finishes.
| Field Summary | |
private Configuration |
cfg
Configuration object. |
(package private) HandlerPool |
hp
HandlerPool object. |
(package private) java.util.Hashtable |
listeners
Repository for the listeners. |
private static org.apache.log4j.Logger |
LOG
Log4j logger. |
| Constructor Summary | |
UServer()
Default constructor. |
|
| Method Summary | |
private ListenerThread |
createListener(java.lang.String name)
Creates (instantoates and configures) the listeners. |
static void |
main(java.lang.String[] args)
Entry point for the execution. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final org.apache.log4j.Logger LOG
private Configuration cfg
HandlerPool hp
java.util.Hashtable listeners
| Constructor Detail |
public UServer()
throws java.io.FileNotFoundException,
java.io.IOException,
ListenerConfigurationException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassNotFoundException
java.io.FileNotFoundException - Thrown when the configuartion file can not be found.
java.io.IOException - Thrown when there is problem reading configuartion file.
java.lang.InstantiationException - Thrown when there is a poroblem instantiating the listener
class.
java.lang.IllegalAccessException - Thrown when there is a poroblem instantiating the listener
class.
java.lang.ClassNotFoundException - Thrown when the class for the listener to be instantiated can
not be found.
ListenerConfigurationException - Thrown by the implementing class in case of problems with
configuration.| Method Detail |
private ListenerThread createListener(java.lang.String name)
throws ListenerConfigurationException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassNotFoundException
name - the name of the listener to be created
java.io.IOException - Thrown when there is problem reading configuartion file.
java.lang.InstantiationException - Thrown when there is a poroblem instantiating the listener
class.
java.lang.IllegalAccessException - Thrown when there is a poroblem instantiating the listener
class.
java.lang.ClassNotFoundException - Thrown when the class for the listener to be instantiated can
not be found.
ListenerConfigurationException - Thrown by the implementing class in case of problems with
configuration.public static void main(java.lang.String[] args)
args - command line arguments
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||