public class JCSServer
extends org.sistema.cs.JCSAbstract
implements org.sistema.cs.IJCSServer
Extends PersistentService
as a temporal hack
allowing replacing calls to PeerMananger.getObjects()
with calls to Server.getObjects() in client code,
easing transition to the client-server architecture.
(24-aug-2010 by Juan)
Modifier and Type | Field and Description |
---|---|
protected boolean |
connectedDb
Determine if the server instance is connected to the database.
|
Constructor and Description |
---|
JCSServer(java.lang.String i,
java.util.logging.Logger l) |
Modifier and Type | Method and Description |
---|---|
boolean |
connect(org.sistema.cs.launch.Credential c) |
boolean |
disconnect() |
protected boolean |
doConnect(org.sistema.cs.launch.Credential c,
org.sistema.cs.persist.PersistModule m)
connects the persisten module
|
java.util.Collection<java.lang.String> |
getPropertyValues(java.lang.String name)
Builds a collection the values
from a given property from modules where it is defined
|
java.lang.Object |
getService(java.lang.String name) |
void |
initModules() |
boolean |
loadJDBCDriver(java.lang.String name)
Loads a JDBC drivers
|
boolean |
loadJDBCDrivers(java.util.Collection<java.lang.String> c)
Loads the JDBC drivers required by modules.
|
addModule, addModules, buildMenu, buildModules, clear, getId, getModule, getModule, getModules, init, loadBundles, loadModules, logCantLoadModule, parseModules, readBundleNames, readMenus, run, setConfigLoader, toString
protected boolean connectedDb
public boolean connect(org.sistema.cs.launch.Credential c) throws java.lang.Exception
connect
in interface org.sistema.cs.IJCS
java.lang.Exception
public boolean disconnect()
disconnect
in interface org.sistema.cs.IJCSServer
protected boolean doConnect(org.sistema.cs.launch.Credential c, org.sistema.cs.persist.PersistModule m) throws java.lang.Exception
c
- credentialsm
- persistent modulejava.lang.Exception
public java.util.Collection<java.lang.String> getPropertyValues(java.lang.String name)
name
- The name of the propertypublic java.lang.Object getService(java.lang.String name)
getService
in interface org.sistema.cs.IJCSServer
public void initModules()
initModules
in interface org.sistema.cs.IJCS
initModules
in class org.sistema.cs.JCSAbstract
public boolean loadJDBCDriver(java.lang.String name)
name
- public boolean loadJDBCDrivers(java.util.Collection<java.lang.String> c)
c
- collection with class names of drivers to be loaded