|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
org.objectweb.cjdbc.controller.core.ControllerFactory
The ControllerFactory class prepares a Controller
object by configurating ports, security, loaded databases.
| Nested Class Summary |
| Nested classes inherited from class java.util.Hashtable |
|
| Field Summary | |
static java.lang.String |
ADD_DRIVER_ENABLE
Add driver enable |
private Controller |
controller
|
static java.lang.String |
CONTROLLER_BACKLOG
The controller backlog size |
static java.lang.String |
CONTROLLER_IP
The NIC IP address to bind the controller to |
static java.lang.String |
CONTROLLER_PORT
The controller port number |
static java.lang.String |
JMX_ENABLE
The jmx enable value |
static java.lang.String |
JMX_PORT
The jmx port value |
(package private) static Trace |
logger
Logger instance. |
static java.lang.String |
RMI_PORT
The Rmi port value |
static java.lang.String |
XML_FILE
The xml file possibly used to configure controller |
| Fields inherited from class java.util.Hashtable |
|
| Constructor Summary | |
ControllerFactory(java.lang.String[] args)
Configure the controller with parameters |
|
| Method Summary | |
private static org.apache.commons.cli.Options |
createOptions()
Creates Options object that contains all available options
that can be used launching C-JDBC controller. |
Controller |
getController()
Retrieve the controller associated with this ControllerFactory
instance. |
private static void |
printUsage(org.apache.commons.cli.Options options)
Displays usage message. |
private Controller |
setup()
Test if there is a file to take configuration from, if so call |
void |
setUpByXml(java.lang.String filename)
This method is going to call a ControllerParser object to
configure controller while parsing file. |
void |
setUpJmx()
Start up the jmx services if enabled. |
void |
setUpSecurity(ControllerSecurityManager security)
Set up security settings if needed here. |
void |
setUpVirtualDatabase(java.lang.String filePath,
java.lang.String virtualName,
int autoLoad,
java.lang.String checkPoint)
Will load the VirtualDatabase configuration into the
controller. |
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String RMI_PORT
public static final java.lang.String JMX_PORT
public static final java.lang.String JMX_ENABLE
public static final java.lang.String XML_FILE
public static final java.lang.String CONTROLLER_IP
public static final java.lang.String CONTROLLER_PORT
public static final java.lang.String CONTROLLER_BACKLOG
public static final java.lang.String ADD_DRIVER_ENABLE
static Trace logger
private Controller controller
| Constructor Detail |
public ControllerFactory(java.lang.String[] args)
args - parameters from the command line| Method Detail |
public void setUpByXml(java.lang.String filename)
throws java.lang.Exception
ControllerParser object to
configure controller while parsing file. This method will call
filename - path to the xml file to parse from
java.lang.Exception - if configuration fails
private Controller setup()
throws java.lang.Exception
Controller
java.lang.Exception - if configuration fails
public Controller getController()
throws java.lang.Exception
ControllerFactory
instance.
Controller object. Can be null if this method is
called before setup
java.lang.Exception - if an error occurs
public void setUpJmx()
throws JmxException
JmxException - an exceptionpublic void setUpSecurity(ControllerSecurityManager security)
security - to enforce
public void setUpVirtualDatabase(java.lang.String filePath,
java.lang.String virtualName,
int autoLoad,
java.lang.String checkPoint)
VirtualDatabase configuration into the
controller.
filePath - the path to xml definition of the virtual databasevirtualName - the name of the virtualDatabase to loadautoLoad - specified if backend should be enabled.checkPoint - the check point to load the database from.private static void printUsage(org.apache.commons.cli.Options options)
options - available command line optionsprivate static org.apache.commons.cli.Options createOptions()
Options object that contains all available options
that can be used launching C-JDBC controller.
Options instance
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||