Java Doc for EnhydraServer.java in  » J2EE » Enhydra-Application-Framework » org » enhydra » server » 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 » J2EE » Enhydra Application Framework » org.enhydra.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.enhydra.server.EnhydraServer

EnhydraServer
public class EnhydraServer (Code)

Description: Class EnhydraServer use singleton pattern to provide all necessary data about registered (started) Enhydra applications. All application register itself on startup and unregister when shutdown. Admin application use this class to display applications info. Admin application should get instance of this class first, then calls public methods. Example:

EnhydraServer enhydraServer = EnhydraServer.getInstance();

SessionsInfo sessInfo = enhydraServer.getSessionsInfo();

String activeSessions = sessInfo.getActiveSessions();

...

Copyright: Copyright (c) 2002

Company: www.together.at


author:
   Damir Milovic, damir@uns.ns.ac.yu
version:
   1.0
See Also:    SessionsInfo


Field Summary
final public static  StringAPPLICATION
    
final public static  StringAPPS_DIR
    
final public static  StringAPP_CLASS
    
final protected static  StringAPP_CONNECTIONS
    
final protected static  StringAPP_CONTEXTPATH
    
final protected static  StringAPP_DESCRIPTION
    
final protected static  StringAPP_NAME
    
final protected static  StringAPP_RUNNING
    
final protected static  StringAPP_URLPATH
     attributes in tag in EnhydraServer.xml configuration file.
final public static  StringAUTO_RELOAD
    
final public static  StringCLASS_NAME
    
final public static  StringCLASS_PATH
    
final public static  StringCONF_FILE
    
final public static  StringCONF_FILE_CLASS
    
final public static  StringCONNECTION
    
final public static  StringDEFAULT_CONF_FILE
    
final public static  StringDEFAULT_CONF_FILE_CLASS
    
final public static  StringDEFAULT_LOG_CLASS
    
final public static  StringDESCRIPTION
    
final public static  StringDOC_ROOT
    
final public static  StringENABLED
    
final public static  StringINIT_ARGS
    
final public static  StringLOG_CLASS
    
final public static  StringPRESENTATION_PREFIX
    
final public static  StringRUNNING
    
final public static  StringSERVER
    
final public static  StringSERVLET
    
final public static  StringSESSION_MANAGER
    
final public static  StringSESSION_MANAGER_KEY
    
final public static  StringURL
    


Method Summary
public  booleanaddApplication(String appName, String contextPath, String urlFilePath, String description)
     Adds new application to Enhydra server
Parameters:
  appName - application name.
Parameters:
  contextPath - context path ( e.g.
public  booleanaddConnection(String type, String port)
     Add (create) connection to application server. Admin Presentation should first check available types, before call this method.
Parameters:
  type - Connection type ("http","ajp",..) depends on Application Server.
Parameters:
  port - Port nubber.
public  booleanaddConnection(String type, String port, String password, String pathToKeyStoreFile)
     Add (create) connection to application server.
public  booleandisableConnection(String appName, String portNumber)
     Disable connection to the application on port number.
Parameters:
  appName - application name.
Parameters:
  portNumber - port number of corresponding connection.
public  booleanenableConnection(String appName, String portNumber)
     Enable connection to the application on port number.
Parameters:
  appName - application name.
Parameters:
  portNumber - port number of corresponding connection.
public  ConfiggetAppConfig(String appName)
     This method should be call for editing application config file.
public  AppInfogetAppInfo(String appName)
    
See Also:    AppInfo
Parameters:
  appName - application name.
public  String[]getAppNames()
    
public  ApplicationServergetApplicationServer()
    
public  StringgetAppsDir()
     Get path to default Applications context root path.
public  EnhydraServerXMLgetConfig()
    
public  DatabaseEditgetDatabaseEdit(String appName)
     Gets instasnce of DatabaseEdit class which is used in edditing of database parameters in configuration file of the application.
Parameters:
  appName - the applicatin name.
public  DatabaseInfogetDatabaseInfo(String appName)
    
See Also:    SessionsInfo
Parameters:
  appName - - application name.
public  String[]getEnabledConnections(String appName)
     Method used by EnhydraPortFilter, provides list of enabled ports for given application name.
Parameters:
  appName - Application name.
public static  EnhydraServergetInstance()
     Enhydra applications (HttpPresentationServlet) call this method to obtain EnhydraServer instance.
public  PresentationInfogetPresentationInfo(String appName)
    
public  SessionEditgetSessionEdit(String appName)
    
public  SessionsInfogetSessionsInfo(String appName)
    
public  booleanisStarted()
    
public  voidregister(Servlet servlet)
     Enhydra Application (HttpPresentationServlet) register itself on startup.
public  booleanremoveApplication(String appName)
     Remove application from Enhydra Server.
Parameters:
  appName - application name.
public  booleanremoveConnection(String port)
    
public  booleansaveState()
    
public  voidsetApplicationServer(ApplicationServer appServ)
     Implementation of ApplicationServer interface are responsible to set reference on himself.
public static  voidsetAppsfDir(String dir)
     Set path to default Applications context root path.
public synchronized  voidshutdown()
     Shutdown EnhydraServer, including all applications and connections.
public  booleanstartApplication(String appName)
     Start application.
Parameters:
  appName - application name.
public synchronized  voidstartup()
     This method is responsible starting applications defined in EnhydraServer.conf file.
public  booleanstopApplication(String appName)
     Shutdown application.
Parameters:
  appName - application name.
public  voidstopApplicationServer()
    
public  voidunRegister(Servlet servlet)
     Enhydra Application unregister itself when stop.

Field Detail
APPLICATION
final public static String APPLICATION(Code)



APPS_DIR
final public static String APPS_DIR(Code)
Public static variables



APP_CLASS
final public static String APP_CLASS(Code)



APP_CONNECTIONS
final protected static String APP_CONNECTIONS(Code)



APP_CONTEXTPATH
final protected static String APP_CONTEXTPATH(Code)



APP_DESCRIPTION
final protected static String APP_DESCRIPTION(Code)



APP_NAME
final protected static String APP_NAME(Code)



APP_RUNNING
final protected static String APP_RUNNING(Code)



APP_URLPATH
final protected static String APP_URLPATH(Code)
attributes in tag in EnhydraServer.xml configuration file.



AUTO_RELOAD
final public static String AUTO_RELOAD(Code)



CLASS_NAME
final public static String CLASS_NAME(Code)



CLASS_PATH
final public static String CLASS_PATH(Code)



CONF_FILE
final public static String CONF_FILE(Code)



CONF_FILE_CLASS
final public static String CONF_FILE_CLASS(Code)



CONNECTION
final public static String CONNECTION(Code)



DEFAULT_CONF_FILE
final public static String DEFAULT_CONF_FILE(Code)



DEFAULT_CONF_FILE_CLASS
final public static String DEFAULT_CONF_FILE_CLASS(Code)



DEFAULT_LOG_CLASS
final public static String DEFAULT_LOG_CLASS(Code)



DESCRIPTION
final public static String DESCRIPTION(Code)



DOC_ROOT
final public static String DOC_ROOT(Code)



ENABLED
final public static String ENABLED(Code)



INIT_ARGS
final public static String INIT_ARGS(Code)



LOG_CLASS
final public static String LOG_CLASS(Code)



PRESENTATION_PREFIX
final public static String PRESENTATION_PREFIX(Code)



RUNNING
final public static String RUNNING(Code)



SERVER
final public static String SERVER(Code)



SERVLET
final public static String SERVLET(Code)



SESSION_MANAGER
final public static String SESSION_MANAGER(Code)



SESSION_MANAGER_KEY
final public static String SESSION_MANAGER_KEY(Code)



URL
final public static String URL(Code)





Method Detail
addApplication
public boolean addApplication(String appName, String contextPath, String urlFilePath, String description)(Code)
Adds new application to Enhydra server
Parameters:
  appName - application name.
Parameters:
  contextPath - context path ( e.g. '/myapp')
Parameters:
  urlPath - url path file (application root directory or path to war file).If path is relative it is resolved against %ENHYDRA_HOME/apps directory.
Parameters:
  description - application description not required. true if application added successfuly, else false.



addConnection
public boolean addConnection(String type, String port)(Code)
Add (create) connection to application server. Admin Presentation should first check available types, before call this method.
Parameters:
  type - Connection type ("http","ajp",..) depends on Application Server.
Parameters:
  port - Port nubber. TRUE if connection added successfuly.



addConnection
public boolean addConnection(String type, String port, String password, String pathToKeyStoreFile)(Code)
Add (create) connection to application server.
Parameters:
  type - Connection type ("http","ajp","https"..) depends on Application Server.
Parameters:
  port - Port nubber.
Parameters:
  password - for "https" required.
Parameters:
  pathToKeyStoreFile - absolute path to KeyStore file for "https" required.



disableConnection
public boolean disableConnection(String appName, String portNumber)(Code)
Disable connection to the application on port number.
Parameters:
  appName - application name.
Parameters:
  portNumber - port number of corresponding connection. TRUE if connection successfuly disabled, else FALSE.



enableConnection
public boolean enableConnection(String appName, String portNumber)(Code)
Enable connection to the application on port number.
Parameters:
  appName - application name.
Parameters:
  portNumber - port number of corresponding connection. TRUE if connection successfuly enabled, else FALSE.



getAppConfig
public Config getAppConfig(String appName)(Code)
This method should be call for editing application config file.
Parameters:
  appName - application name application Config object.
See Also:   com.lutris.util.Config



getAppInfo
public AppInfo getAppInfo(String appName)(Code)

See Also:    AppInfo
Parameters:
  appName - application name. AppInfo contains all necessary application data.



getAppNames
public String[] getAppNames()(Code)
names of all available applications



getApplicationServer
public ApplicationServer getApplicationServer()(Code)
instance of class that implements ApplicationServer



getAppsDir
public String getAppsDir()(Code)
Get path to default Applications context root path. absolute path to directory, where are application context reside.



getConfig
public EnhydraServerXML getConfig()(Code)



getDatabaseEdit
public DatabaseEdit getDatabaseEdit(String appName)(Code)
Gets instasnce of DatabaseEdit class which is used in edditing of database parameters in configuration file of the application.
Parameters:
  appName - the applicatin name. instasnce of DatabaseEdit class.



getDatabaseInfo
public DatabaseInfo getDatabaseInfo(String appName)(Code)

See Also:    SessionsInfo
Parameters:
  appName - - application name. DatabaseInfo - JavaBean with getter methods.



getEnabledConnections
public String[] getEnabledConnections(String appName)(Code)
Method used by EnhydraPortFilter, provides list of enabled ports for given application name.
Parameters:
  appName - Application name. Array of enabled port numbers .



getInstance
public static EnhydraServer getInstance()(Code)
Enhydra applications (HttpPresentationServlet) call this method to obtain EnhydraServer instance. One and only instance (singleton pattern) of this class.



getPresentationInfo
public PresentationInfo getPresentationInfo(String appName)(Code)

See Also:    PresentationInfo
Parameters:
  appName - - application name PresentationInfo - JavaBean with getter methods



getSessionEdit
public SessionEdit getSessionEdit(String appName)(Code)

See Also:    SessionEdit
Parameters:
  appName - applicatin name SessionEdit class for editing SessionManager parameters in conf file.



getSessionsInfo
public SessionsInfo getSessionsInfo(String appName)(Code)

See Also:    SessionsInfo
Parameters:
  appName - - application name SessionInfo - JavaBean with getter methods



isStarted
public boolean isStarted()(Code)
AdminGui should call this method to check is EnhydraServer started true if EnhydraServer started



register
public void register(Servlet servlet)(Code)
Enhydra Application (HttpPresentationServlet) register itself on startup.
Parameters:
  servlet - only HttpPresentationServlet is currently supported.



removeApplication
public boolean removeApplication(String appName)(Code)
Remove application from Enhydra Server.
Parameters:
  appName - application name. true if application removing was successful.



removeConnection
public boolean removeConnection(String port)(Code)



saveState
public boolean saveState()(Code)
Save state of EnhydraServer into xml config file TRUE if OK, else FALSE.



setApplicationServer
public void setApplicationServer(ApplicationServer appServ)(Code)
Implementation of ApplicationServer interface are responsible to set reference on himself.
Parameters:
  appServ - Implementation of ApplicationServer.



setAppsfDir
public static void setAppsfDir(String dir)(Code)
Set path to default Applications context root path. Application context url can be relative against this path.
Parameters:
  dir - absolute path to directory, where are application context reside.



shutdown
public synchronized void shutdown()(Code)
Shutdown EnhydraServer, including all applications and connections.



startApplication
public boolean startApplication(String appName)(Code)
Start application.
Parameters:
  appName - application name. OK if application successfuly started, else FALSE.



startup
public synchronized void startup()(Code)
This method is responsible starting applications defined in EnhydraServer.conf file. ApplicationServer call this method when all necessary application server initialization are done and ApplicationServer reference is setted.



stopApplication
public boolean stopApplication(String appName)(Code)
Shutdown application.
Parameters:
  appName - application name. OK if application successfuly stopped, else FALSE.



stopApplicationServer
public void stopApplicationServer()(Code)
Shutdown application server



unRegister
public void unRegister(Servlet servlet)(Code)
Enhydra Application unregister itself when stop.
Parameters:
  servlet - usualy HttpPresentationServlet.



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.