| 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
DbServiceconnect in interface DbServiceConnectionException - If DB connection cannot be established.public void disconnect()
throws ConnectionException
DbServicedisconnect in interface DbServiceConnectionExceptionpublic static DbService create(String username, String password, String dbUrl)
username - password - dbUrl - public org.osgi.framework.ServiceRegistration getServiceRegistration()
DbServicegetServiceRegistration in interface DbServicepublic void setServiceRegistration(org.osgi.framework.ServiceRegistration registration)
DbServicesetServiceRegistration in interface DbServiceCopyright © 2012. All Rights Reserved.