KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jdbc > HypersonicDatabaseMBean


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.jdbc;
23
24 import javax.management.ObjectName JavaDoc;
25
26 import org.jboss.mx.util.ObjectNameFactory;
27 import org.jboss.system.ServiceMBean;
28
29 /**
30  * MBean interface.
31  *
32  * In all cases we run Hypersonic in the same VM with JBoss.
33  * A few notes on Hypersonic running modes:
34  *
35  * remote (server) mode
36  * hsqldb will listen for connections from local/remote clients
37  *
38  * in-process (standalone) mode
39  * hsqldb can only be contacted from in-vm clients
40  *
41  * memory-only mode
42  * hsqldb will only keep tables in memory, no persistence of data
43  *
44  * @version $Revision: 39787 $
45  */

46 public interface HypersonicDatabaseMBean extends ServiceMBean
47 {
48    /** The default ObjectName */
49    ObjectName JavaDoc OBJECT_NAME = ObjectNameFactory.create("jboss:service=Hypersonic");
50
51    // Attributes ----------------------------------------------------
52

53    /** The silent flag, default is 'true' */
54    boolean getSilent();
55    void setSilent(boolean silent);
56
57    /** The trace flag, default is 'false' */
58    boolean getTrace();
59    void setTrace(boolean trace);
60    
61    /** The database name, default is 'default' */
62    String JavaDoc getDatabase();
63    void setDatabase(String JavaDoc name);
64
65    /** The listening port when in remove server mode, default is '1701' */
66    int getPort();
67    void setPort(int port);
68
69    /** The binding address, default is '0.0.0.0' */
70    String JavaDoc getBindAddress();
71    void setBindAddress(String JavaDoc address);
72    
73    /** Whether remote server mode hypersonic should avoid calling System.exit() on shutdown, default is 'true'
74        By far, the worse mbean attribute name */

75    boolean getNo_system_exit();
76    void setNo_system_exit(boolean no_system_exit);
77
78    /** Whether DB is persisted, default is 'true'. A false value will activate memory only mode. */
79    boolean getPersist();
80    void setPersist(boolean persist);
81
82    /** Whether DB is in in-process mode or remote server mode, default is 'false' */
83    boolean isInProcessMode();
84    void setInProcessMode(boolean b);
85    
86    /** The default user to use when connecting to the DB, default is "sa" */
87    String JavaDoc getUser();
88    void setUser(String JavaDoc user);
89    
90    /** The default password to use when connecting to the DB, default is "" */
91    String JavaDoc getPassword();
92    void setPassword(String JavaDoc password);
93    
94    /** The shutdown command to use when stopping the DB */
95    String JavaDoc getShutdownCommand();
96    void setShutdownCommand(String JavaDoc string);
97
98    /** The database manager (UI) class, default is 'org.hsqldb.util.DatabaseManagerSwing' */
99    String JavaDoc getDatabaseManagerClass();
100    void setDatabaseManagerClass(String JavaDoc databaseManagerClass);
101    
102    /** The full database path */
103    String JavaDoc getDatabasePath();
104
105    // Operations ----------------------------------------------------
106

107    /**
108     * Start DatabaseManager accessible from the management console.
109     */

110    void startDatabaseManager();
111
112 }
113
Popular Tags