Java Doc for BaseMonitor.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » services » monitor » 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 DBMS » db derby 10.2 » org.apache.derby.impl.services.monitor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.services.monitor.BaseMonitor

All known Subclasses:   org.apache.derby.impl.services.monitor.FileMonitor,
BaseMonitor
abstract class BaseMonitor implements ModuleFactory,BundleFinder(Code)
Implementation of the monitor that uses the class loader that the its was loaded in for all class loading.

Inner Class :class ProviderEnumeration implements Enumeration

Field Summary
 PropertiesapplicationProperties
    
 PropertiesbootProperties
    
 ThreadGroupdaemonGroup
    
 AntiGCdontGC
    
 Vector[]implementationSets
    
 booleaninShutdown
    
 booleanreportOn
    
 HashtableserviceProviders
     Hashtable of objects that implement PersistentService keyed by their getType() method.

Constructor Summary
 BaseMonitor()
    

Method Summary
abstract  InputStreamapplicationPropertiesStream()
     Get InputStream for application properties file Returns nul if it does not exist.
static  voidboot(Object module, boolean create, Properties properties)
     Boot a module.
protected  voidbootPersistentServices()
     Boot all persistent services that can be located at run time.
protected  voidbootProviderServices(PersistentService provider)
     Boot all persistent services that can be located by a single service provider
This method enumerates through all the service providers that are active and calls bootPersistentServices(PersistentService) to boot all the services that that provider knows about.
protected  ObjectbootService(PersistentService provider, String factoryInterface, String serviceName, Properties properties, boolean create)
     Boot (start or create) a service (persistent or non-persistent).
protected  voidbootServiceProviders()
     Boot all the service providers, ie.
static  booleancanSupport(Object instance, Properties properties)
     If the module implements ModuleSupportable then call its canSupport() method to see if it can or should run in this setup.
public  InstanceGetterclassFromIdentifier(int fmtId)
     Obtain a class that supports the given identifier.
public  ObjectcreatePersistentService(String factoryInterface, String name, Properties properties)
     Create a persistent service.
 voiddumpProperties(String title, Properties props)
    
public  ObjectfindModule(Object serviceModule, String factoryInterface, String identifier)
    
protected  PersistentServicefindProviderForCreate(String name)
    
public  ObjectfindService(String factoryInterface, String serviceName)
    
public  PropertiesgetApplicationProperties()
    
public  ResourceBundlegetBundle(String messageId)
     Get the locale from the ContextManager and then find the bundle based upon that locale.
public  ThreadgetDaemonThread(Runnable task, String name, boolean setMinPriority)
    
 PropertiesgetDefaultModuleProperties()
     Get the complete set of module properties by loading in contents of all the org/apache/derby/modules.properties files.
public  LocalegetLocale(Object serviceModule)
    
public  LocalegetLocaleFromString(String localeDescription)
    
public  String[]getServiceList(String protocol)
     Return an array of the service identifiers that are running and implement the passed in protocol (java interface class name).
public  StringgetServiceName(Object serviceModule)
     Return the name of the service that the passed in module lives in.
public  PersistentServicegetServiceProvider(String subSubProtocol)
    
public  PersistentServicegetServiceType(Object serviceModule)
     Return the PersistentService object for a service.
public  InfoStreamsgetSystemStreams()
    
public  TimerFactorygetTimerFactory()
     Returns the Timer factory for this system.
public  UUIDFactorygetUUIDFactory()
     Return the UUID factory for this system.
abstract  booleaninitialize(boolean lite)
     Initialize the monitor wrt the current environemnt.
protected  ObjectloadInstance(Class factoryInterface, Properties properties)
     load a module instance.
public  ObjectnewInstanceFromIdentifier(int identifier)
     Obtain an new instance of a class that supports the given identifier.
protected  PropertiesreadApplicationProperties()
    
public  voidremovePersistentService(String name)
     Removes a PersistentService.
protected static  PropertiesremoveRuntimeProperties(Properties properties)
     Return a property set that has the runtime properties removed.
protected  voidreport(String message)
     Should only be called if reportOn is true apart from report/Exception().
protected  voidreportException(Throwable t)
    
final protected  voidrunWithState(Properties properties, PrintStream log)
    
public  LocalesetLocale(Object serviceModule, String userDefinedLocale)
     Set the locale for the service *outside* of boot time.
public  LocalesetLocale(Properties serviceProperties, String userDefinedLocale)
     Set the locale for the service at boot time.
public  voidsetThreadPriority(int priority)
    
public  voidshutdown()
    
public  voidshutdown(Object serviceModule)
     Shut down a service that was started by this Monitor.
public  ObjectstartModule(boolean create, Object serviceModule, String factoryInterface, String identifier, Properties properties)
     Start a module.
public  ObjectstartNonPersistentService(String factoryInterface, String serviceName, Properties properties)
     Start a non-persistent service.
final public  booleanstartPersistentService(String name, Properties properties)
     Start a peristent service.
protected  voidstartProviderService(PersistentService provider, String serviceName, Properties serviceProperties)
    
public  voidstartServices(Properties properties, boolean bootAll)
    

Field Detail
applicationProperties
Properties applicationProperties(Code)



bootProperties
Properties bootProperties(Code)



daemonGroup
ThreadGroup daemonGroup(Code)



dontGC
AntiGC dontGC(Code)



implementationSets
Vector[] implementationSets(Code)



inShutdown
boolean inShutdown(Code)



reportOn
boolean reportOn(Code)



serviceProviders
Hashtable serviceProviders(Code)
Hashtable of objects that implement PersistentService keyed by their getType() method.




Constructor Detail
BaseMonitor
BaseMonitor()(Code)




Method Detail
applicationPropertiesStream
abstract InputStream applicationPropertiesStream() throws IOException(Code)
Get InputStream for application properties file Returns nul if it does not exist.



boot
static void boot(Object module, boolean create, Properties properties) throws StandardException(Code)
Boot a module. If the module implements ModuleControl then its boot() method is called. Otherwise all the boot code is assumed to take place in its constructor.



bootPersistentServices
protected void bootPersistentServices()(Code)
Boot all persistent services that can be located at run time.
This method enumerates through all the service providers that are active and calls bootPersistentServices(PersistentService) to boot all the services that that provider knows about.



bootProviderServices
protected void bootProviderServices(PersistentService provider)(Code)
Boot all persistent services that can be located by a single service provider
This method enumerates through all the service providers that are active and calls bootPersistentServices(PersistentService) to boot all the services that that provider knows about.



bootService
protected Object bootService(PersistentService provider, String factoryInterface, String serviceName, Properties properties, boolean create) throws StandardException(Code)
Boot (start or create) a service (persistent or non-persistent).



bootServiceProviders
protected void bootServiceProviders()(Code)
Boot all the service providers, ie. any module that implemented PersistentService. Upon entry to this call is the hashtable has PersistentService objects that have been created but not booted.



canSupport
static boolean canSupport(Object instance, Properties properties)(Code)
If the module implements ModuleSupportable then call its canSupport() method to see if it can or should run in this setup. If it doesn't then it can always run.



classFromIdentifier
public InstanceGetter classFromIdentifier(int fmtId) throws StandardException(Code)
Obtain a class that supports the given identifier.
Parameters:
  fmtId - identifer to associate with class a reference InstanceGetter
exception:
  StandardException - See Monitor.classFromIdentifier
See Also:   ModuleFactory.classFromIdentifier



createPersistentService
public Object createPersistentService(String factoryInterface, String name, Properties properties) throws StandardException(Code)
Create a persistent service. The module from the service if it was created successfully, null if a service already existed.
exception:
  StandardException - An exception was thrown trying to create the service.
See Also:   Monitor.createPersistentService



dumpProperties
void dumpProperties(String title, Properties props)(Code)



findModule
public Object findModule(Object serviceModule, String factoryInterface, String identifier)(Code)



findProviderForCreate
protected PersistentService findProviderForCreate(String name) throws StandardException(Code)



findService
public Object findService(String factoryInterface, String serviceName)(Code)



getApplicationProperties
public Properties getApplicationProperties()(Code)



getBundle
public ResourceBundle getBundle(String messageId)(Code)
Get the locale from the ContextManager and then find the bundle based upon that locale.



getDaemonThread
public Thread getDaemonThread(Runnable task, String name, boolean setMinPriority)(Code)



getDefaultModuleProperties
Properties getDefaultModuleProperties()(Code)
Get the complete set of module properties by loading in contents of all the org/apache/derby/modules.properties files. This must be executed in a privileged block otherwise when running in a security manager environment no properties will be returned.



getLocale
public Locale getLocale(Object serviceModule)(Code)



getLocaleFromString
public Locale getLocaleFromString(String localeDescription) throws StandardException(Code)



getServiceList
public String[] getServiceList(String protocol)(Code)
Return an array of the service identifiers that are running and implement the passed in protocol (java interface class name). The list of service names, if no services exist thatimplement the protocol an array with zero elements is returned.
See Also:   ModuleFactory.getServiceList



getServiceName
public String getServiceName(Object serviceModule)(Code)
Return the name of the service that the passed in module lives in.



getServiceProvider
public PersistentService getServiceProvider(String subSubProtocol) throws StandardException(Code)



getServiceType
public PersistentService getServiceType(Object serviceModule)(Code)
Return the PersistentService object for a service. Will return null if the service does not exist.



getSystemStreams
public InfoStreams getSystemStreams()(Code)



getTimerFactory
public TimerFactory getTimerFactory()(Code)
Returns the Timer factory for this system. the system's Timer factory.



getUUIDFactory
public UUIDFactory getUUIDFactory()(Code)
Return the UUID factory for this system. Returns null if there isn't one. See com.ibm.db2j.system.System



initialize
abstract boolean initialize(boolean lite)(Code)
Initialize the monitor wrt the current environemnt. Returns false if the monitor cannot be initialized, true otherwise.



loadInstance
protected Object loadInstance(Class factoryInterface, Properties properties)(Code)
load a module instance. Look through the implementations for a module that implements the required factory interface and can handle the properties given. The module's start or create method is not called.



newInstanceFromIdentifier
public Object newInstanceFromIdentifier(int identifier) throws StandardException(Code)
Obtain an new instance of a class that supports the given identifier. a reference to a newly created object or null if a matching classcannot be found.



readApplicationProperties
protected Properties readApplicationProperties()(Code)



removePersistentService
public void removePersistentService(String name) throws StandardException(Code)
Removes a PersistentService. Could be used for drop database.
Parameters:
  name - : Service name to be removed.



removeRuntimeProperties
protected static Properties removeRuntimeProperties(Properties properties)(Code)
Return a property set that has the runtime properties removed.



report
protected void report(String message)(Code)
Should only be called if reportOn is true apart from report/Exception().



reportException
protected void reportException(Throwable t)(Code)



runWithState
final protected void runWithState(Properties properties, PrintStream log)(Code)



setLocale
public Locale setLocale(Object serviceModule, String userDefinedLocale) throws StandardException(Code)
Set the locale for the service *outside* of boot time.
exception:
  StandardException - Standard Cloudscape error.



setLocale
public Locale setLocale(Properties serviceProperties, String userDefinedLocale) throws StandardException(Code)
Set the locale for the service at boot time. The passed in properties must be the one passed to the boot method.
exception:
  StandardException - Standard Cloudscape error.



setThreadPriority
public void setThreadPriority(int priority)(Code)



shutdown
public void shutdown()(Code)



shutdown
public void shutdown(Object serviceModule)(Code)
Shut down a service that was started by this Monitor. Will cause the stop() method to be called on each loaded module.



startModule
public Object startModule(boolean create, Object serviceModule, String factoryInterface, String identifier, Properties properties) throws StandardException(Code)
Start a module.
exception:
  StandardException - se An attempt to start the module failed.
See Also:   ModuleFactory.startModule



startNonPersistentService
public Object startNonPersistentService(String factoryInterface, String serviceName, Properties properties) throws StandardException(Code)
Start a non-persistent service.
See Also:   Monitor.startNonPersistentService
See Also:   ModuleFactory.startNonPersistentService



startPersistentService
final public boolean startPersistentService(String name, Properties properties) throws StandardException(Code)
Start a peristent service.
See Also:   ModuleFactory.startPersistentService
See Also:   Monitor.startPersistentService



startProviderService
protected void startProviderService(PersistentService provider, String serviceName, Properties serviceProperties) throws StandardException(Code)
Boot a service under the control of the provider



startServices
public void startServices(Properties properties, boolean bootAll)(Code)



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.