|
Jala 1.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--jala.db.Server
Instances of this class represent a H2 database listener that
allows multiple databases to be accessed via tcp.
Important: You need the h2.jar in directory "lib/ext"
of your helma installation for this library to work, which you can get
at http://www.h2database.com/.
Defined in Database.js
Constructor Summary | |
jala.db.Server
(<helma.File> baseDir, <Number> port)
Returns a new Server instance. |
Method Summary | |
Boolean
|
createOnDemand(<Boolean> bool)
If called with boolean true as argument, this server creates databases on-the-fly, otherwise it only accepts connections to already existing databases. |
helma.Database
|
getConnection(<String> name, <String> username, <String> password, <Object> props)
Returns a connection to a database within this server. |
helma.File
|
getDirectory()
Returns the directory used by this server instance |
Number
|
getPort()
Returns the port this server listens on |
helma.util.ResourceProperties
|
getProperties(<String> name, <String> username, <String> password, <Object> props)
Returns a properties object containing the connection properties of the database with the given name. |
String
|
getUrl(<String> name, <Object> props)
Returns the JDBC Url to use for connections to a given database. |
Boolean
|
isPublic(<Boolean> bool)
If called with boolean true as argument, this server accepts connections from outside localhost. |
Boolean
|
isRunning()
Returns true if the database server is running. |
Boolean
|
start()
Starts the database server. |
Boolean
|
stop()
Stops the database server. |
Boolean
|
useSsl(<Boolean> bool)
Toggles the use of Ssl encryption within this server. |
Constructor Detail |
jala.db.Server(<helma.File> baseDir, <Number> port)
baseDir
- The directory where the database files are located or should be stored
port
- The port to listen on (defaults to 9001)
createOnDemand
- If true this server will create non-existing databases on-the-fly, if false it only accepts connections to already existing databases in the given base directory
makePublic
- If true this database is reachable from outside, if false it's only reachable from localhost
useSsl
- If true SSL will be used to encrypt the connection
Method Detail |
Boolean createOnDemand(<Boolean> bool)
bool
- If true this server creates non-existing databases on demand, if false it only allows connections to existing databases. If no argument is given, this method returns the current setting.
helma.Database getConnection(<String> name, <String> username, <String> password, <Object> props)
name
- The name of the database running within this server
username
- Optional username to use for this connection
password
- Optional password to use for this connection
props
- An optional parameter object containing connection properties to add to the connection Url.
helma.File getDirectory()
Number getPort()
helma.util.ResourceProperties getProperties(<String> name, <String> username, <String> password, <Object> props)
name
- The name of the database
username
- Optional username to use for this connection
password
- Optional password to use for this connection
props
- An optional parameter object containing connection properties to add to the connection Url.
String getUrl(<String> name, <Object> props)
name
- An optional name of a database running
props
- Optional connection properties to add
Boolean isPublic(<Boolean> bool)
bool
- If true this server accepts connections from outside localhost. If no argument is given, this method returns the current setting.
Boolean isRunning()
Boolean start()
Boolean stop()
Boolean useSsl(<Boolean> bool)
bool
- If true SSL encryption will be used, false otherwise. If no argument is given, this method returns the current setting.
|
Jala 1.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |