Class BaseMonitor
- java.lang.Object
-
- org.apache.derby.impl.services.monitor.BaseMonitor
-
- All Implemented Interfaces:
BundleFinder,ModuleFactory
- Direct Known Subclasses:
FileMonitor
abstract class BaseMonitor extends java.lang.Object implements ModuleFactory, BundleFinder
Implementation of the monitor that uses the class loader that the its was loaded in for all class loading.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classBaseMonitor.ProviderEnumeration
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.PropertiesapplicationProperties(package private) java.util.PropertiesbootPropertiesprivate ContextServicecontextService(package private) java.lang.ThreadGroupdaemonGroupprivate booleandumpedTempWriterprivate java.util.List<java.util.List<java.lang.Class<?>>>implementationSets(package private) booleaninShutdownprivate static java.lang.StringLINEprivate java.io.PrintWriterloggingprivate InstanceGetter[]rc2(package private) booleanreportOnprivate static java.lang.StringSERVICELook for any services in the a properties set and the application property set and then start them.private java.util.HashMap<java.lang.String,PersistentService>serviceProvidersHash table of objects that implement PersistentService keyed by their getType() method.private java.util.Vector<TopService>servicesprivate static java.util.HashMap<java.lang.String,java.lang.String>storageFactoriesprivate InfoStreamssystemStreamsprivate TimerFactorytimerFactoryprivate AccessibleByteArrayOutputStreamtmpArrayprivate java.io.PrintWritertmpWriterprivate UUIDFactoryuuidFactory
-
Constructor Summary
Constructors Constructor Description BaseMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private voidaddDebugFlags(java.lang.String flags, boolean set)(package private) abstract java.io.InputStreamapplicationPropertiesStream()Get InputStream for application properties file Returns nul if it does not exist.(package private) static voidboot(java.lang.Object module, boolean create, java.util.Properties properties)Boot a module.private 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 java.lang.ObjectbootService(PersistentService provider, java.lang.String factoryInterface, java.lang.String serviceName, java.util.Properties properties, boolean create)Boot (start or create) a service (persistent or non-persistent).(package private) static booleancanSupport(java.lang.Object instance, java.util.Properties properties)If the module implements ModuleSupportable then call its canSupport() method to see if it can or should run in this setup.InstanceGetterclassFromIdentifier(int fmtId)Obtain a class that supports the given identifier.java.lang.ObjectcreatePersistentService(java.lang.String factoryInterface, java.lang.String name, java.util.Properties properties)Create a persistent service.private voiddetermineSupportedServiceProviders()Determine which of the set of service providers (PersistentService objects) are supported in the current environment.(package private) voiddumpProperties(java.lang.String title, java.util.Properties props)private voiddumpTempWriter(boolean bothPlaces)private static intfindImplementation(java.util.List<java.lang.Class<?>> implementations, int startIndex, java.lang.Class<?> factoryInterface)Find a class that implements the required index, return the index into the implementations vector of that class.java.lang.ObjectfindModule(java.lang.Object serviceModule, java.lang.String factoryInterface, java.lang.String identifier)Find the module in the system with the given module protocol, protocolVersion and identifier.private booleanfindProviderAndStartService(java.lang.String name, java.util.Properties properties, boolean bootTime)Find a provider and start a service.protected PersistentServicefindProviderForCreate(java.lang.String name)private PersistentServicefindProviderFromName(java.lang.String name, int colon)Find the service provider from a name that includes a service type, ie. is of the form 'type:name'.java.lang.ObjectfindService(java.lang.String factoryInterface, java.lang.String serviceName)Find a service.private TopServicefindTopService(java.lang.Object serviceModule)java.util.PropertiesgetApplicationProperties()Return the application set of properties which correspond to the set of properties in the file derby.properties.java.util.ResourceBundlegetBundle(java.lang.String messageId)Get the locale from the ContextManager and then find the bundle based upon that locale.java.lang.StringgetCanonicalServiceName(java.lang.String userSpecifiedName)Canonicalize a service name, mapping different user-specifications of a database name onto a single, standard name.private static ContextServicegetContextService()Privileged lookup of the ContextService.java.lang.ThreadgetDaemonThread(java.lang.Runnable task, java.lang.String name, boolean setMinPriority)Get a newly created background thread.private java.util.Vector<java.lang.Class<?>>getDefaultImplementations()(package private) java.util.PropertiesgetDefaultModuleProperties()Get the complete set of module properties by loading in contents of all the org/apache/derby/modules.properties files.private java.util.Vector<java.lang.Class<?>>getImplementations(java.util.Properties moduleList, boolean actualModuleList)Create an implementation set.java.util.LocalegetLocale(java.lang.Object serviceModule)Return the locale of the service that the passed in module lives in.java.util.LocalegetLocaleFromString(java.lang.String localeDescription)Translate a string of the form ll[_CC[_variant]] to a Locale.private PersistentServicegetPersistentService(java.lang.String subSubProtocol)Return a PersistentService implementation to handle the subSubProtocol.private PersistentServicegetPersistentService(java.lang.String className, java.lang.String subSubProtocol)private booleangetPersistentServiceImplementation(java.lang.Class<?> possibleModule)java.lang.String[]getServiceList(java.lang.String protocol)Return an array of the service identifiers that are running and implement the passed in protocol (java interface class name).java.lang.StringgetServiceName(java.lang.Object serviceModule)Return the name of the service that the passed in module lives in.PersistentServicegetServiceProvider(java.lang.String subSubProtocol)Return the PersistentService for a subsubprotocol.PersistentServicegetServiceType(java.lang.Object serviceModule)Return the PersistentService object for a service.private java.lang.StringgetStorageFactoryClassName(java.lang.String subSubProtocol)Find the StorageFactory class name that handles the subSub protocol.InfoStreamsgetSystemStreams()Get the defined default system streams object.private java.io.PrintWritergetTempWriter()TimerFactorygetTimerFactory()Returns the Timer factory for this system.UUIDFactorygetUUIDFactory()Return the UUID factory for this system.(package private) abstract booleaninitialize(boolean lite)Initialize the monitor wrt the current environemnt.booleanisDaemonThread(java.lang.Thread thread)Check if a thread is a daemon thread created byModuleFactory.getDaemonThread(java.lang.Runnable, java.lang.String, boolean).protected java.lang.ObjectloadInstance(java.lang.Class<?> factoryInterface, java.util.Properties properties)load a module instance.private java.lang.ObjectloadInstance(java.util.List<java.lang.Class<?>> implementations, java.lang.Class<?> factoryInterface, java.util.Properties properties)private java.lang.ObjectnewInstance(java.lang.Class<?> classObject)Return a new instance of classclassObjectusing a no-param constructor.java.lang.ObjectnewInstanceFromIdentifier(int identifier)Obtain an new instance of a class that supports the given identifier.protected java.util.PropertiesreadApplicationProperties()voidremovePersistentService(java.lang.String name)Removes a PersistentService.protected static java.util.PropertiesremoveRuntimeProperties(java.util.Properties properties)Return a property set that has the runtime properties removed.protected voidreport(java.lang.String message)Should only be called if reportOn is true apart from report/Exception().protected voidreportException(java.lang.Throwable t)protected voidrunWithState(java.util.Properties properties, java.io.PrintWriter log)java.util.LocalesetLocale(java.lang.Object serviceModule, java.lang.String userDefinedLocale)Set the locale for the service *outside* of boot time.private static java.util.LocalesetLocale(java.util.Properties properties)java.util.LocalesetLocale(java.util.Properties serviceProperties, java.lang.String userDefinedLocale)Set the locale for the service at boot time.private static booleansetMonitor(BaseMonitor baseMonitor)Privileged startup.voidshutdown()Shut down the complete system that was started by this Monitor.voidshutdown(java.lang.Object serviceModule)Shut down a service that was started by this Monitor.java.lang.ObjectstartModule(boolean create, java.lang.Object serviceModule, java.lang.String factoryInterface, java.lang.String identifier, java.util.Properties properties)Start a module.java.lang.ObjectstartNonPersistentService(java.lang.String factoryInterface, java.lang.String serviceName, java.util.Properties properties)Start a non-persistent service.booleanstartPersistentService(java.lang.String name, java.util.Properties properties)Start a peristent service.protected voidstartProviderService(PersistentService provider, java.lang.String serviceName, java.util.Properties serviceProperties)Boot a service under the control of the providervoidstartServices(java.util.Properties properties, boolean bootAll)Start all services identified by derby.service.* in the property set.private static java.util.LocalestaticGetLocaleFromString(java.lang.String localeDescription)private static voidstopContextService()Privileged shutdown of the ContextService.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.derby.iapi.services.monitor.ModuleFactory
getEngineVersion, getEnvironment, getJVMProperty
-
-
-
-
Field Detail
-
serviceProviders
private final java.util.HashMap<java.lang.String,PersistentService> serviceProviders
Hash table of objects that implement PersistentService keyed by their getType() method.
-
LINE
private static final java.lang.String LINE
- See Also:
- Constant Field Values
-
implementationSets
private java.util.List<java.util.List<java.lang.Class<?>>> implementationSets
-
services
private final java.util.Vector<TopService> services
-
bootProperties
java.util.Properties bootProperties
-
applicationProperties
java.util.Properties applicationProperties
-
inShutdown
boolean inShutdown
-
systemStreams
private InfoStreams systemStreams
-
contextService
private ContextService contextService
-
uuidFactory
private UUIDFactory uuidFactory
-
timerFactory
private TimerFactory timerFactory
-
reportOn
boolean reportOn
-
logging
private java.io.PrintWriter logging
-
daemonGroup
java.lang.ThreadGroup daemonGroup
-
rc2
private InstanceGetter[] rc2
-
SERVICE
private static final java.lang.String SERVICE
Look for any services in the a properties set and the application property set and then start them. A service is defined by derby.service.name=protocol- See Also:
- Constant Field Values
-
storageFactories
private static final java.util.HashMap<java.lang.String,java.lang.String> storageFactories
-
tmpWriter
private java.io.PrintWriter tmpWriter
-
tmpArray
private AccessibleByteArrayOutputStream tmpArray
-
dumpedTempWriter
private boolean dumpedTempWriter
-
-
Method Detail
-
getSystemStreams
public InfoStreams getSystemStreams()
Description copied from interface:ModuleFactoryGet the defined default system streams object.- Specified by:
getSystemStreamsin interfaceModuleFactory
-
shutdown
public void shutdown()
Description copied from interface:ModuleFactoryShut down the complete system that was started by this Monitor. Will cause the stop() method to be called on each loaded module.- Specified by:
shutdownin interfaceModuleFactory
-
shutdown
public void shutdown(java.lang.Object serviceModule)
Shut down a service that was started by this Monitor. Will cause the stop() method to be called on each loaded module.- Specified by:
shutdownin interfaceModuleFactory
-
runWithState
protected final void runWithState(java.util.Properties properties, java.io.PrintWriter log)
-
getCanonicalServiceName
public java.lang.String getCanonicalServiceName(java.lang.String userSpecifiedName) throws StandardExceptionDescription copied from interface:ModuleFactoryCanonicalize a service name, mapping different user-specifications of a database name onto a single, standard name.- Specified by:
getCanonicalServiceNamein interfaceModuleFactory- Throws:
StandardException
-
findService
public java.lang.Object findService(java.lang.String factoryInterface, java.lang.String serviceName)Description copied from interface:ModuleFactoryFind a service.
Do not call directly - use Monitor.findService()- Specified by:
findServicein interfaceModuleFactory- Returns:
- a refrence to a module represeting the service or null if the service does not exist.
- See Also:
Monitor.findService(java.lang.String, java.lang.String)
-
getLocale
public java.util.Locale getLocale(java.lang.Object serviceModule)
Description copied from interface:ModuleFactoryReturn the locale of the service that the passed in module lives in. Will return null if no-locale has been defined.- Specified by:
getLocalein interfaceModuleFactory
-
getLocaleFromString
public java.util.Locale getLocaleFromString(java.lang.String localeDescription) throws StandardExceptionDescription copied from interface:ModuleFactoryTranslate a string of the form ll[_CC[_variant]] to a Locale. This is in the Monitor because we want this translation to be in only one place in the code.- Specified by:
getLocaleFromStringin interfaceModuleFactory- Throws:
StandardException
-
getServiceName
public java.lang.String getServiceName(java.lang.Object serviceModule)
Return the name of the service that the passed in module lives in.- Specified by:
getServiceNamein interfaceModuleFactory
-
setLocale
public java.util.Locale setLocale(java.lang.Object serviceModule, java.lang.String userDefinedLocale) throws StandardExceptionSet the locale for the service *outside* of boot time.- Specified by:
setLocalein interfaceModuleFactoryuserDefinedLocale- A String in the form xx_YY, where xx is the language code and YY is the country code.- Returns:
- The new Locale for the service
- Throws:
StandardException- Standard Derby error.
-
setLocale
public java.util.Locale setLocale(java.util.Properties serviceProperties, java.lang.String userDefinedLocale) throws StandardExceptionSet the locale for the service at boot time. The passed in properties must be the one passed to the boot method.- Specified by:
setLocalein interfaceModuleFactory- Throws:
StandardException- Standard Derby error.
-
getServiceType
public PersistentService getServiceType(java.lang.Object serviceModule)
Return the PersistentService object for a service. Will return null if the service does not exist.- Specified by:
getServiceTypein interfaceModuleFactory
-
startModule
public java.lang.Object startModule(boolean create, java.lang.Object serviceModule, java.lang.String factoryInterface, java.lang.String identifier, java.util.Properties properties) throws StandardExceptionStart a module.- Specified by:
startModulein interfaceModuleFactory- Throws:
StandardException- se An attempt to start the module failed.- See Also:
ModuleFactory.startModule(boolean, java.lang.Object, java.lang.String, java.lang.String, java.util.Properties)
-
findTopService
private TopService findTopService(java.lang.Object serviceModule)
-
findModule
public java.lang.Object findModule(java.lang.Object serviceModule, java.lang.String factoryInterface, java.lang.String identifier)Description copied from interface:ModuleFactoryFind the module in the system with the given module protocol, protocolVersion and identifier.- Specified by:
findModulein interfaceModuleFactory- Returns:
- The module instance if found, or null.
-
classFromIdentifier
public InstanceGetter classFromIdentifier(int fmtId) throws StandardException
Obtain a class that supports the given identifier.- Specified by:
classFromIdentifierin interfaceModuleFactory- Parameters:
fmtId- identifer to associate with class- Returns:
- a reference InstanceGetter
- Throws:
StandardException- See Monitor.classFromIdentifier- See Also:
ModuleFactory.classFromIdentifier(int)
-
newInstanceFromIdentifier
public java.lang.Object newInstanceFromIdentifier(int identifier) throws StandardExceptionObtain an new instance of a class that supports the given identifier.- Specified by:
newInstanceFromIdentifierin interfaceModuleFactory- Parameters:
identifier- identifer to associate with class- Returns:
- a reference to a newly created object or null if a matching class cannot be found.
- Throws:
StandardException- See Monitor.newInstanceFromIdentifier
-
loadInstance
protected java.lang.Object loadInstance(java.lang.Class<?> factoryInterface, java.util.Properties properties)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.
-
loadInstance
private java.lang.Object loadInstance(java.util.List<java.lang.Class<?>> implementations, java.lang.Class<?> factoryInterface, java.util.Properties properties)
-
findImplementation
private static int findImplementation(java.util.List<java.lang.Class<?>> implementations, int startIndex, java.lang.Class<?> factoryInterface)Find a class that implements the required index, return the index into the implementations vector of that class. Returns -1 if no class could be found.
-
newInstance
private java.lang.Object newInstance(java.lang.Class<?> classObject)
Return a new instance of classclassObjectusing a no-param constructor.- Parameters:
classObject- the class to instantiate- Returns:
- the instantiated object
-
getApplicationProperties
public java.util.Properties getApplicationProperties()
Description copied from interface:ModuleFactoryReturn the application set of properties which correspond to the set of properties in the file derby.properties.- Specified by:
getApplicationPropertiesin interfaceModuleFactory
-
getServiceList
public java.lang.String[] getServiceList(java.lang.String protocol)
Return an array of the service identifiers that are running and implement the passed in protocol (java interface class name).- Specified by:
getServiceListin interfaceModuleFactory- Returns:
- The list of service names, if no services exist that implement the protocol an array with zero elements is returned.
- See Also:
ModuleFactory.getServiceList(java.lang.String)
-
dumpProperties
void dumpProperties(java.lang.String title, java.util.Properties props)
-
report
protected void report(java.lang.String message)
Should only be called if reportOn is true apart from report/Exception().
-
reportException
protected void reportException(java.lang.Throwable t)
-
addDebugFlags
private void addDebugFlags(java.lang.String flags, boolean set)
-
startServices
public void startServices(java.util.Properties properties, boolean bootAll)Description copied from interface:ModuleFactoryStart all services identified by derby.service.* in the property set. If bootAll is true the services that are persistent will be booted.- Specified by:
startServicesin interfaceModuleFactory
-
startPersistentService
public final boolean startPersistentService(java.lang.String name, java.util.Properties properties) throws StandardExceptionStart a peristent service.- Specified by:
startPersistentServicein interfaceModuleFactory- Parameters:
name- Name of the service to be startedproperties- Property set made available to all modules booted for this service, through their ModuleControl.boot method.- Returns:
- true if the service type is handled by the monitor, false if it isn't
- Throws:
StandardException- An attempt to start the service failed.- See Also:
ModuleFactory.startPersistentService(java.lang.String, java.util.Properties),Monitor.startPersistentService(java.lang.String, java.util.Properties)
-
createPersistentService
public java.lang.Object createPersistentService(java.lang.String factoryInterface, java.lang.String name, java.util.Properties properties) throws StandardExceptionCreate a persistent service.- Specified by:
createPersistentServicein interfaceModuleFactory- Returns:
- The module from the service if it was created successfully, null if a service already existed.
- Throws:
StandardException- An exception was thrown trying to create the service.- See Also:
Monitor.createPersistentService(java.lang.String, java.lang.String, java.util.Properties)
-
removePersistentService
public void removePersistentService(java.lang.String name) throws StandardExceptionRemoves a PersistentService. Could be used for drop database.- Specified by:
removePersistentServicein interfaceModuleFactory- Parameters:
name- : Service name to be removed.- Throws:
StandardException
-
startNonPersistentService
public java.lang.Object startNonPersistentService(java.lang.String factoryInterface, java.lang.String serviceName, java.util.Properties properties) throws StandardExceptionStart a non-persistent service.- Specified by:
startNonPersistentServicein interfaceModuleFactory- Throws:
StandardException- An attempt to start the service failed.- See Also:
Monitor.startNonPersistentService(java.lang.String, java.lang.String, java.util.Properties),ModuleFactory.startNonPersistentService(java.lang.String, java.lang.String, java.util.Properties)
-
getImplementations
private java.util.Vector<java.lang.Class<?>> getImplementations(java.util.Properties moduleList, boolean actualModuleList)Create an implementation set. Look through the properties object for all properties that start with derby.module and add the value into the vector. If no implementations are listed in the properties object then null is returned.
-
getPersistentServiceImplementation
private boolean getPersistentServiceImplementation(java.lang.Class<?> possibleModule)
-
getDefaultImplementations
private java.util.Vector<java.lang.Class<?>> getDefaultImplementations()
-
getDefaultModuleProperties
java.util.Properties getDefaultModuleProperties()
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.
-
removeRuntimeProperties
protected static java.util.Properties removeRuntimeProperties(java.util.Properties properties)
Return a property set that has the runtime properties removed.
-
applicationPropertiesStream
abstract java.io.InputStream applicationPropertiesStream() throws java.io.IOExceptionGet InputStream for application properties file Returns nul if it does not exist.- Throws:
java.io.IOException
-
readApplicationProperties
protected java.util.Properties readApplicationProperties()
-
determineSupportedServiceProviders
private void determineSupportedServiceProviders()
Determine which of the set of service providers (PersistentService objects) are supported in the current environment. If a PersistentService implementation does not implement ModuleControl then it is assumed it does support the current environment. Otherwise the canSupport() method makes the determination. Any providers that are not supported are removed from the list.
-
bootPersistentServices
private void bootPersistentServices()
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)
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.
-
findProviderAndStartService
private boolean findProviderAndStartService(java.lang.String name, java.util.Properties properties, boolean bootTime) throws StandardExceptionFind a provider and start a service.- Throws:
StandardException
-
findProviderForCreate
protected PersistentService findProviderForCreate(java.lang.String name) throws StandardException
- Throws:
StandardException
-
findProviderFromName
private PersistentService findProviderFromName(java.lang.String name, int colon) throws StandardException
Find the service provider from a name that includes a service type, ie. is of the form 'type:name'. If type is less than 3 characters then it is assumed to be of type directory, i.e. a windows driver letter.- Throws:
StandardException
-
getServiceProvider
public PersistentService getServiceProvider(java.lang.String subSubProtocol) throws StandardException
Description copied from interface:ModuleFactoryReturn the PersistentService for a subsubprotocol.- Specified by:
getServiceProviderin interfaceModuleFactory- Returns:
- the PersistentService or null if it does not exist
- Throws:
StandardException
-
getPersistentService
private PersistentService getPersistentService(java.lang.String subSubProtocol) throws StandardException
Return a PersistentService implementation to handle the subSubProtocol.- Returns:
- Valid PersistentService or null if the protocol is not handled.
- Throws:
StandardException
-
getPersistentService
private PersistentService getPersistentService(java.lang.String className, java.lang.String subSubProtocol) throws StandardException
- Throws:
StandardException
-
getStorageFactoryClassName
private java.lang.String getStorageFactoryClassName(java.lang.String subSubProtocol)
Find the StorageFactory class name that handles the subSub protocol. Looks in the system property set and the set defined during boot.- Returns:
- Valid class name, or null if no StorageFactory handles the protocol.
-
startProviderService
protected void startProviderService(PersistentService provider, java.lang.String serviceName, java.util.Properties serviceProperties) throws StandardException
Boot a service under the control of the provider- Throws:
StandardException
-
bootService
protected java.lang.Object bootService(PersistentService provider, java.lang.String factoryInterface, java.lang.String serviceName, java.util.Properties properties, boolean create) throws StandardException
Boot (start or create) a service (persistent or non-persistent).- Throws:
StandardException
-
getUUIDFactory
public UUIDFactory getUUIDFactory()
Return the UUID factory for this system. Returns null if there isn't one. See com.ibm.db2j.system.System- Specified by:
getUUIDFactoryin interfaceModuleFactory
-
getTimerFactory
public TimerFactory getTimerFactory()
Returns the Timer factory for this system.- Specified by:
getTimerFactoryin interfaceModuleFactory- Returns:
- the system's Timer factory.
-
getTempWriter
private java.io.PrintWriter getTempWriter()
-
dumpTempWriter
private void dumpTempWriter(boolean bothPlaces)
-
canSupport
static boolean canSupport(java.lang.Object instance, java.util.Properties properties)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.
-
boot
static void boot(java.lang.Object module, boolean create, java.util.Properties properties) throws StandardExceptionBoot 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.- Throws:
StandardException
-
staticGetLocaleFromString
private static java.util.Locale staticGetLocaleFromString(java.lang.String localeDescription) throws StandardException- Throws:
StandardException
-
setLocale
private static java.util.Locale setLocale(java.util.Properties properties) throws StandardException- Throws:
StandardException
-
getBundle
public java.util.ResourceBundle getBundle(java.lang.String messageId)
Get the locale from the ContextManager and then find the bundle based upon that locale.- Specified by:
getBundlein interfaceBundleFinder- Parameters:
messageId- Message being searched for.
-
getDaemonThread
public java.lang.Thread getDaemonThread(java.lang.Runnable task, java.lang.String name, boolean setMinPriority)Description copied from interface:ModuleFactoryGet a newly created background thread. The thread is set to be a daemon but is not started.- Specified by:
getDaemonThreadin interfaceModuleFactory
-
isDaemonThread
public final boolean isDaemonThread(java.lang.Thread thread)
Description copied from interface:ModuleFactoryCheck if a thread is a daemon thread created byModuleFactory.getDaemonThread(java.lang.Runnable, java.lang.String, boolean).- Specified by:
isDaemonThreadin interfaceModuleFactory- Parameters:
thread- the thread to check- Returns:
trueifthreadwas created bygetDaemonThread(),falseotherwise.
-
getContextService
private static ContextService getContextService()
Privileged lookup of the ContextService. Must be private so that user code can't call this entry point.
-
stopContextService
private static void stopContextService()
Privileged shutdown of the ContextService. Must be private so that user code can't call this entry point.
-
setMonitor
private static boolean setMonitor(BaseMonitor baseMonitor)
Privileged startup. Must be private so that user code can't call this entry point. Returns true if the system is already booted or in the process of shutting down.
-
initialize
abstract boolean initialize(boolean lite)
Initialize the monitor wrt the current environemnt. Returns false if the monitor cannot be initialized, true otherwise.
-
-