Java Doc for Module.java in  » Database-ORM » MMBase » org » mmbase » module » 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 ORM » MMBase » org.mmbase.module 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.util.functions.FunctionProvider
      org.mmbase.util.functions.DescribedFunctionProvider
         org.mmbase.module.Module

All known Subclasses:   org.mmbase.module.ProcessorModule,  org.mmbase.module.ReloadableModule,
Module
abstract public class Module extends DescribedFunctionProvider (Code)
An MMBase Module is an extension of this class, which is configured by an XML file in the <mmbase config dir>/modules directory. All modules whose xml configuration file defines them as 'active' are automaticly loaded and initialized. There are several modules which are more or less compulsary in MMBase, like the 'mmbaseroot' module, the actual core of MMBase implemented by org.mmbase.module.core.MMBase , and the 'jdbc' module.
author:
   Rico Jansen
author:
   Rob Vermeulen (securitypart)
author:
   Pierre van Rooden
version:
   $Id: Module.java,v 1.96 2007/12/06 08:06:43 michiel Exp $


Field Summary
final public  StringSTATE_START_TIME
     State identifier for module startup time.
protected  StringconfigurationPath
    
protected  Function<String>getMaintainerFunction
     This function returns the Module's maintainer as a String.
protected  Function<Integer>getVersionFunction
     This function returns the Module's version number as an Integer.
protected  Map<String, String>properties
     Properties (initparameters) set by reading (or re-reading) the module configuration.

Constructor Summary
public  Module()
    
public  Module(String name)
    

Method Summary
public  StringgetInitParameter(String key)
    
public  Map<String, String>getInitParameters()
    
public  StringgetMaintainer()
    
public static  ModulegetModule(String name)
     Retrieves a reference to a Module.
public static  CgetModule(Class<C> clazz)
     Since modules normally all have a different class, you can also obtain a module by its Class, in stead of by its name.
public static  ModulegetModule(String name, boolean startOnLoad)
     Retrieves a reference to a Module.
public  StringgetModuleInfo()
    
public static  ResourceLoadergetModuleLoader()
    
public static  ModuleReadergetModuleReader(String configurationPath)
    
public  ModuleReadergetModuleReader()
    
final public static  Iterator<Module>getModules()
     Returns an iterator of all the modules that are currently active.
public  StringgetState(String name)
     Returns a state value by name.
public  Map<String, String>getStates()
     Returns the module's runtime-generated state information as a unmodifiable map with name-value pairs.
public  intgetVersion()
    
public static  booleanhasModule(String name)
    
final public  booleanhasStarted()
     Returns whether the module has started (has been initialized or is in its initialization fase).
public  voidinit()
     Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule() , which makes sure it is not called more than once.
public  voidloadInitParameters()
    
protected  voidloadInitParameters(String contextPath)
    
public  voidmaintainance()
     maintainance call called by the admin module every x seconds.
public  voidonload()
     prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules() .
public  voidsetInitParameter(String key, String value)
    
public  voidsetMaintainer(String m)
    
public  StringsetState(String name, String value)
     Sets a state value by name.
public  voidsetVersion(int v)
    
protected  voidshutdown()
     Shuts down the module.
final public static synchronized  voidshutdownModules()
     Calls shutdown of all registered modules.
final public  voidstartModule()
     Starts the module.
final public static synchronized  voidstartModules()
    

Field Detail
STATE_START_TIME
final public String STATE_START_TIME(Code)
State identifier for module startup time.



configurationPath
protected String configurationPath(Code)



getMaintainerFunction
protected Function<String> getMaintainerFunction(Code)
This function returns the Module's maintainer as a String. It takes no parameters. This function can be called through the function framework.
since:
   MMBase-1.8



getVersionFunction
protected Function<Integer> getVersionFunction(Code)
This function returns the Module's version number as an Integer. It takes no parameters. This function can be called through the function framework.
since:
   MMBase-1.8



properties
protected Map<String, String> properties(Code)
Properties (initparameters) set by reading (or re-reading) the module configuration.




Constructor Detail
Module
public Module()(Code)



Module
public Module(String name)(Code)




Method Detail
getInitParameter
public String getInitParameter(String key)(Code)
Gets an init-parameter key-value pair



getInitParameters
public Map<String, String> getInitParameters()(Code)
Gets own modules properties



getMaintainer
public String getMaintainer()(Code)



getModule
public static Module getModule(String name)(Code)
Retrieves a reference to a Module. This call does not ensure that the requested module has been initialized.
Parameters:
  name - the name of the module to retrieve a refernce to a Module, or null if themodule does not exist or is inactive.



getModule
public static C getModule(Class<C> clazz)(Code)
Since modules normally all have a different class, you can also obtain a module by its Class, in stead of by its name. The advantage is that you don't need to cast.
Parameters:
  clazz - The class of the desired Module A Module instance or null if no such module.
since:
   MMBase-1.9



getModule
public static Module getModule(String name, boolean startOnLoad)(Code)
Retrieves a reference to a Module. If you set the startOnLoad to true, this call ensures that the requested module has been initialized by calling the Module.startModule() method. This is needed if you need to call Module methods from the init() of another module.
Parameters:
  name - the name of the module to retrieve
Parameters:
  startOnLoad - if true, the code makes sure the module has been started a reference to a Module, or null if themodule does not exist or is inactive.



getModuleInfo
public String getModuleInfo()(Code)
Provide some info on the module; By default, this returns the module description for the default locale



getModuleLoader
public static ResourceLoader getModuleLoader()(Code)

since:
   MMBase-1.8



getModuleReader
public static ModuleReader getModuleReader(String configurationPath)(Code)

since:
   MMBase-1.8



getModuleReader
public ModuleReader getModuleReader()(Code)

since:
   MMBase-1.9



getModules
final public static Iterator<Module> getModules()(Code)
Returns an iterator of all the modules that are currently active. This function null if no attempt has the modules have (not) yet been to loaded. Unlike Module.getModule , this method does not automatically load modules if this hadn't occurred yet. an Iterator with all active modules



getState
public String getState(String name)(Code)
Returns a state value by name.
since:
   MMBase-1.9



getStates
public Map<String, String> getStates()(Code)
Returns the module's runtime-generated state information as a unmodifiable map with name-value pairs.
since:
   MMBase-1.9



getVersion
public int getVersion()(Code)



hasModule
public static boolean hasModule(String name)(Code)

since:
   MMBase-1.8.3



hasStarted
final public boolean hasStarted()(Code)
Returns whether the module has started (has been initialized or is in its initialization fase).



init
public void init()(Code)
Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule() , which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.



loadInitParameters
public void loadInitParameters()(Code)
Override properties through application context
since:
   MMBase 1.8.5



loadInitParameters
protected void loadInitParameters(String contextPath)(Code)
Override properties through application context
Parameters:
  contextPath - path in application context where properties are located
since:
   MMBase 1.8.5



maintainance
public void maintainance()(Code)
maintainance call called by the admin module every x seconds.



onload
public void onload()(Code)
prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules() . You should not call onload() directly.



setInitParameter
public void setInitParameter(String key, String value)(Code)
Sets an init-parameter key-value pair



setMaintainer
public void setMaintainer(String m)(Code)



setState
public String setState(String name, String value)(Code)
Sets a state value by name.
since:
   MMBase-1.9



setVersion
public void setVersion(int v)(Code)



shutdown
protected void shutdown()(Code)
Shuts down the module. This method is called by shutdownModules.
since:
   MMBase-1.6.2



shutdownModules
final public static synchronized void shutdownModules()(Code)
Calls shutdown of all registered modules.
since:
   MMBase-1.6.2



startModule
final public void startModule()(Code)
Starts the module. This module calls the Module.init() of a module exactly once. In other words, once the init() is called, it does not call it again. This method is final and cannot be overridden. It is used to safely initialize modules during startup, and allows other modules to force the 'startup' of another module without risk.



startModules
final public static synchronized void startModules()(Code)



Fields inherited from org.mmbase.util.functions.DescribedFunctionProvider
protected LocalizedString description(Code)(Java Doc)
protected LocalizedString guiName(Code)(Java Doc)
protected String name(Code)(Java Doc)

Methods inherited from org.mmbase.util.functions.DescribedFunctionProvider
protected Locale getDefaultLocale()(Code)(Java Doc)
public String getDescription(Locale locale)(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public String getGUIName(Locale locale)(Code)(Java Doc)
public String getGUIName()(Code)(Java Doc)
public LocalizedString getLocalizedDescription()(Code)(Java Doc)
public LocalizedString getLocalizedGUIName()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public void setDescription(String desc, Locale locale)(Code)(Java Doc)
public void setDescription(String desc)(Code)(Java Doc)
public void setGUIName(String g, Locale locale)(Code)(Java Doc)
public void setGUIName(String g)(Code)(Java Doc)
protected void setLocalizedDescription(LocalizedString description)(Code)(Java Doc)
protected void setLocalizedGUIName(LocalizedString value)(Code)(Java Doc)
final public void setName(String n)(Code)(Java Doc)

Fields inherited from org.mmbase.util.functions.FunctionProvider
protected Map<String, Function<?>> functions(Code)(Java Doc)
protected Function<Collection<Function<?>>> getFunctions(Code)(Java Doc)

Methods inherited from org.mmbase.util.functions.FunctionProvider
public Function addFunction(Function function)(Code)(Java Doc)
public Parameters createParameters(String functionName)(Code)(Java Doc)
public Function getFunction(String functionName)(Code)(Java Doc)
public Object getFunctionValue(String functionName, List parameters)(Code)(Java Doc)
public Collection<Function<?>> getFunctions()(Code)(Java Doc)
protected Function newFunctionInstance(String name, Parameter[] parameters, ReturnType returnType)(Code)(Java Doc)

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.