|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> services >> [ monitor overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.services.monitor
Interface PersistentService

- public interface PersistentService
A PersistentService modularises the access to persistent services, abstracting out details such as finding the list of services to be started at boot time, finding the service.properties file and creating and deleting the persistent storage for a service.
These modules must only be used by the monitor.
Possible examples of implementations are:
- Store services in a directory in the file system.
- Store services in a zip file
- Service data is provided by a web server
- Service data is stored on the class path.
This class also serves as the registry the defined name for all the implementations of PersistentService. These need to be kept track of as they can be used in JDBC URLS.
An implementation of PersistentService can implement ModuleSupportable but must not implement ModuleControl. This is because the monitor will not execute ModuleControl methods for a PersistentService.
| Field Summary | |
static java.lang.String |
CLASSPATH
Service stored on the class path (can be in a zip/jar on the class path). |
static java.lang.String |
DIRECTORY
Service stored in a directory. |
static java.lang.String |
HTTP
Service stored in a web server . |
static java.lang.String |
HTTPS
|
static java.lang.String |
JAR
Service stored in a jar/zip archive. |
static java.lang.String |
PROPERTIES_NAME
The typical name for the service's properties file. |
static java.lang.String |
ROOT
The root of any stored data. |
static java.lang.String |
TYPE
The type of PersistentService used to boot the service. |
| Method Summary | |
java.lang.String |
createServiceRoot(java.lang.String name,
boolean deleteExisting)
Returns the canonical name of the service. |
java.util.Enumeration |
getBootTimeServices()
Return an Enumeration of service names descriptors (Strings) that should be be started at boot time by the monitor. |
java.lang.String |
getCanonicalServiceName(java.lang.String name)
Convert a service name into its canonical form. |
java.util.Properties |
getServiceProperties(java.lang.String serviceName,
java.util.Properties defaultProperties)
For a service return its service properties, typically from the service.properties file. |
org.apache.derby.io.StorageFactory |
getStorageFactoryInstance(boolean useHome,
java.lang.String databaseName,
java.lang.String tempDirName,
java.lang.String uniqueName)
Get an initialized StorageFactoryInstance |
java.lang.String |
getType()
Return the type of this service. |
java.lang.String |
getUserServiceName(java.lang.String serviceName)
Return the user form of a service name. |
boolean |
hasStorageFactory()
|
boolean |
isSameService(java.lang.String serviceName1,
java.lang.String serviceName2)
|
boolean |
removeServiceRoot(java.lang.String serviceName)
Remove a service's root and its contents. |
void |
saveServiceProperties(java.lang.String serviceName,
java.util.Properties properties,
boolean replace)
Save to a backup file. |
void |
saveServiceProperties(java.lang.String serviceName,
org.apache.derby.io.StorageFactory storageFactory,
java.util.Properties properties,
boolean replace)
|
| Field Detail |
DIRECTORY
public static final java.lang.String DIRECTORY
- Service stored in a directory.
- See Also:
- Constant Field Values
CLASSPATH
public static final java.lang.String CLASSPATH
- Service stored on the class path (can be in a zip/jar on the class path).
- See Also:
- Constant Field Values
JAR
public static final java.lang.String JAR
- Service stored in a jar/zip archive.
- See Also:
- Constant Field Values
HTTP
public static final java.lang.String HTTP
- Service stored in a web server .
- See Also:
- Constant Field Values
HTTPS
public static final java.lang.String HTTPS
- See Also:
- Constant Field Values
PROPERTIES_NAME
public static final java.lang.String PROPERTIES_NAME
- The typical name for the service's properties file.
- See Also:
- Constant Field Values
ROOT
public static final java.lang.String ROOT
- The root of any stored data.
- See Also:
- Constant Field Values
TYPE
public static final java.lang.String TYPE
- The type of PersistentService used to boot the service.
- See Also:
- Constant Field Values
| Method Detail |
getType
public java.lang.String getType()
- Return the type of this service.
getBootTimeServices
public java.util.Enumeration getBootTimeServices()
- Return an Enumeration of service names descriptors (Strings) that should be
be started at boot time by the monitor. The monitor will boot the service if getServiceProperties()
returns a Properties object and the properties does not indicate the service should not be
auto-booted.
This method may return null if there are no services that need to be booted automatically at boot time.
The service name returned by the Enumeration must be in its canonical form.
getServiceProperties
public java.util.Properties getServiceProperties(java.lang.String serviceName, java.util.Properties defaultProperties) throws org.apache.derby.iapi.error.StandardException
- For a service return its service properties, typically from the service.properties
file.
saveServiceProperties
public void saveServiceProperties(java.lang.String serviceName, org.apache.derby.io.StorageFactory storageFactory, java.util.Properties properties, boolean replace) throws org.apache.derby.iapi.error.StandardException
saveServiceProperties
public void saveServiceProperties(java.lang.String serviceName, java.util.Properties properties, boolean replace) throws org.apache.derby.iapi.error.StandardException
- Save to a backup file.
createServiceRoot
public java.lang.String createServiceRoot(java.lang.String name, boolean deleteExisting) throws org.apache.derby.iapi.error.StandardException
- Returns the canonical name of the service.
removeServiceRoot
public boolean removeServiceRoot(java.lang.String serviceName)
- Remove a service's root and its contents.
getCanonicalServiceName
public java.lang.String getCanonicalServiceName(java.lang.String name) throws org.apache.derby.iapi.error.StandardException
- Convert a service name into its canonical form. Returns null if the name
cannot be converted into a canonical form.
getUserServiceName
public java.lang.String getUserServiceName(java.lang.String serviceName)
- Return the user form of a service name. This name is only valid within
this system. The separator character used must be '/'
isSameService
public boolean isSameService(java.lang.String serviceName1, java.lang.String serviceName2)
hasStorageFactory
public boolean hasStorageFactory()
getStorageFactoryInstance
public org.apache.derby.io.StorageFactory getStorageFactoryInstance(boolean useHome, java.lang.String databaseName, java.lang.String tempDirName, java.lang.String uniqueName) throws org.apache.derby.iapi.error.StandardException, java.io.IOException
- Get an initialized StorageFactoryInstance
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> services >> [ monitor overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC