Modifier and Type | Method and Description |
---|---|
void |
connect()
Connects to the given database.
|
static DbService |
create(String username,
String password,
String dbUrl)
Factory method for creating a DbService instance.
|
void |
disconnect()
Disconnects from the database.
|
org.osgi.framework.ServiceRegistration |
getServiceRegistration()
Get the registration for this service.
|
void |
setServiceRegistration(org.osgi.framework.ServiceRegistration registration)
Set the registration suitable for this service.
|
public void connect() throws ConnectionException
DbService
connect
in interface DbService
ConnectionException
- If DB connection cannot be established.public void disconnect() throws ConnectionException
DbService
disconnect
in interface DbService
ConnectionException
public static DbService create(String username, String password, String dbUrl)
username
- password
- dbUrl
- public org.osgi.framework.ServiceRegistration getServiceRegistration()
DbService
getServiceRegistration
in interface DbService
public void setServiceRegistration(org.osgi.framework.ServiceRegistration registration)
DbService
setServiceRegistration
in interface DbService
Copyright © 2013. All Rights Reserved.