Java Doc for Controller.java in  » Database-JDBC-Connection-Pool » sequoia-2.10.9 » org » continuent » sequoia » controller » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » sequoia 2.10.9 » org.continuent.sequoia.controller.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.continuent.sequoia.controller.core.Controller

Controller
final public class Controller implements XmlComponent(Code)
The Sequoia controller main class. It loads its configuration file and wait for virtual database to be loaded.
author:
   Emmanuel Cecchet
author:
   Mathieu Peltier
author:
   Nicolas Modrzyk
author:
   Duncan Smith
version:
   1.0


Field Summary
static  TraceendUserLogger
    
static  Tracelogger
     Logger instances.
protected  NotificationBroadcasterSupportnotificationBroadcasterSupport
    
protected  intnotificationSequence
    

Constructor Summary
public  Controller(String ipAddress, int port, int backlog)
     Creates a new Controller instance.

Method Summary
public  voidaddDriver(byte[] bytes)
    
public  voidaddVirtualDatabase(VirtualDatabase vdb)
     Registers a new VirtualDatabase in this controller.
public synchronized  voidaddVirtualDatabase(VirtualDatabase vdb, int autoLoad, String checkPoint)
    
public  voidaddVirtualDatabases(String xml, String vdbName, int autoEnable, String checkpoint)
     Adds virtual databases contained in the XML document given as a String.
public  voidaddVirtualDatabases(String xml)
    
public  voidendOfController(Exception fatal)
    
public  voidgenerateReport()
    
public  intgetBacklogSize()
    
public  HashtablegetConfiguration()
    
public  ControllerServerThreadgetConnectionThread()
     Access the connection thread.
public  StringgetControllerName()
     Returns the controller name.
public  StringgetIPAddress()
    
public  booleangetJmxEnable()
    
public  StringgetJmxName()
    
public  intgetPortNumber()
    
public  ReportManagergetReport()
     Returns the report value.
public  ControllerSecurityManagergetSecurity()
    
public static  StringgetVersion()
    
public  StringgetVersionNumber()
    
public  VirtualDatabasegetVirtualDatabase(String virtualDatabaseName)
     Gets the VirtualDatabase object corresponding to a virtual database name.
public  ArrayListgetVirtualDatabaseNames()
    
public  ArrayListgetVirtualDatabases()
     Returns information about the available virtual databases.
public  StringgetXml()
    
public  StringgetXmlController()
     Return the xml version of the controller.xml file without doc type declaration, just data.
public  StringgetXmlVirtualDatabases()
     Same as above but for the virtual databases.
public  booleanhasVirtualDatabase(String name)
     Tests if a VirtualDatabase of a given name exists in this controller.
public  booleanisSecurityEnabled()
    
public  booleanisShuttingDown()
    
public  voidlaunch()
     Actively launch the controller.
public  StringloadXmlConfiguration(String filename, String virtualName, int autoLoad, String checkPoint)
     Read a XML configuration file and load only the VirtualDatabase specified in the arguments list
Parameters:
  filename - XML configuration file name to take info onVirtualDatabase
Parameters:
  virtualName - the only database to load, null if should load all
Parameters:
  autoLoad - specifies if the backends should be enabled automaticallyafter loading
Parameters:
  checkPoint - checkPoint to recover from when enabling backends.
public static  voidmain(String[] args)
     Launches the Sequoia controller.
public  voidrefreshLogConfiguration()
    
public  StringremoveVirtualDatabase(String virtualname)
    
public  StringsaveConfiguration()
    
protected  voidsendJmxNotification(String type, String message)
    
public  voidsetBacklogSize(int size)
    
public  voidsetConfiguration(Hashtable configuration)
     Sets the configuration value.
public  voidsetIPAddress(String ipAddress)
    
public  voidsetJmxEnable(boolean enable)
    
public  voidsetNotificationBroadcasterSupport(NotificationBroadcasterSupport notificationBroadcasterSupport)
     Sets the NotificationBroadcasterSupport associated with the MBean managing this controller.
public  voidsetPortNumber(int port)
     Set the controller backlog size.
public  voidsetReport(ReportManager report)
     Sets the report value.
public  voidsetSecurity(ControllerSecurityManager security)
    
public  voidshutdown()
    
public  voidupdateLogConfigurationFile(String newConfiguration)
    
public  StringviewLogConfigurationFile()
    

Field Detail
endUserLogger
static Trace endUserLogger(Code)



logger
static Trace logger(Code)
Logger instances.



notificationBroadcasterSupport
protected NotificationBroadcasterSupport notificationBroadcasterSupport(Code)



notificationSequence
protected int notificationSequence(Code)




Constructor Detail
Controller
public Controller(String ipAddress, int port, int backlog)(Code)
Creates a new Controller instance.
Parameters:
  ipAddress - bind the controller to this ipAddress
Parameters:
  port - bind the controller to listen to this port
Parameters:
  backlog - backlog connection size




Method Detail
addDriver
public void addDriver(byte[] bytes) throws Exception(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.addDriver(byte[])



addVirtualDatabase
public void addVirtualDatabase(VirtualDatabase vdb) throws ControllerException(Code)
Registers a new VirtualDatabase in this controller.
Parameters:
  vdb - the VirtualDatabase to register
throws:
  ControllerException - if an error occurs



addVirtualDatabase
public synchronized void addVirtualDatabase(VirtualDatabase vdb, int autoLoad, String checkPoint) throws ControllerException(Code)
Add the virtual database with the specified options
Parameters:
  vdb - the VirtualDatabase object to add
Parameters:
  autoLoad - specified if backends should be enabled
Parameters:
  checkPoint - specified the checkPoint to recover from, leave null ifno recovery speficied
throws:
  ControllerException - if database already exists on the specifiedController object



addVirtualDatabases
public void addVirtualDatabases(String xml, String vdbName, int autoEnable, String checkpoint) throws ControllerException(Code)
Adds virtual databases contained in the XML document given as a String. If a virtual database name is provided, only this database is loaded with the provided autoLoad and checkpoint information.
Parameters:
  xml - XML configuration file content
Parameters:
  vdbName - optional virtual database name to autoload
Parameters:
  autoEnable - autoenable backend mode for virtual database (or init)
Parameters:
  checkpoint - checkpoint name if autoEnable is set to force
throws:
  ControllerException - if an error occurs



addVirtualDatabases
public void addVirtualDatabases(String xml) throws ControllerException(Code)
Register a VirtualDatabase with default options
See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.addVirtualDatabases(String)



endOfController
public void endOfController(Exception fatal)(Code)
Create report about fatal error
Parameters:
  fatal - the cause of the fatal error



generateReport
public void generateReport() throws Exception(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.generateReport



getBacklogSize
public int getBacklogSize()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.getBacklogSize



getConfiguration
public Hashtable getConfiguration()(Code)
Get current configuration options configure a Hashtable with controller options



getConnectionThread
public ControllerServerThread getConnectionThread()(Code)
Access the connection thread. Need this for shutting down connectionThread



getControllerName
public String getControllerName()(Code)
Returns the controller name. String



getIPAddress
public String getIPAddress()(Code)
Get the IP address to bind the controller to the IP address



getJmxEnable
public boolean getJmxEnable()(Code)
Returns jmx enable jmxEnabled



getJmxName
public String getJmxName()(Code)
Return the jmx name of this controller (hostname:rmiport) jmx name



getPortNumber
public int getPortNumber()(Code)
Get the controller port number the port number



getReport
public ReportManager getReport()(Code)
Returns the report value. Returns the report.



getSecurity
public ControllerSecurityManager getSecurity()(Code)
Returns the security.



getVersion
public static String getVersion()(Code)
Returns Version as a long String version



getVersionNumber
public String getVersionNumber()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.getVersionNumber



getVirtualDatabase
public VirtualDatabase getVirtualDatabase(String virtualDatabaseName)(Code)
Gets the VirtualDatabase object corresponding to a virtual database name.
Parameters:
  virtualDatabaseName - the virtual database name a VirtualDatabase object or null if not found



getVirtualDatabaseNames
public ArrayList getVirtualDatabaseNames()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.getVirtualDatabaseNames



getVirtualDatabases
public ArrayList getVirtualDatabases()(Code)
Returns information about the available virtual databases. ArrayList of information about virtual databases.



getXml
public String getXml()(Code)

See Also:   org.continuent.sequoia.common.xml.XmlComponent.getXml



getXmlController
public String getXmlController()(Code)
Return the xml version of the controller.xml file without doc type declaration, just data. controller xml data



getXmlVirtualDatabases
public String getXmlVirtualDatabases()(Code)
Same as above but for the virtual databases. xml virtual databases data.



hasVirtualDatabase
public boolean hasVirtualDatabase(String name)(Code)
Tests if a VirtualDatabase of a given name exists in this controller.
Parameters:
  name - the virtual database name true if the virtual database exists



isSecurityEnabled
public boolean isSecurityEnabled()(Code)
Check whether security is enabled or not true if there is not null controller security manager



isShuttingDown
public boolean isShuttingDown()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.isShuttingDown



launch
public void launch()(Code)
Actively launch the controller. Add startup actions here to avoid them in main



loadXmlConfiguration
public String loadXmlConfiguration(String filename, String virtualName, int autoLoad, String checkPoint) throws Exception(Code)
Read a XML configuration file and load only the VirtualDatabase specified in the arguments list
Parameters:
  filename - XML configuration file name to take info onVirtualDatabase
Parameters:
  virtualName - the only database to load, null if should load all
Parameters:
  autoLoad - specifies if the backends should be enabled automaticallyafter loading
Parameters:
  checkPoint - checkPoint to recover from when enabling backends. Leavenull if no recovery option is needed. a diagnostic message (success or error)
throws:
  Exception - if an error occurs



main
public static void main(String[] args) throws Exception(Code)
Launches the Sequoia controller. The available options are:
  • -h or --help <port>: displays usage informations.
  • -j or --jmx <port>: optinal JMX server HTTP adaptor port number.
  • -n or --name <name>: optional controller name.
  • -i or --ip <ip>: optional IP address to beind the controller to.
  • -r or --rmi <port>: optional RMI registry port number.
  • -v or --version: displays version informations.

The controller starts listening for socket connections on the default port. Jmx is configured, and a virtual database can be added.

org.continuent.sequoia.controller.core.ControllerConstants.DEFAULT_PORT Default Listening port
Parameters:
  args - command line arguments (see above)
throws:
  Exception - when everything goes wrong




refreshLogConfiguration
public void refreshLogConfiguration() throws ControllerException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.refreshLogConfiguration



removeVirtualDatabase
public String removeVirtualDatabase(String virtualname)(Code)
Removes the virtual database with the given name (if any)
Parameters:
  virtualname - name of the virtual database a translated string for success message



saveConfiguration
public String saveConfiguration() throws Exception(Code)
Save current configuration of the controller to a default file Status message
throws:
  Exception - if an error occurs
See Also:   org.continuent.sequoia.controller.core.ControllerConstants.getSaveFile



sendJmxNotification
protected void sendJmxNotification(String type, String message)(Code)
Sends a JMX Notification on behalf of the MBean associated with this controller
Parameters:
  type - type of the JMX notification
Parameters:
  message - message associated with the notification
See Also:   SequoiaNotificationList



setBacklogSize
public void setBacklogSize(int size)(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.setBacklogSize(int)



setConfiguration
public void setConfiguration(Hashtable configuration)(Code)
Sets the configuration value.
Parameters:
  configuration - The configuration to set.



setIPAddress
public void setIPAddress(String ipAddress)(Code)
Set the IP address to bind the controller to
Parameters:
  ipAddress - the IP address to use



setJmxEnable
public void setJmxEnable(boolean enable)(Code)
set enable JMX
Parameters:
  enable - true if jmx should be enable.



setNotificationBroadcasterSupport
public void setNotificationBroadcasterSupport(NotificationBroadcasterSupport notificationBroadcasterSupport)(Code)
Sets the NotificationBroadcasterSupport associated with the MBean managing this controller.
Parameters:
  notificationBroadcasterSupport - the notificationBroadcasterSupportassociated with the mbean managing this controller



setPortNumber
public void setPortNumber(int port)(Code)
Set the controller backlog size.
Parameters:
  port - the port number to set



setReport
public void setReport(ReportManager report)(Code)
Sets the report value.
Parameters:
  report - The report to set.



setSecurity
public void setSecurity(ControllerSecurityManager security)(Code)

Parameters:
  security - The security to set.



shutdown
public void shutdown() throws ControllerException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.shutdown



updateLogConfigurationFile
public void updateLogConfigurationFile(String newConfiguration) throws IOException, ControllerException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.updateLogConfigurationFile(java.lang.String)



viewLogConfigurationFile
public String viewLogConfigurationFile() throws IOException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.ControllerMBean.viewLogConfigurationFile



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.