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


org.apache.derby.iapi.services.monitor.PersistentService

All known Subclasses:   org.apache.derby.impl.services.monitor.StorageFactoryService,
PersistentService
public interface PersistentService (Code)
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
final public static  StringCLASSPATH
     Service stored on the class path (can be in a zip/jar on the class path).
final public static  StringDIRECTORY
     Service stored in a directory.
final public static  StringHTTP
     Service stored in a web server .
final public static  StringHTTPS
    
final public static  StringJAR
     Service stored in a jar/zip archive.
final public static  StringPROPERTIES_NAME
     The typical name for the service's properties file.
final public static  StringROOT
     The root of any stored data.
final public static  StringTYPE
     The type of PersistentService used to boot the service.


Method Summary
public  StringcreateServiceRoot(String name, boolean deleteExisting)
     Returns the canonical name of the service.
public  EnumerationgetBootTimeServices()
     Return an Enumeration of service names descriptors (Strings) that should be be started at boot time by the monitor.
public  StringgetCanonicalServiceName(String name)
     Convert a service name into its canonical form.
public  PropertiesgetServiceProperties(String serviceName, Properties defaultProperties)
     For a service return its service properties, typically from the service.properties file.
public  StorageFactorygetStorageFactoryInstance(boolean useHome, String databaseName, String tempDirName, String uniqueName)
     Get an initialized StorageFactoryInstance
Parameters:
  useHome - If true and the database name is not absolute then the database directory will berelative to the home directory, if one is defined in the properties file.
Parameters:
  databaseName - The name of the database (directory).
public  StringgetType()
     Return the type of this service.
public  StringgetUserServiceName(String serviceName)
     Return the user form of a service name.
public  booleanhasStorageFactory()
    
public  booleanisSameService(String serviceName1, String serviceName2)
    
public  booleanremoveServiceRoot(String serviceName)
     Remove a service's root and its contents.
public  voidsaveServiceProperties(String serviceName, StorageFactory storageFactory, Properties properties, boolean replace)
    
public  voidsaveServiceProperties(String serviceName, Properties properties, boolean replace)
     Save to a backup file.

Field Detail
CLASSPATH
final public static String CLASSPATH(Code)
Service stored on the class path (can be in a zip/jar on the class path).



DIRECTORY
final public static String DIRECTORY(Code)
Service stored in a directory.



HTTP
final public static String HTTP(Code)
Service stored in a web server .



HTTPS
final public static String HTTPS(Code)



JAR
final public static String JAR(Code)
Service stored in a jar/zip archive.



PROPERTIES_NAME
final public static String PROPERTIES_NAME(Code)
The typical name for the service's properties file.



ROOT
final public static String ROOT(Code)
The root of any stored data.



TYPE
final public static String TYPE(Code)
The type of PersistentService used to boot the service.





Method Detail
createServiceRoot
public String createServiceRoot(String name, boolean deleteExisting) throws StandardException(Code)
Returns the canonical name of the service.
exception:
  StandardException - Service root cannot be created.



getBootTimeServices
public Enumeration getBootTimeServices()(Code)
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.




getCanonicalServiceName
public String getCanonicalServiceName(String name) throws StandardException(Code)
Convert a service name into its canonical form. Returns null if the name cannot be converted into a canonical form.
exception:
  No - canonical name, name probably invalid



getServiceProperties
public Properties getServiceProperties(String serviceName, Properties defaultProperties) throws StandardException(Code)
For a service return its service properties, typically from the service.properties file. A Properties object or null if serviceName does not represent a valid service.
exception:
  StandardException - Service appears valid but the properties cannot be created.



getStorageFactoryInstance
public StorageFactory getStorageFactoryInstance(boolean useHome, String databaseName, String tempDirName, String uniqueName) throws StandardException, IOException(Code)
Get an initialized StorageFactoryInstance
Parameters:
  useHome - If true and the database name is not absolute then the database directory will berelative to the home directory, if one is defined in the properties file.
Parameters:
  databaseName - The name of the database (directory). The name does not include the subSubProtocol.If null then the storage factory will only be used to deal with the directory containingthe databases.
Parameters:
  tempDirName - The name of the temporary file directory set in properties. If null then a defaultdirectory should be used. Each database should get a separate temporary filedirectory within this one to avoid collisions.
Parameters:
  uniqueName - A unique name that can be used to create the temporary file directory for this database.If null then temporary files will not be created in this StorageFactory instance. An initialized StorageFactory.



getType
public String getType()(Code)
Return the type of this service.



getUserServiceName
public String getUserServiceName(String serviceName)(Code)
Return the user form of a service name. This name is only valid within this system. The separator character used must be '/'



hasStorageFactory
public boolean hasStorageFactory()(Code)
true if the PersistentService has a StorageFactory, false if not.



isSameService
public boolean isSameService(String serviceName1, String serviceName2)(Code)



removeServiceRoot
public boolean removeServiceRoot(String serviceName)(Code)
Remove a service's root and its contents.



saveServiceProperties
public void saveServiceProperties(String serviceName, StorageFactory storageFactory, Properties properties, boolean replace) throws StandardException(Code)

exception:
  StandardException - Properties cannot be saved.



saveServiceProperties
public void saveServiceProperties(String serviceName, Properties properties, boolean replace) throws StandardException(Code)
Save to a backup file.
exception:
  StandardException - Properties cannot be saved.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.