public class DatabaseConnector extends java.lang.Object implements DataPointListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
bucket |
static java.lang.String |
org |
static java.lang.String |
url |
listeners
Modifier and Type | Method and Description |
---|---|
static DatabaseConnector |
getMySelf()
Get the instance of the database connector
|
void |
initialize(java.lang.String url)
Initialize the database connector
|
void |
onNewValue(DataPoint dp)
Push the data point to the database
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
subscribeUpdate
public static java.lang.String url
public static java.lang.String org
public static java.lang.String bucket
public static DatabaseConnector getMySelf()
public void initialize(java.lang.String url)
url
- URL of the database. If null take the URL from the config.properties filepublic void onNewValue(DataPoint dp)
onNewValue
in interface DataPointListener
dp
- Data point to push