| org.apache.derby.iapi.services.monitor.ModuleFactory
All known Subclasses: org.apache.derby.impl.services.monitor.BaseMonitor,
ModuleFactory | public interface ModuleFactory (Code) | | The monitor provides a central registry for all modules in the system,
and manages loading, starting, and finding them.
|
Method Summary | |
public InstanceGetter | classFromIdentifier(int identifier) Obtain a class that supports the given identifier. | public Object | createPersistentService(String factoryInterface, String serviceName, Properties properties) Create a persistent service. | public Object | findModule(Object service, String protocol, String identifier) Find the module in the system with the given module protocol,
protocolVersion and identifier. | public Object | findService(String protocol, String identifier) Find a service. | public Properties | getApplicationProperties() | public Thread | getDaemonThread(Runnable task, String name, boolean setMinPriority) Get a newly created background thread. | public ProductVersionHolder | getEngineVersion() | public Object | getEnvironment() Return the environment object that this system was booted in.
This is a free form object that is set by the method the
system is booted. | public String | getJVMProperty(String key) Return a property from the JVM's system set. | public Locale | getLocale(Object serviceModule) Return the locale of the service that the passed in module lives in. | public Locale | getLocaleFromString(String localeDescription) Translate a string of the form ll[_CC[_variant]] to a Locale. | 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 String | getServiceName(Object serviceModule) Return the name of the service that the passed in module lives in. | public PersistentService | getServiceProvider(String subSubProtocol) Return the PersistentService for a subsubprotocol. | public PersistentService | getServiceType(Object serviceModule) Return the PersistentService object for a service. | public InfoStreams | getSystemStreams() Get the defined default system streams object. | public org.apache.derby.iapi.services.timer.TimerFactory | getTimerFactory() Get the Timer factory for the system. | public org.apache.derby.iapi.services.uuid.UUIDFactory | getUUIDFactory() Get the UUID factory for the system. | public Object | newInstanceFromIdentifier(int identifier) Obtain an new instance of a class that supports the given identifier. | public void | removePersistentService(String name) | public Locale | setLocale(Object serviceModule, String userDefinedLocale) Set the locale for the service *outside* of boot time. | public Locale | setLocale(Properties serviceProperties, String userDefinedLocale) Set the locale for the service at boot time. | public void | setThreadPriority(int priority) Set the priority of the current thread. | public void | shutdown() Shut down the complete system that was started by this Monitor. | public void | shutdown(Object service) Shut down a service that was started by this Monitor. | public Object | startModule(boolean create, Object service, String protocol, String identifier, Properties properties) Start a module. | public Object | startNonPersistentService(String factoryInterface, String serviceName, Properties properties) Start a non-persistent service. | public boolean | startPersistentService(String serviceName, Properties properties) Start a persistent service.
Do not call directly - use Monitor.startPersistentService()
The poperty set passed in is for boot options for the modules
required to start the service. | public void | startServices(Properties properties, boolean bootAll) Start all services identified by derby.service.*
in the property set. |
classFromIdentifier | public InstanceGetter classFromIdentifier(int identifier) throws StandardException(Code) | | Obtain a class that supports the given identifier.
Parameters: identifier - identifer to associate with class a reference InstanceGetter exception: StandardException - See Monitor.classFromIdentifier |
findModule | public Object findModule(Object service, String protocol, String identifier)(Code) | | Find the module in the system with the given module protocol,
protocolVersion and identifier.
The module instance if found, or null. |
findService | public Object findService(String protocol, String identifier)(Code) | | Find a service.
Do not call directly - use Monitor.findService()
a refrence to a module represeting the service or null if the service does not exist. See Also: Monitor.findService |
getDaemonThread | public Thread getDaemonThread(Runnable task, String name, boolean setMinPriority)(Code) | | Get a newly created background thread.
The thread is set to be a daemon but is not started.
|
getEnvironment | public Object getEnvironment()(Code) | | Return the environment object that this system was booted in.
This is a free form object that is set by the method the
system is booted. For example when running in a Marimba system
it is set to the maribma application context. In most environments
it will be set to a java.io.File object representing the system home directory.
Code that call this method usualy have predefined knowledge of the type of the returned object, e.g.
Marimba store code knows that this will be set to a marimba application
context.
|
getJVMProperty | public String getJVMProperty(String key)(Code) | | Return a property from the JVM's system set.
In a Java2 environment this will be executed as a privileged block
if and only if the property starts with 'derby.'.
If a SecurityException occurs, null is returned.
|
getLocale | public Locale getLocale(Object serviceModule)(Code) | | Return the locale of the service that the passed in module lives in.
Will return null if no-locale has been defined.
|
getLocaleFromString | public Locale getLocaleFromString(String localeDescription) throws StandardException(Code) | | Translate 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.
|
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).
This list is a snapshot of the current running systesm, once
the call returns the service may have been shutdown or
new ones added.
The list of service names, if no services exist thatimplement the protocol an array with zero elements is returned. |
getServiceName | public String getServiceName(Object serviceModule)(Code) | | Return the name of the service that the passed in module lives in.
|
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) | | Get the defined default system streams object.
|
newInstanceFromIdentifier | public Object newInstanceFromIdentifier(int identifier) throws StandardException(Code) | | Obtain an new instance of a class that supports the given identifier.
Parameters: identifier - identifer to associate with class a reference to a newly created object exception: StandardException - See Monitor.newInstanceFromIdentifier |
setLocale | public Locale setLocale(Object serviceModule, String userDefinedLocale) throws StandardException(Code) | | Set the locale for the service *outside* of boot time.
Parameters: userDefinedLocale - A String in the form xx_YY, where xx is thelanguage code and YY is the country code. The new Locale for the service exception: StandardException - Thrown on error |
setThreadPriority | public void setThreadPriority(int priority)(Code) | | Set the priority of the current thread.
If the current thread was not returned by getDaemonThread() then no action is taken.
|
shutdown | public void shutdown()(Code) | | Shut down the complete system that was started by this Monitor. Will
cause the stop() method to be called on each loaded module.
|
shutdown | public void shutdown(Object service)(Code) | | Shut down a service that was started by this Monitor. Will
cause the stop() method to be called on each loaded module.
Requires that a context stack exist.
|
startPersistentService | public boolean startPersistentService(String serviceName, Properties properties) throws StandardException(Code) | | Start a persistent service.
Do not call directly - use Monitor.startPersistentService()
The poperty set passed in is for boot options for the modules
required to start the service. It does not support defining different
or new modules implementations.
Parameters: serviceName - Name of the service to be started Parameters: properties - Property set made available to all modules bootedfor this service, through their ModuleControl.boot method. true if the service type is handled by the monitor, false if it isn't exception: StandardException - An attempt to start the service failed. See Also: Monitor.startPersistentService |
startServices | public void startServices(Properties properties, boolean bootAll)(Code) | | Start all services identified by derby.service.*
in the property set. If bootAll is true the services
that are persistent will be booted.
|
|
|