use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class SynchronizerService method startup.
public void startup() {
super.startup();
if (isEnabled()) {
IEventBroker eventBroker = this.getRuntime().getEventBroker();
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_RETURNED_HIBERNATE));
if (this.m_configuration != null && this.m_configuration.getProperty(CFG_SYNCSTARTUP, "false").equalsIgnoreCase("true")) {
final long delay = 1000 * Long.parseLong(this.m_configuration.getProperty(CFG_STARTUP_DELAY, "0"));
this.m_logger.info("Startup delay on fritzbox sync set to " + delay + " ms.");
Thread t = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep((delay + 2000));
} catch (InterruptedException e) {
}
new SWTExecuter() {
protected void execute() {
synchronize(false);
}
}.start();
}
});
t.setName("FritzBox-Startup-Syncthread");
t.start();
}
boolean isRefreshAfterCallend = this.m_configuration.getProperty(CFG_REFRESH_AFTER_CALLEND, "false").equalsIgnoreCase("true");
if (isRefreshAfterCallend) {
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL_ACCEPTED));
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLACCEPTED));
}
timebasedSyncing();
}
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class CommentService method startup.
public void startup() {
super.startup();
IEventBroker evtBroker = this.getRuntime().getEventBroker();
evtBroker.register(this, evtBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class CommentService method shutdown.
public void shutdown() {
super.shutdown();
IEventBroker evtBroker = this.getRuntime().getEventBroker();
evtBroker.unregister(this, evtBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class ExternalApplicationLauncher method startup.
public void startup() {
super.startup();
IEventBroker eventBroker = this.getRuntime().getEventBroker();
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
if (this.m_configuration.getProperty(CONFIG_OUTGOING, "false").equalsIgnoreCase("true"))
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
this.m_logger.info("ExternalApplicationLauncher is started ...");
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class GeoCoding method shutdown.
public void shutdown() {
super.shutdown();
IEventBroker eventBroker = this.getRuntime().getEventBroker();
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
eventBroker.unregister(this);
this.m_logger.info("GeoCoding is shut down ...");
}
Aggregations