public class JCSStarterServer
extends java.lang.Object
I am trying to abstract and unify the different code/methods that I've been using in the multiple classes that include the main( String[] ) method to execute the system
Modifier and Type | Field and Description |
---|---|
private java.net.URL |
configURL |
private LauncherServer |
launcher
Server launcher
|
private java.util.logging.Logger |
logger |
private org.sistema.cs.IJCSServer |
server
Server instance.
|
Constructor and Description |
---|
JCSStarterServer(java.util.logging.Logger l,
java.net.URL u) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkProperties(java.lang.String n)
Determines the path of the properties file.
|
void |
initUI() |
boolean |
loadProperties(java.lang.String configFile)
Loads properties from a standard properties file.
|
void |
start(org.sistema.cs.launch.ConfigLoader l)
Starts the system based on the
configuration file provided by a loader.
|
void |
start(org.sistema.cs.launch.ConfigLoader l,
org.sistema.cs.IJCSServer s)
Starts a server with a configuration based
on the configuration file provided by a loader.
|
org.sistema.cs.IJCSServer |
startRMIRelative()
Starts a
ServerRMI instance
using a configuration file
in a location relative to the class path. |
void |
updateUI() |
private final java.net.URL configURL
private LauncherServer launcher
private final java.util.logging.Logger logger
private org.sistema.cs.IJCSServer server
public JCSStarterServer(java.util.logging.Logger l, java.net.URL u)
l
- loggeru
- location of configuration fileprotected boolean checkProperties(java.lang.String n)
n
- name of the properties file.true
if the properties file is valid,
false
otherwise.public void initUI()
public void updateUI()
public boolean loadProperties(java.lang.String configFile)
configFile
- public void start(org.sistema.cs.launch.ConfigLoader l)
l
- validated configuration loaderpublic void start(org.sistema.cs.launch.ConfigLoader l, org.sistema.cs.IJCSServer s)
l
- validated configuration loaders
- server instance configured according to
the file proviced by l
public org.sistema.cs.IJCSServer startRMIRelative()
ServerRMI
instance
using a configuration file
in a location relative to the class path.